forked from acoustid/acoustid-index
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
43 lines (40 loc) · 1 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
stages:
- prepare
- build
- post build
build env:
stage: prepare
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build -f ci/Dockerfile.build -t $CI_REGISTRY_IMAGE/build ci/
- docker push $CI_REGISTRY_IMAGE/build
tags:
- docker-host
build:
stage: build
image: $CI_REGISTRY_IMAGE/build
script:
- mkdir build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release ../
- make
- make check
- make package
artifacts:
paths:
- build/acoustid-index_*.deb
expire_in: 7 days
tags:
- docker
docker image:
stage: post build
script:
- mv build/acoustid-index_*.deb ci/
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build -t $CI_REGISTRY_IMAGE ci/
- docker push $CI_REGISTRY_IMAGE
- docker tag $CI_REGISTRY_IMAGE quay.io/acoustid/acoustid-index
- docker login -u $QUAY_USER -p $QUAY_PASSWORD quay.io
- docker push quay.io/acoustid/acoustid-index
tags:
- docker-host