-
Notifications
You must be signed in to change notification settings - Fork 10
/
.gitlab-ci.yml
39 lines (33 loc) · 1000 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
image: docker:stable
services:
- docker:dind
variables:
DOCKER_TLS_CERTDIR: "/certs"
before_script:
- apk add git make
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker pull $CI_REGISTRY_IMAGE:dev || true # pull dev image for build cache
build-dev: # build dev branch for continuous deployment
stage: build
tags:
- askcos
script:
- make push VERSION=$(git describe --tags --always) REGISTRY=$CI_REGISTRY_IMAGE TAG=dev CORE_VERSION=dev
only:
- dev
build-latest: # build latest version of the master branch
stage: build
tags:
- askcos
script:
- make push VERSION=$(git describe --tags --abbrev=0) REGISTRY=$CI_REGISTRY_IMAGE TAG=latest CORE_VERSION=latest
only:
- master
build-release: # build all releases, as determined by tags
stage: build
tags:
- askcos
script:
- make push VERSION=$CI_COMMIT_TAG REGISTRY=$CI_REGISTRY_IMAGE TAG=$CI_COMMIT_TAG CORE_VERSION=$CI_COMMIT_TAG
only:
- tags