Commit 258c1bf8 authored by Emeric Verschuur's avatar Emeric Verschuur

Add service example jobs

parent 4c8d45d4
......@@ -2,3 +2,20 @@ job-with-volumes:
image: ubuntu:16.04
volumes_from_images:
- registry.gitlab.com/ercom/cijw4gitlab:volume-sample
job-test-services-ext:
image: postgres:9.4
volumes_from_images:
- registry.gitlab.com/ercom/cijw4gitlab:volume-sample
docker_run_args:
network: bridge
services:
- mysql
- name: postgres:9.4
alias: db-postgres
wait_before_run_job: 1
entrypoint: ["docker-entrypoint.sh"]
command: ["postgres"]
docker_run_args:
privileged: true
network: bridge
stages:
- all-in-one
image: ubuntu:16.04
variables:
......@@ -11,12 +8,12 @@ after_script:
- echo "job ${CI_JOB_NAME} end"
job-minimal:
stage: all-in-one
stage: build
script:
- echo "Hello world"
job-with-before-after-script:
stage: all-in-one
stage: build
before_script:
- echo "executed before"
script:
......@@ -29,7 +26,7 @@ job-with-before-after-script:
job-advanced:
image: ubuntu:16.04
stage: all-in-one
stage: build
variables:
JOBADVAR: "${CI_JOB_NAME} JOBADVAR value"
script:
......@@ -38,10 +35,41 @@ job-advanced:
- tools/gitlab-ci/run.sh
job-with-volumes:
image: registry.gitlab.com/ercom/cijw4gitlab:1.0
stage: all-in-one
image: registry.gitlab.com/ercom/cijw4gitlab:2.0
stage: build
only:
- /^$/
script:
- test -f /path/to/my/volume/content
- 'echo "/path/to/my/volume/content file content: $(cat /path/to/my/volume/content)"'
job-test-services:
stage: build
variables:
MYSQL_DATABASE: test
MYSQL_ROOT_PASSWORD: password
only:
- /^$/
services:
- mysql
- name: postgres:9.4
alias: db-postgres
entrypoint: ["docker-entrypoint.sh"]
command: ["postgres"]
tags:
- test
script:
- "true"
job-test-services-ext:
image: registry.gitlab.com/ercom/cijw4gitlab:2.0
stage: build
variables:
MYSQL_DATABASE: test
MYSQL_ROOT_PASSWORD: password
only:
- /^$/
tags:
- test
script:
- "true"
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