Template modifications.
This commit is contained in:
10
template/Jenkinsfile
vendored
10
template/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`'
|
export destinationRegistry=`sed -n 's/^destinationRegistry=\\(.*\\)/\\1/p' < config.conf`
|
||||||
sh 'imageTag=`sed -n \'s/^imageTag=\(.*\)/\1/p\' < config.conf`'
|
export imageName=`sed -n 's/^imageName=\\(.*\\)/\\1/p' < config.conf`
|
||||||
sh '/kaniko/executor --dockerfile `pwd`/Dockerfile --context `pwd` --destination ${destinationRegistry}/${imageName}:${imageTag}'
|
export imageTag=`sed -n 's/^imageTag=\\(.*\\)/\\1/p' < config.conf`
|
||||||
|
/kaniko/executor --dockerfile `pwd`/Dockerfile --context `pwd` --destination ${destinationRegistry}/${imageName}:${imageTag}
|
||||||
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ rm cicd/Jenkinsfilee
|
|||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Removing template folder"
|
echo "Removing template folder"
|
||||||
# rm -rf template
|
rm -rf template
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Thank you! Happy building..."
|
echo "Thank you! Happy building..."
|
||||||
|
|||||||
Reference in New Issue
Block a user