-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
executable file
·26 lines (22 loc) · 1.02 KB
/
.gitlab-ci.yml
File metadata and controls
executable file
·26 lines (22 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
image:
name: docker/compose:latest
services:
- docker:dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- apk add --no-cache docker-compose make bash rsync #perl perl-dev perl-dbi perl-test-simple perl-test-nowarnings perl-dbd-pg
- JOB_CONTAINER_ID=`docker ps -q -f "label=com.gitlab.gitlab-runner.job.id=$CI_JOB_ID"`
#- docker inspect --format '{{ range .Mounts }}{{ .Name }}{{ printf " " }}{{ .Source }}{{ printf " " }}{{ .Destination }}{{ printf "\n" }}{{ end }}' ${JOB_CONTAINER_ID}
- export ABSOLUTE_PATH=`docker inspect --format '{{ range .Mounts }}{{ if eq .Destination "/builds" }}{{ .Source }}{{ printf "\n" }}{{ end }}{{ end }}' ${JOB_CONTAINER_ID}`/${CI_PROJECT_PATH}
variables:
SHARED_PATH: $CI_PROJECT_DIR/shared
build:
stage: build
script:
- make stop
- make build
- make up
- docker-compose exec -T web echo 'Web is running'
- docker-compose exec -T database echo 'Database is running'
- make dc-init-database
- make dc-test