Skip to content

Commit

Permalink
Add Jenkinsfile
Browse files Browse the repository at this point in the history
* allows Jenkins to automatically discovery build jobs(s) from GH
* add repo.yml to allow balenaCI to version
* add README.md stub

Change-type: patch
  • Loading branch information
ab77 authored and klutchell committed Aug 16, 2021
1 parent 1039489 commit 4338837
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
54 changes: 54 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@

pipeline {

agent any

options {
timestamps()
ansiColor('xterm')
buildDiscarder logRotator(numToKeepStr: '100')
disableConcurrentBuilds()
timeout(activity: true, time: 1, unit: 'DAYS')
}

parameters {
string defaultValue: 'master', description: 'Build scaffold Git branch', name: 'BRANCH', trim: true
string defaultValue: 'master', description: 'QEMU Git branch', name: 'RELEASE_BRANCH', trim: true
string defaultValue: 'balena-io', description: 'GitHub org', name: 'ACCOUNT', trim: true
string defaultValue: 'qemu', description: 'GitHub repository', name: 'REPO', trim: true
string defaultValue: '', description: '(e.g.) v5.2.0+balena1', name: 'QEMU_VERSION', trim: true
string defaultValue: '', description: 'Git commit hash', name: 'RELEASE_COMMIT', trim: true
credentials credentialType: 'org.jenkinsci.plugins.plaincredentials.impl.StringCredentialsImpl', defaultValue: '169db7d9-d27d-42ca-92fb-215663537c34', description: 'GitHub access token credentials', name: 'GIT_TOKEN_CREDENTIALS', required: true
credentials credentialType: 'com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey', defaultValue: 'a2d8eaf4-a373-4efa-a9e3-c331a3687e72', description: 'GitHub SSH credentials', name: 'GIT_SSH_CREDENTIALS', required: true
}

stages {

stage('scm') {
steps {
checkout([
$class: 'GitSCM',
branches: [[name: '*/${BRANCH}']],
doGenerateSubmoduleConfigurations: false,
extensions: [],
submoduleCfg: [],
userRemoteConfigs: [[
credentialsId: GIT_SSH_CREDENTIALS,
url: '[email protected]:${ACCOUNT}/${REPO}.git'
]
]])
}
}

stage('build') {
steps {
withCredentials([string(
credentialsId: GIT_TOKEN_CREDENTIALS,
variable: 'ACCESS_TOKEN'
)]) {
sh returnStdout: true, script: 'automation/jenkins-build.sh'
}
}
}
}
}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# qemu
> build QEMU with additional QEMU_EXECVE flag that persists emulator after an execve
2 changes: 2 additions & 0 deletions repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
type: "generic"

0 comments on commit 4338837

Please sign in to comment.