-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
42 lines (34 loc) · 1.08 KB
/
.gitlab-ci.yml
File metadata and controls
42 lines (34 loc) · 1.08 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
stages:
- build
- test
# configuring code quality checks
# include:
# - template: Code-Quality.gitlab-ci.yml
# code_quality:
# artifacts:
# paths: [gl-code-quality-report.json]
# building the docker in docker, docker-ception!!
# this is so we start on a clean environment when we build docker
# SBT does wonky business with docker when building in an existing env
image: docker:19.03.1
services:
- docker:19.03.1-dind
variables:
# TODO: should use tls
DOCKER_TLS_CERTDIR: ""
CONTAINER_TEST_IMAGE: gitlab.doc.ic.ac.uk:4567/lab1920_spring/wacc_11:wacc-frontend
DOCKER_DRIVER: overlay2
# TODO: change these to environmental vars we shouldnt be exposing the deploy token
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD gitlab.doc.ic.ac.uk:4567
build:
stage: build
script:
- docker pull $CONTAINER_TEST_IMAGE || true
- docker build --cache-from $CONTAINER_TEST_IMAGE -t $CONTAINER_TEST_IMAGE .
- docker push $CONTAINER_TEST_IMAGE
test:
stage: test
script:
- docker pull $CONTAINER_TEST_IMAGE
- docker run $CONTAINER_TEST_IMAGE