-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
49 lines (39 loc) · 959 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
43
44
45
46
47
48
49
services:
- docker:dind
.test: &test-script |
docker build -t test .
mkdir -p build
docker run --rm -v $(pwd)/build:/build test -- cp -r /usr/share/nginx/html/ /build
.beta: &beta-script |
docker build -t private.parrot.run/website:beta .
docker login -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_PASSWORD private.parrot.run
docker push private.parrot.run/website:beta
.prod: &prod-script |
docker build -t private.parrot.run/website:latest .
docker login -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_PASSWORD private.parrot.run
docker push private.parrot.run/website:latest
build_production:
stage: build
only:
- master
image: docker:latest
script:
- *prod-script
build_beta:
stage: build
only:
- beta
image: docker:latest
script:
- *beta-script
build_test:
stage: build
except:
- beta
- master
image: docker:latest
artifacts:
paths:
- build
script:
- *test-script