Commit ffe9cc0c authored by Thierry Bressure's avatar Thierry Bressure
Browse files

Add new file

parent 25b2dfd9
Pipeline #221 passed with stages
in 16 minutes and 1 second
image:
name: docker/compose:1.24.0
entrypoint: [""]
before_script:
- docker info
- docker-compose version
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
stages:
- build
- test
- staging
- production
run_blog:
stage: test
tags:
- dind
- infra
- regular
variables:
# For non-Kubernetes executors, we use tcp://docker:2375/
DOCKER_HOST: tcp://docker:2375/
DOCKER_TLS_CERTDIR: ""
# When using dind, it's wise to use the overlayfs driver for
# improved performance.
DOCKER_DRIVER: overlay2
services:
- docker:dind
script:
- echo "run blog for testing"
- docker-compose up -d
- docker-compose ps
#verify_running:
# stage: test
# tags:
# image: golang # because I know it has curl installed
# script:
# - sleep 120
# - curl -v http://docker:8180
deploy_to_staging:
stage: staging
tags:
- staging
- docker
- regular
script:
- echo "deploy to staging"
- docker-compose down
- docker-compose up -d
environment:
name: staging
url: http://staging.bressure.net:8092/
on_stop: stop_staging
only:
- master
stop_staging:
stage: staging
tags:
- staging
- docker
- regular
variables:
GIT_STRATEGY: none
script:
- echo "Remove galette"
- docker-compose down
when: manual
environment:
name: staging
action: stop
deploy_to_production:
stage: production
tags:
- production
- docker
- regular
script:
- echo "deploy to production"
- docker-compose down
- docker-compose up -d
environment:
name: production
url: http://production.bressure.net:8092/
on_stop: stop_production
only:
- master
when: manual
stop_production:
stage: production
tags:
- production
- docker
- regular
variables:
GIT_STRATEGY: none
script:
- echo "Remove galette"
- docker-compose down
when: manual
environment:
name: production
action: stop
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