-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
159 lines (149 loc) · 4.13 KB
/
.gitlab-ci.yml
File metadata and controls
159 lines (149 loc) · 4.13 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
image: alpine
variables:
REGISTRY: registry.ddbuild.io
PREPARE_IMAGE: registry.ddbuild.io/images/benchmarking-platform-tools-ubuntu:latest
# Image with dd-octo-sts for GitHub token exchange (check-image-updates, rebuild-images-pr)
DD_OCTO_STS_IMAGE: registry.ddbuild.io/images/dd-octo-sts-ci-base:2025.06-1
FORCE_BUILD:
value: ""
description: "Force build even if no new commits (any non-empty value)"
default:
tags: ["arch:amd64"]
interruptible: true
before_script:
- '[ "${CANCELLED:-}" != "true" ] || { echo "No PR for this branch — skipping job"; exit 0; }'
stages:
- images
- generate-signing-key
- prepare
- build
- stresstest
- deploy
- integration-test
- reliability
- benchmarks
- notify
# Detects newer images in registry and creates GitHub PR with updates
check-image-updates:
stage: images
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule" && $CHECK_IMAGE_UPDATES == "true"'
when: always
- if: '$CI_PIPELINE_SOURCE == "web"'
when: manual
allow_failure: true
extends: .bootstrap-gh-tools
tags: ["arch:arm64"]
image: ${DD_OCTO_STS_IMAGE}
id_tokens:
DDOCTOSTS_ID_TOKEN:
aud: dd-octo-sts
script:
- set -euo pipefail
- echo "Checking for image updates..."
- .gitlab/scripts/check-image-updates.sh > updates.json
- |
update_count=$(jq 'length' updates.json)
echo "Found ${update_count} update(s)"
if [ "$update_count" -gt 0 ]; then
echo "Updates available:"
jq . updates.json
.gitlab/scripts/create-image-update-pr.sh updates.json
else
echo "All images are up to date"
fi
artifacts:
when: always
paths:
- updates.json
expire_in: 7 days
rebuild-images:
stage: images
rules:
- if: '$CI_COMMIT_TAG'
when: never
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: never
- when: manual
allow_failure: true
tags: ["arch:amd64"]
variables:
REBUILD_IMAGES: "" # comma/space-separated short names, or empty = all
image: ${DOCKER_IMAGE}
id_tokens:
DDSIGN_ID_TOKEN:
aud: image-integrity
script:
- set -euo pipefail
- .gitlab/scripts/rebuild-images.sh
artifacts:
when: always
paths:
- updates.json
expire_in: 1 day
rebuild-images-pr:
stage: images
rules:
- if: '$CI_COMMIT_TAG'
when: never
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: never
- when: on_success
needs:
- job: rebuild-images
artifacts: true
extends: .bootstrap-gh-tools
tags: ["arch:arm64"]
image: ${DD_OCTO_STS_IMAGE}
id_tokens:
DDOCTOSTS_ID_TOKEN:
aud: dd-octo-sts
script:
- set -euo pipefail
- .gitlab/scripts/create-image-update-pr.sh updates.json
create_key:
stage: generate-signing-key
when: manual
needs: []
tags: ["arch:amd64"]
variables:
PROJECT_NAME: "java-profiler"
EXPORT_TO_KEYSERVER: "true"
KUBERNETES_SERVICE_ACCOUNT_OVERWRITE: java-profiler
image: $REGISTRY/ci/agent-key-management-tools/gpg:1
script:
- /create.sh
artifacts:
expire_in: 13 mos
paths:
- pubkeys
# Shared version detection used by benchmarks and reliability pipelines
get-versions:
extends: .get-versions
needs:
- job: prepare:start
artifacts: false
# Triggered externally from async-profiler-build with JDK build parameters;
# kept as a child pipeline because it is mutually exclusive with the main build
jdk-integration-test:
stage: build
rules:
- if: '$JDK_VERSION == null || $DEBUG_LEVEL == null || $HASH == null || $DOWNSTREAM == null'
when: never
- if: '$CI_PIPELINE_SOURCE == "trigger" || $CI_PIPELINE_SOURCE == "pipeline" || $CI_PIPELINE_SOURCE == "web"'
when: always
allow_failure: false
- when: always
trigger:
include: .gitlab/jdk-integration/.gitlab-ci.yml
strategy: depend
forward:
pipeline_variables: true
include:
- local: .gitlab/common.yml
- local: .adms/python/gitlab.yaml
- local: .gitlab/benchmarks/images.yml
- local: .gitlab/build-deploy/images.yml
- local: .gitlab/build-deploy/.gitlab-ci.yml
- local: .gitlab/benchmarks/.gitlab-ci.yml
- local: .gitlab/reliability/.gitlab-ci.yml