forked from breez/lnd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
39 lines (32 loc) · 1.25 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
stages:
- build-check
- build-staging
- build-production
image: docker:stable
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: "" # HOTFIX?
services:
- docker:dind
build-check:
stage: build-check
script:
- docker build -t registry.gitlab.com/clovrlabs/elenwallet/lnd:$CI_COMMIT_REF_NAME -f ./Dockerfile_clovrwallet .
rules:
- if: '$CI_COMMIT_REF_NAME != "clovrwallet-develop" && $CI_PIPELINE_SOURCE == "merge_request_event"'
build-staging:
stage: build-staging
script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
- docker build -t registry.gitlab.com/clovrlabs/elenwallet/lnd:$CI_COMMIT_REF_NAME -f ./Dockerfile_clovrwallet .
- docker push registry.gitlab.com/clovrlabs/elenwallet/lnd:$CI_COMMIT_REF_NAME
rules:
- if: '$CI_COMMIT_REF_NAME == "clovrwallet-develop" && $CI_PIPELINE_SOURCE != "merge_request_event"'
build-production:
stage: build-production
script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
- docker build -t registry.gitlab.com/clovrlabs/elenwallet/lnd:$CI_COMMIT_TAG -f ./Dockerfile_clovrwallet .
- docker push registry.gitlab.com/clovrlabs/elenwallet/lnd:$CI_COMMIT_TAG
rules:
- if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+$/'