forked from LiveCarta/LiveCartaWP
Removed redundant steps, parametrized image name, set tmp image tag
This commit is contained in:
41
Jenkinsfile
vendored
41
Jenkinsfile
vendored
@@ -9,41 +9,16 @@ pipeline {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
environment {
|
||||||
|
// LC_IMG_TAG = "${mapBranchToEnv(env.BRANCH_NAME)}"
|
||||||
|
LC_IMG_TAG = 'qa_test'
|
||||||
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Build Base QA Docker Image') {
|
stage('Build') {
|
||||||
when {
|
|
||||||
branch 'qa'
|
|
||||||
}
|
|
||||||
steps {
|
steps {
|
||||||
sh "docker build --build-arg ENV_NAME=${params.ENVIRONMENT} -t 10.50.10.93:5000/livecarta_wp:qa ."
|
sh "docker build --build-arg ENV_NAME=${params.ENVIRONMENT} -t ${env.PUSH_REGISTRY}/${LC_WP_IMG}:${LC_IMG_TAG} ."
|
||||||
sh 'docker push 10.50.10.93:5000/livecarta_wp:qa'
|
sh 'docker push ${env.PUSH_REGISTRY}/${LC_WP_IMG}:${LC_IMG_TAG}'
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Build Base DEV Docker Image') {
|
|
||||||
when {
|
|
||||||
branch 'develop'
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
sh "docker build --build-arg ENV_NAME=${params.ENVIRONMENT} -t 10.50.10.93:5000/livecarta_wp:dev ."
|
|
||||||
sh 'docker push 10.50.10.93:5000/livecarta_wp:dev'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Build Base PROD Docker Image') {
|
|
||||||
when {
|
|
||||||
branch 'master'
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
sh "docker build --build-arg ENV_NAME=${params.ENVIRONMENT} -t 10.50.10.93:5000/livecarta_wp:prod ."
|
|
||||||
sh 'docker push 10.50.10.93:5000/livecarta_wp:prod'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Build Base WL Docker Image') {
|
|
||||||
when {
|
|
||||||
branch 'wl'
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
sh "docker build --build-arg ENV_NAME=${params.ENVIRONMENT} -t 10.50.10.93:5000/livecarta_wp:wl ."
|
|
||||||
sh 'docker push 10.50.10.93:5000/livecarta_wp:wl'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user