pull/144/head
commit
8016196b9a
@ -1,30 +1,41 @@
|
||||
pipeline {
|
||||
agent {
|
||||
node {
|
||||
label 'willa'
|
||||
agent {
|
||||
node {
|
||||
label 'willa'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
stages {
|
||||
stage('build') {
|
||||
steps {
|
||||
sh 'cd /home/administrator/apps/$IMAGE_NAME/;docker build -t registry.willaspace.com/willaspace/$IMAGE_NAME:latest .'
|
||||
sh 'cd /home/administrator/apps/$IMAGE_NAME/;sudo ./BuildDocker'
|
||||
}
|
||||
stages {
|
||||
stage('build') {
|
||||
when {
|
||||
branch 'master'
|
||||
}
|
||||
steps {
|
||||
sh 'cd /home/administrator/apps/${IMAGE_NAME}/;docker build -t registry.willaspace.com/willaspace/${IMAGE_NAME}:latest .'
|
||||
sh 'cd /home/administrator/apps/${IMAGE_NAME}/;sudo ./BuildDocker'
|
||||
}
|
||||
}
|
||||
stage('deploy to production') {
|
||||
when {
|
||||
branch 'master'
|
||||
}
|
||||
steps {
|
||||
sh 'cd /home/administrator/apps/${IMAGE_NAME}/ ; docker-compose up -d'
|
||||
sh 'docker exec willaengine bash -c "COMPOSER=composer-prod.json composer update"'
|
||||
sh 'docker exec willaengine service cron start'
|
||||
sh 'docker exec willaengine php artisan config:cache'
|
||||
sh 'docker exec willaengine php artisan route:cache'
|
||||
}
|
||||
}
|
||||
stage('deploy to staging') {
|
||||
when {
|
||||
branch 'dev'
|
||||
}
|
||||
steps {
|
||||
sh 'echo ${IMAGE_NAME}-staging comming soon ...'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('deploy') {
|
||||
steps {
|
||||
sh 'cd /home/administrator/apps/$IMAGE_NAME/ ; docker-compose up -d'
|
||||
sh 'docker exec willaengine bash -c "COMPOSER=composer-prod.json composer update"'
|
||||
sh 'docker exec willaengine service cron start'
|
||||
sh 'docker exec willaengine php artisan config:cache'
|
||||
sh 'docker exec willaengine php artisan route:cache'
|
||||
}
|
||||
environment {
|
||||
IMAGE_NAME = 'willaengine'
|
||||
}
|
||||
|
||||
}
|
||||
environment {
|
||||
IMAGE_NAME = 'willaengine'
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in new issue