-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
38 lines (32 loc) · 1004 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
image: docker:stable
services:
- docker:dind
variables:
CONTAINER_IMAGE: q2digger/jira-software
before_script:
- docker login -u $REGISTRY_USER -p $REGISTRY_PASSWORD
#build-master:
# stage: build
# script:
# - docker pull $CONTAINER_IMAGE:latest || true
# - docker build --cache-from $CONTAINER_IMAGE:latest --tag $CONTAINER_IMAGE:latest .
# - docker push $CONTAINER_IMAGE:latest
# only:
# - master
#build:
# stage: build
# script:
# - docker pull $CONTAINER_IMAGE:latest || true
# - docker build --cache-from $CONTAINER_IMAGE:latest --tag $CONTAINER_IMAGE:$CI_COMMIT_REF_NAME --tag $CONTAINER_IMAGE:latest .
# - docker push $CONTAINER_IMAGE:$CI_COMMIT_REF_NAME
# - docker push $CONTAINER_IMAGE:latest
# except:
# - master
build-tag:
stage: build
script:
- docker pull $CONTAINER_IMAGE:latest || true
- docker build --cache-from $CONTAINER_IMAGE:latest --tag $CONTAINER_IMAGE:latest .
- docker push $CONTAINER_IMAGE:latest
only:
- tags