forked from mvitale1989/docker-taiga
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
34 lines (30 loc) · 1.07 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
---
stages:
- build
variables:
GIT_SUBMODULE_STRATEGY: normal
PROD_REGISTRY: https://index.docker.io/v1/
PROD_REGISTRY_USER: mvitale1989
PROD_REGISTRY_IMAGE: index.docker.io/mvitale1989/docker-taiga
before_script:
- mkdir -p /kaniko/.docker
- |
echo "{\"auths\": { \"$PROD_REGISTRY\": {\"auth\": \"`echo -n $PROD_REGISTRY_USER:$PROD_REGISTRY_PASSWORD | base64`\"}, \"$CI_REGISTRY\": {\"auth\": \"`echo -n gitlab-ci-token:$CI_JOB_TOKEN | base64`\"} }}" > /kaniko/.docker/config.json
build-dev:
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: ["/busybox/sh", "-c"]
script:
- /kaniko/executor --context $CI_PROJECT_DIR --destination $PROD_REGISTRY_IMAGE:latest --reproducible --cache --cache-repo=$CI_REGISTRY_IMAGE
except:
- tags
build-prod:
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: ["/busybox/sh", "-c"]
script:
- /kaniko/executor --context $CI_PROJECT_DIR --destination $PROD_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME --reproducible --cache --cache-repo $CI_REGISTRY_IMAGE
only:
- tags