|
|
|
@ -2,27 +2,41 @@ kind: pipeline
|
|
|
|
|
type: exec
|
|
|
|
|
name: default
|
|
|
|
|
|
|
|
|
|
settings:
|
|
|
|
|
sh_key:
|
|
|
|
|
from_secret: /home/administrator/.ssh/id_rsa
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
- name: build_production
|
|
|
|
|
- name: build to production
|
|
|
|
|
commands:
|
|
|
|
|
- docker build -t registry.willaspace.com/willaspace/${IMAGE_NAME}:latest --build-arg ssh_prv_key="$(cat /home/administrator/.ssh/id_rsa)"
|
|
|
|
|
- cd /home/administrator/apps/${IMAGE_NAME}/;sudo ./BuildDocker
|
|
|
|
|
- docker build -t registry.willaspace.com/willaspace/willaengine:latest .
|
|
|
|
|
when:
|
|
|
|
|
branch:
|
|
|
|
|
- master
|
|
|
|
|
|
|
|
|
|
- name: deploy_production
|
|
|
|
|
- name: deploy to production
|
|
|
|
|
commands:
|
|
|
|
|
- cd /home/administrator/apps/${IMAGE_NAME}/ ; docker-compose up -d
|
|
|
|
|
- cd /home/administrator/apps/willaengine/ ; docker-compose up -d
|
|
|
|
|
- docker exec willaengine bash -c "COMPOSER=composer-prod.json composer update"
|
|
|
|
|
- docker exec willaengine service cron start
|
|
|
|
|
- docker exec willaengine php artisan config:cache
|
|
|
|
|
- docker exec willaengine php artisan route:cache
|
|
|
|
|
when:
|
|
|
|
|
branch:
|
|
|
|
|
- master
|
|
|
|
|
|
|
|
|
|
- name: build to staging
|
|
|
|
|
commands:
|
|
|
|
|
- docker build -t registry.willaspace.com/willaspace/willaengine-staging:latest -f Dockerfile.staging .
|
|
|
|
|
- docker build -t registry.willaspace.com/willaspace/willaengine-staging-nginx:latest -f Dockerfile.nginx .
|
|
|
|
|
when:
|
|
|
|
|
branch:
|
|
|
|
|
- dev
|
|
|
|
|
|
|
|
|
|
- name: deploy to staging
|
|
|
|
|
commands:
|
|
|
|
|
- cd /apps/willaengine-staging/ ; docker-compose up -d
|
|
|
|
|
when:
|
|
|
|
|
branch:
|
|
|
|
|
- dev
|
|
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
|
branch:
|
|
|
|
|
- master
|
|
|
|
|
|
|
|
|
|
environment:
|
|
|
|
|
- IMAGE_NAME=willaengine
|
|
|
|
|
- dev
|
|
|
|
|