Created
June 11, 2017 19:19
-
-
Save emilsedgh/f079e2f51643e29e065d46f9c284568e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: docker:git | |
stages: | |
- build | |
- test | |
variables: | |
CONTAINER_IMAGE: registry.gitlab.com/rechat/server:$CI_BUILD_REF_NAME | |
before_script: | |
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com | |
build: | |
stage: build | |
services: | |
- docker:dind | |
script: | |
- docker build -t $CONTAINER_IMAGE . | |
- docker push $CONTAINER_IMAGE | |
test: | |
stage: test | |
variables: | |
POSTGRES_DB: rechat | |
POSTGRES_USER: rechat | |
POSTGRES_PASSWORD: rechat | |
services: | |
- redis:latest | |
- mdillon/postgis:9.6-alpine | |
script: | |
- apk update | |
- apk add postgresql-client | |
- export PGPASSWORD=$POSTGRES_PASSWORD | |
- psql -q -h mdillon__postgis -U rechat rechat < data/minimal.sql | |
- env > env.txt | |
- docker pull $CONTAINER_TEST_IMAGE | |
- docker run --env-file env.txt $CONTAINER_TEST_IMAGE /app/node_modules/istanbul/lib/cli.js cover --dir istanbul tests/run.js -- --curl --stop-on-fail --concurrency 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cloning repository...
Cloning into '/builds/rechat/server'...
Checking out ac64ffe2 as testing...
Skipping Git submodules setup
$ docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
Warning: failed to get default registry endpoint from daemon (Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?). Using system default: https://index.docker.io/v1/
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
ERROR: Job failed: exit code 1