Commit 679988bd authored by Thierry Bressure's avatar Thierry Bressure
Browse files

Add .gitlab-ci.yml

parent d40e96bf
Pipeline #98 passed with stages
in 13 minutes and 20 seconds
image:
name: docker/compose:1.24.0
entrypoint: [""]
before_script:
- docker info
- docker-compose version
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/
# 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:8082/
only:
- master
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:8082/
only:
- master
when: manual
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