Commit 0b995324 authored by deathstar's avatar deathstar

Update .gitlab-ci.yml

parent 6a36584f
image: docker:latest
# When using dind, it wise to use the overlayfs driver for
# improved performance.
variables:
DOCKER_DRIVER: overlay
services:
- docker:dind
before_script:
- apk add --no-cache python python-dev py-pip build-base gcc wget git libffi-dev openssl-dev openssl
- pip install docker-compose
stages:
- build
- test
- deploy
step-develop:
stage: test
before_script:
- export DYNAMIC_ENV_VAR=DEVELOP
only:
- develop
tags:
- develop
script:
- echo running tests in $DYNAMIC_ENV_VAR
step-uat:
stage: deploy
before_script:
- export DYNAMIC_ENV_VAR=UAT
only:
- uat
tags:
- uat
script:
- echo setting up env $DYNAMIC_ENV_VAR
- sudo apt-get install -y python-pip
- sudo pip install docker-compose
- sudo docker image prune -f
- sudo docker-compose -f docker-compose.yml build --no-cache
- sudo docker-compose -f docker-compose.yml up -d
step-deploy-staging:
stage: deploy
before_script:
- export DYNAMIC_ENV_VAR=STAGING
only:
- staging
tags:
- staging
script:
- echo setting up env $DYNAMIC_ENV_VAR
- sudo apt-get install -y python-pip
- sudo pip install docker-compose
- sudo docker image prune -f
- sudo docker-compose -f docker-compose.yml build --no-cache
- sudo docker-compose -f docker-compose.yml up -d
build:
stage: build
step-deploy-production:
stage: deploy
before_script:
- export DYNAMIC_ENV_VAR=PRODUCTION
only:
- production
tags:
- production
script:
- docker-compose build
- docker-compose up -d
\ No newline at end of file
- echo setting up env $DYNAMIC_ENV_VAR
- sudo apt-get install -y python-pip
- sudo pip install docker-compose
- sudo docker image prune -f
- sudo docker-compose -f docker-compose.yml build --no-cache
- sudo docker-compose -f docker-compose.yml up -d
when: manual
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment