summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLaurent Bonnans <laurent.bonnans@here.com>2018-06-27 16:07:20 +0200
committerLaurent Bonnans <laurent.bonnans@here.com>2018-09-06 11:45:07 +0200
commit12ee01db91117005b79a9264d8509a2daf86fa80 (patch)
tree9ca5146bfb805be1c44a7ab7a35c73e51aa40242 /scripts
parent1b3616e68408a881df58e1bb806bc9c78828f779 (diff)
downloadmeta-updater-12ee01db91117005b79a9264d8509a2daf86fa80.tar.gz
Split yocto builds from yocto selftests
In a separate Jenkinsfile right now, with a lot of duplication. Let's hope to find a cleaner way
Diffstat (limited to 'scripts')
-rw-r--r--scripts/ci/Jenkinsfile.bleeding4
-rw-r--r--scripts/ci/Jenkinsfile.bleeding-selftest89
2 files changed, 90 insertions, 3 deletions
diff --git a/scripts/ci/Jenkinsfile.bleeding b/scripts/ci/Jenkinsfile.bleeding
index e50b4b6..6d340fd 100644
--- a/scripts/ci/Jenkinsfile.bleeding
+++ b/scripts/ci/Jenkinsfile.bleeding
@@ -64,7 +64,7 @@ pipeline {
64 ''' 64 '''
65 } 65 }
66 } 66 }
67 stage('build-core-image-minimal+oe-selftest') { 67 stage('build-core-image-minimal') {
68 agent { 68 agent {
69 dockerfile { 69 dockerfile {
70 filename 'scripts/ci/Dockerfile.bitbake' 70 filename 'scripts/ci/Dockerfile.bitbake'
@@ -80,8 +80,6 @@ pipeline {
80 sh 'scripts/ci/configure.sh' 80 sh 'scripts/ci/configure.sh'
81 81
82 sh 'scripts/ci/build.sh core-image-minimal' 82 sh 'scripts/ci/build.sh core-image-minimal'
83
84 sh 'scripts/ci/oe-selftest.sh'
85 } 83 }
86 } 84 }
87 } 85 }
diff --git a/scripts/ci/Jenkinsfile.bleeding-selftest b/scripts/ci/Jenkinsfile.bleeding-selftest
new file mode 100644
index 0000000..e50b4b6
--- /dev/null
+++ b/scripts/ci/Jenkinsfile.bleeding-selftest
@@ -0,0 +1,89 @@
1// This CI setup checks out aktualizr, meta-updater and updater-repo and builds
2// master branches whenever a change is pushed to any of these
3
4// define these for docker image creation
5node {
6 // might cause some problems:
7 // https://stackoverflow.com/questions/44805076/setting-build-args-for-dockerfile-agent-using-a-jenkins-declarative-pipeline
8 JENKINS_UID = sh(returnStdout: true, script: 'id -u').trim()
9 JENKINS_GID = sh(returnStdout: true, script: 'id -g').trim()
10}
11
12pipeline {
13 agent any
14 environment {
15 TEST_AKTUALIZR_REMOTE = 'aktualizr'
16 TEST_AKTUALIZR_DIR = 'aktualizr'
17 TEST_AKTUALIZR_BRANCH = 'master'
18 TEST_BITBAKE_COMMON_DIR = "/opt/jenkins/bitbake-common"
19 }
20 stages {
21 stage('checkout') {
22 steps {
23
24 checkout([$class: 'GitSCM',
25 userRemoteConfigs: [
26 [url: 'https://github.com/advancedtelematic/aktualizr', name: 'aktualizr']
27 ],
28 branches: [[name: 'refs/heads/master']],
29 extensions: [
30 [$class: 'DisableRemotePoll'],
31 [$class: 'PruneStaleBranch'],
32 [$class: 'RelativeTargetDirectory',
33 relativeTargetDir: 'aktualizr'
34 ]
35 ],
36 ])
37
38 checkout([$class: 'RepoScm',
39 manifestRepositoryUrl: 'https://github.com/advancedtelematic/updater-repo',
40 manifestBranch: null,
41 manifestFile: 'master.xml',
42 manifestGroup: null,
43 mirrorDir: null,
44 jobs: 0,
45 depth: 0,
46 localManifest: null,
47 destinationDir: 'updater-repo',
48 repoUrl: null,
49 currentBranch: false,
50 resetFirst: true,
51 quiet: false,
52 trace: false,
53 showAllChanges: false,
54 ])
55
56 // ignore bitbake build directories in docker
57 sh 'echo \'build*\' > .dockerignore'
58
59 // override meta-updater commit with currently tested branch
60 sh '''
61 META_UPDATER_COMMIT=$(git rev-parse HEAD)
62 cd updater-repo/meta-updater
63 git checkout $META_UPDATER_COMMIT
64 '''
65 }
66 }
67 stage('build-core-image-minimal+oe-selftest') {
68 agent {
69 dockerfile {
70 filename 'scripts/ci/Dockerfile.bitbake'
71 args '-v /opt/jenkins/bitbake-common:/opt/jenkins/bitbake-common'
72 additionalBuildArgs "--build-arg uid=${JENKINS_UID} --build-arg gid=${JENKINS_GID}"
73 reuseNode true
74 }
75 }
76 environment {
77 TEST_AKTUALIZR_CREDENTIALS = credentials('garage-credentials')
78 }
79 steps {
80 sh 'scripts/ci/configure.sh'
81
82 sh 'scripts/ci/build.sh core-image-minimal'
83
84 sh 'scripts/ci/oe-selftest.sh'
85 }
86 }
87 }
88}
89// vim: set ft=groovy tabstop=2 shiftwidth=2 expandtab: