forked from LREN-CHUV/mip-meta-db-setup-seed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
42 lines (34 loc) · 940 Bytes
/
.gitlab-ci.yml
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
image: docker:latest
variables:
NO_SUDO: "true"
cache:
paths:
- ~/.pre-commit
- ~/.cache/pip/
services:
- docker:dind
before_script:
- apk add --no-cache bash python py-pip git curl
- curl -sSL https://raw.githubusercontent.com/harbur/captain/v1.1.0/install.sh | bash
- docker version
- docker info
- pip install --upgrade pip pre-commit
- pip install docker-compose==1.8.1
stages:
- build
- test
- deploy
build:
stage: build
script:
- echo $USER
- pre-commit run --all-files
- PATH=$PATH:/$HOME/.captain/bin/ ./build.sh
- docker login -u $DOCKER_REPO_USER -p $DOCKER_REPO_PASSWORD registry.gitlab.com
- BUILD_DATE= VCS_REF=latest VERSION=latest WORKSPACE=. $HOME/.captain/bin/captain push target_image
test:
stage: test
script:
- docker login -u $DOCKER_REPO_USER -p $DOCKER_REPO_PASSWORD registry.gitlab.com
- PATH=$PATH:/$HOME/.captain/bin/ ./tests/test.sh