@@ -7,24 +7,31 @@ pipeline {
77 timestamps ()
88 }
99 stages {
10+ stage(' Build' ) {
11+ agent { label ' label_firefly_build' }
12+ steps {
13+ script {
14+ echo " Updating Job Description"
15+ currentBuild. description = sh(returnStdout : true , script : ' echo "<b>Branch:</b> ${BRANCH_TO_BUILD}<br>"' )
16+ if ( params. BRANCH_TO_BUILD == ' master' && params. BUILD_PLATFORM != ' both' ) {
17+ echo " Options error - you are building from master branch, but did not select to build both platforms. You must build both if you are building master."
18+ error message : " Options error - you are building from master branch, but did not select to build both platforms. You must build both if you are building master."
19+ }
20+ }
21+ dir(' hip-pipeline-common' ) {
22+ git
credentialsId :
' ffbld01_git_key' ,
poll :
false ,
url :
' [email protected] :Cloud-Integration/hip-pipeline-common.git' ,
branch :
' master' 23+ }
24+ stash includes : ' **/*' , name : ' repo'
25+ }
26+ }
1027 stage(' amd64 image build' ) {
1128 when {
1229 expression { params. BUILD_PLATFORM == ' amd64-only' || params. BUILD_PLATFORM == ' both' }
1330 }
14- agent { label ' cf_slave ' }
31+ agent { label ' label_firefly_build ' }
1532 steps {
1633 echo BRANCH_TO_BUILD
17- deleteDir()
18- checkout scm
19- dir(' ot4i-ace-docker' ) {
20- git
credentialsId :
' ffbld01_git_key' ,
poll :
false ,
url :
' [email protected] :Cloud-Integration/ot4i-ace-docker.git' ,
branch :
" ${ params.BRANCH_TO_BUILD} " 21- }
22- dir(' hip-pipeline-common' ) {
23- git
credentialsId :
' ffbld01_git_key' ,
poll :
false ,
url :
' [email protected] :Cloud-Integration/hip-pipeline-common.git' ,
branch :
' master' 24- }
25- dir(' firefly-software-build-scripts' ) {
26- git
credentialsId :
' ffbld01_git_key' ,
poll :
false ,
url :
' [email protected] :Cloud-Integration/firefly-software-build-scripts.git' ,
branch :
" ${ params.FIREFLY_SOFTWARE_BUILD_SCRIPTS_BRANCH} " 27- }
34+ unstash ' repo'
2835 withCredentials([usernamePassword(credentialsId : ' cf78bbfd-e303-4969-8cfd-cd57c3902f12' , passwordVariable : ' ARTIFACTORY_PASS' , usernameVariable : ' ARTIFACTORY_USER' ), usernamePassword(credentialsId : ' 37361c4d-f3f7-4bf4-97a0-48463a5d2091' , passwordVariable : ' GITHUB_API_TOKEN' , usernameVariable : ' GITHUB_API_USER' ), usernamePassword(credentialsId : ' cf78bbfd-e303-4969-8cfd-cd57c3902f12' , passwordVariable : ' NPM_PASS' , usernameVariable : ' NPM_USER' ), string(credentialsId : ' APPCONNECT_NPM_AUTH' , variable : ' NPM_AUTH' )]) {
2936 sh '''
3037 bash -c "
@@ -41,20 +48,10 @@ pipeline {
4148 when {
4249 expression { params. BUILD_PLATFORM == ' s390x-only' || params. BUILD_PLATFORM == ' both' }
4350 }
44- agent { label ' zlinux-ACEcc ' }
51+ agent { label ' zlinux-ubuntu ' }
4552 steps {
4653 echo BRANCH_TO_BUILD
47- deleteDir()
48- checkout scm
49- dir(' ot4i-ace-docker' ) {
50- git
credentialsId :
' ffbld01_git_key' ,
poll :
false ,
url :
' [email protected] :Cloud-Integration/ot4i-ace-docker.git' ,
branch :
" ${ params.BRANCH_TO_BUILD} " 51- }
52- dir(' hip-pipeline-common' ) {
53- git
credentialsId :
' ffbld01_git_key' ,
poll :
false ,
url :
' [email protected] :Cloud-Integration/hip-pipeline-common.git' ,
branch :
' master' 54- }
55- dir(' firefly-software-build-scripts' ) {
56- git
credentialsId :
' ffbld01_git_key' ,
poll :
false ,
url :
' [email protected] :Cloud-Integration/firefly-software-build-scripts.git' ,
branch :
" ${ params.FIREFLY_SOFTWARE_BUILD_SCRIPTS_BRANCH} " 57- }
54+ unstash ' repo'
5855 withCredentials([usernamePassword(credentialsId : ' cf78bbfd-e303-4969-8cfd-cd57c3902f12' , passwordVariable : ' ARTIFACTORY_PASS' , usernameVariable : ' ARTIFACTORY_USER' ), usernamePassword(credentialsId : ' 37361c4d-f3f7-4bf4-97a0-48463a5d2091' , passwordVariable : ' GITHUB_API_TOKEN' , usernameVariable : ' GITHUB_API_USER' ), usernamePassword(credentialsId : ' cf78bbfd-e303-4969-8cfd-cd57c3902f12' , passwordVariable : ' NPM_PASS' , usernameVariable : ' NPM_USER' ), string(credentialsId : ' APPCONNECT_NPM_AUTH' , variable : ' NPM_AUTH' )]) {
5956 sh '''
6057 bash -c "
@@ -68,21 +65,13 @@ pipeline {
6865 }
6966 }
7067 stage(' Create Docker Manifests' ) {
71- agent { label ' cf_slave ' }
68+ agent { label ' label_firefly_build ' }
7269 steps {
7370 echo BRANCH_TO_BUILD
7471 deleteDir()
7572 checkout scm
7673 withCredentials([usernamePassword(credentialsId : ' cf78bbfd-e303-4969-8cfd-cd57c3902f12' , passwordVariable : ' ARTIFACTORY_PASS' , usernameVariable : ' ARTIFACTORY_USER' )]) {
7774 sh '''
78- # the docker manifest command is an experimental feature
79- # so need to enable the docker client side experimental feature
80- mkdir /home/jenkins/.docker
81- echo '
82- {
83- "experimental": "enabled"
84- }
85- ' > /home/jenkins/.docker/config.json
8675 bash -c "
8776 pwd
8877 ls -la
0 commit comments