forked from LiveCarta/LiveCartaWP
Added Dockerfile and jenkins pipeline
This commit is contained in:
50
Jenkinsfile
vendored
Normal file
50
Jenkinsfile
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
parameters {
|
||||
choice(
|
||||
name: 'ENVIRONMENT',
|
||||
choices: ['dev', 'qa', 'new_prod', 'demo'],
|
||||
description: 'Environment Name for the application (e.g., dev, production etc.)'
|
||||
)
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Build Base QA Docker Image') {
|
||||
when {
|
||||
branch 'qa'
|
||||
}
|
||||
steps {
|
||||
sh "docker build --build-arg ENV_NAME=${params.ENVIRONMENT} -t 10.50.10.93:5000/livecarta_wp:qa ."
|
||||
sh 'docker push 10.50.10.93:5000/livecarta_base:qa_test'
|
||||
}
|
||||
}
|
||||
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_base:dev ."
|
||||
sh 'docker push 10.50.10.93:5000/livecarta_base: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_base:prod ."
|
||||
sh 'docker push 10.50.10.93:5000/livecarta_base: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_base:wl ."
|
||||
sh 'docker push 10.50.10.93:5000/livecarta_base:wl'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user