generated from Templates/Utility-Image-Builder
Modified sh script to be one step.
Some checks failed
Home Cluster Builds/Image-Deploy-Arm64/pipeline/head There was a failure building this commit
Some checks failed
Home Cluster Builds/Image-Deploy-Arm64/pipeline/head There was a failure building this commit
This commit is contained in:
10
cicd/Jenkinsfile
vendored
10
cicd/Jenkinsfile
vendored
@@ -36,10 +36,12 @@ spec:
|
|||||||
stage('Docker Build and Push') {
|
stage('Docker Build and Push') {
|
||||||
steps {
|
steps {
|
||||||
container("kaniko") {
|
container("kaniko") {
|
||||||
sh 'destinationRegistry=`sed -n \'s/^destinationRegistry=\\(.*\\)/\\1/p\' < config.conf`'
|
sh """
|
||||||
sh 'imageName=`sed -n \'s/^imageName=\\(.*\\)/\\1/p\' < config.conf`'
|
destinationRegistry=`sed -n 's/^destinationRegistry=\\(.*\\)/\\1/p' < config.conf`
|
||||||
sh 'imageTag=`sed -n \'s/^imageTag=\\(.*\\)/\\1/p\' < config.conf`'
|
imageName=`sed -n 's/^imageName=\\(.*\\)/\\1/p' < config.conf`
|
||||||
sh '/kaniko/executor --dockerfile `pwd`/Dockerfile --context `pwd` --destination ${destinationRegistry}/${imageName}:${imageTag}'
|
imageTag=`sed -n 's/^imageTag=\\(.*\\)/\\1/p' < config.conf`
|
||||||
|
/kaniko/executor --dockerfile `pwd`/Dockerfile --context `pwd` --destination $destinationRegistry/$imageName:$imageTag
|
||||||
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user