forked from rigetti/docker-lisp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
58 lines (54 loc) · 1.23 KB
/
.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
50
51
52
53
54
55
56
57
58
variables:
IMAGE: rigetti/lisp
.docker:
image: docker:stable
stage: deploy
tags:
- dockerd
- github
# only run when the IMAGE variable exists and is not null
only:
variables:
- $IMAGE
variables:
LATEST: ${IMAGE}:latest
before_script:
- docker -v
# needed for executing the Makefile
- apk add make
- echo ${IMAGE}
- echo ${DOCKERHUB_PASSWORD} | docker login -u ${DOCKERHUB_USERNAME} --password-stdin
- eval VERSION=$(cat VERSION-QUICKLISP.txt)
- RELEASE=${IMAGE}:${VERSION}
after_script:
- docker rmi $(docker images --format '{{.Repository}}:{{.Tag}}' | grep ${IMAGE})
docker-edge:
extends: .docker
only:
refs:
- master
script:
- make
- docker tag ${RELEASE} ${LATEST}
- docker push ${RELEASE} && docker push ${LATEST}
docker-nightly:
extends: .docker
# matches only on the scheduled nightly build
only:
- schedules
script:
- make
- docker tag ${RELEASE} ${LATEST}
- docker push ${RELEASE} && docker push ${LATEST}
docker-test:
extends: .docker
# matches only on non-master branches
only:
refs:
- branches
except:
refs:
- master
# just builds the docker image, without pushing
script:
- make