Template modifications.

This commit is contained in:
2023-01-12 00:01:03 +02:00
parent d5b40fc924
commit b0c9e87dff
2 changed files with 7 additions and 5 deletions

10
template/Jenkinsfile vendored
View File

@@ -36,10 +36,12 @@ spec:
stage('Docker Build and Push') {
steps {
container("kaniko") {
sh 'destinationRegistry=`sed -n \'s/^destinationRegistry=\(.*\)/\1/p\' < config.conf`'
sh 'imageName=`sed -n \'s/^imageName=\(.*\)/\1/p\' < config.conf`'
sh 'imageTag=`sed -n \'s/^imageTag=\(.*\)/\1/p\' < config.conf`'
sh '/kaniko/executor --dockerfile `pwd`/Dockerfile --context `pwd` --destination ${destinationRegistry}/${imageName}:${imageTag}'
sh '''
export destinationRegistry=`sed -n 's/^destinationRegistry=\\(.*\\)/\\1/p' < config.conf`
export imageName=`sed -n 's/^imageName=\\(.*\\)/\\1/p' < config.conf`
export imageTag=`sed -n 's/^imageTag=\\(.*\\)/\\1/p' < config.conf`
/kaniko/executor --dockerfile `pwd`/Dockerfile --context `pwd` --destination ${destinationRegistry}/${imageName}:${imageTag}
'''
}
}
}