-
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathbootstrap.gitlab-ci.yml
More file actions
63 lines (58 loc) · 1.35 KB
/
bootstrap.gitlab-ci.yml
File metadata and controls
63 lines (58 loc) · 1.35 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
workflow:
auto_cancel:
on_new_commit: interruptible
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when: never
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
default:
interruptible: true
retry:
max: 2
when:
- runner_system_failure
stages:
- build
.build:
stage: build
script:
- /kaniko/executor
--context $CI_PROJECT_DIR
--dockerfile deploy/Dockerfile
--destination=${IMAGE}
--cache=true
--cache-copy-layers
--cache-dir /cache/kaniko
--cache-repo ${CI_REGISTRY_IMAGE}/cache
$EXTRA_ARGS
bootstrap:
extends:
- .build
image:
name: gcr.io/kaniko-project/executor:v1.24.0-debug
entrypoint: [""]
needs: []
variables:
IMAGE: ${CI_REGISTRY_IMAGE}/bootstrap:latest
EXTRA_ARGS: >-
--build-arg=TARGETARCH=amd64
--build-arg=TARGETOS=linux
--kaniko-dir=/kaniko2
--target=kaniko-debug-2
KANIKO_DIR: /kaniko2
build:
extends:
- .build
image:
name: ${CI_REGISTRY_IMAGE}/bootstrap:latest
entrypoint: [""]
needs: [bootstrap]
variables:
IMAGE: ${CI_REGISTRY_IMAGE}/kaniko:latest
EXTRA_ARGS: >-
--build-arg=TARGETARCH=amd64
--build-arg=TARGETOS=linux
--kaniko-dir=/kaniko2
--target=kaniko-debug
KANIKO_DIR: /kaniko2