-
Notifications
You must be signed in to change notification settings - Fork 46
/
.gitlab-ci.yml
35 lines (33 loc) · 1.09 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
stages:
- build
kaniko_to_dev:
stage: build
tags:
- docker
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"${DOCKER_HUB_URL}\":{\"auth\":\"$(printf "%s:%s" "${DOCKER_HUB_USERNAME}" "${DOCKER_HUB_TOKEN}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
- >-
/kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--destination "jammsen/server2:${CI_COMMIT_SHORT_SHA}"
kaniko_to_prod:
stage: build
tags:
- docker
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"${DOCKER_HUB_URL}\":{\"auth\":\"$(printf "%s:%s" "${DOCKER_HUB_USERNAME}" "${DOCKER_HUB_TOKEN}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
- >-
/kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--destination "jammsen/the-forest-dedicated-server:${CI_COMMIT_SHORT_SHA}"
when: manual