Skip to content

Commit 9fa0094

Browse files
ci: publish CI images to internal registry first (#4002)
1 parent 0271b2a commit 9fa0094

25 files changed

Lines changed: 542 additions & 383 deletions

.github/workflows/prof_asan.yml

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
CARGO_TARGET_DIR: /tmp/build-cargo
2222
RUST_TOOLCHAIN: nightly-2025-06-13
2323
container:
24-
image: datadog/dd-trace-ci:php-${{matrix.php-version}}_bookworm-8
24+
image: datadog/dd-trace-ci:php-${{matrix.php-version}}_bookworm-9
2525
# https://docs.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions#user
2626
options: --user root
2727

@@ -86,7 +86,7 @@ jobs:
8686
CARGO_TARGET_DIR: /tmp/build-cargo
8787
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
8888
container:
89-
image: datadog/dd-trace-ci:php-8.5_bookworm-8
89+
image: datadog/dd-trace-ci:php-8.5_bookworm-9
9090
options: --user root
9191

9292
steps:
@@ -127,25 +127,6 @@ jobs:
127127
cargo build --profile profiler-release
128128
cp -v "$CARGO_TARGET_DIR/profiler-release/libdatadog_php_profiling.so" "$(php-config --extension-dir)/datadog-profiling.so"
129129
130-
# TODO(parallel): the php-8.5_bookworm-8 image ships parallel 1.2.13, which
131-
# has a bug that intermittently trips UBSAN. Install the fixed 1.2.14 over
132-
# it (ZTS-only; parallel requires ZTS). Remove this step once the CI images
133-
# are rebuilt with parallel >= 1.2.14.
134-
- name: Install fixed parallel 1.2.14 (ZTS only, temporary until images rebuilt)
135-
if: matrix.php-build == 'zts'
136-
run: |
137-
set -eux
138-
switch-php zts
139-
scan_dir="$(php -r 'echo PHP_CONFIG_FILE_SCAN_DIR;')"
140-
# pecl refuses to reinstall while the extension is loaded, so move its
141-
# ini aside during the build, then restore it so the test run loads the
142-
# freshly installed parallel.so. Use the direct package URL because the
143-
# channel REST cache in the image can lag behind new releases.
144-
mv "$scan_dir/parallel.ini" /tmp/parallel.ini.disabled
145-
yes '' | pecl install -f https://pecl.php.net/get/parallel-1.2.14.tgz
146-
mv /tmp/parallel.ini.disabled "$scan_dir/parallel.ini"
147-
php --ri parallel | grep -i version
148-
149130
- name: Run phpt tests
150131
run: |
151132
set -eux

.gitlab-ci.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ stages:
33
- tests
44
- deploy
55
- ci-build
6+
- ci-publish
67
- merge-gate
78

89
variables:
@@ -18,7 +19,6 @@ include:
1819
- project: DataDog/apm-reliability/libdatadog-build
1920
ref: 5826819695d93286569e70ed087ae6bf906ce2c3
2021
file: templates/ci_authenticated_job.yml
21-
- local: .gitlab/ci-images.yml
2222

2323
generate-templates:
2424
stage: build
@@ -57,6 +57,7 @@ generate-templates:
5757
- php ./.gitlab/generate-appsec.php | tee .gitlab/appsec-gen.yml
5858
- php ./.gitlab/generate-profiler.php | tee .gitlab/profiler-gen.yml
5959
- php ./.gitlab/generate-shared.php | tee .gitlab/shared-gen.yml
60+
- php ./.gitlab/generate-ci-images.php | tee .gitlab/ci-images-gen.yml
6061
variables:
6162
GIT_SUBMODULE_STRATEGY: none
6263
artifacts:
@@ -90,6 +91,22 @@ appsec-trigger:
9091
PARENT_PIPELINE_ID: $CI_PIPELINE_ID
9192
GIT_SUBMODULE_PATHS: libdatadog appsec/third_party/cpp-base64 appsec/third_party/libddwaf appsec/third_party/libddwaf-rust appsec/third_party/msgpack-c
9293

94+
# Manual maintenance pipeline that (re)builds the CI Docker images. Generated
95+
# from dockerfiles/ci/*/docker-compose.yml + .env so versions live in one place.
96+
# No strategy: depend — the parent must not wait on these manual jobs.
97+
ci-images:
98+
stage: ci-build
99+
rules:
100+
- when: manual
101+
allow_failure: true
102+
needs:
103+
- job: generate-templates
104+
artifacts: true
105+
trigger:
106+
include:
107+
- artifact: .gitlab/ci-images-gen.yml
108+
job: generate-templates
109+
93110
profiler-trigger:
94111
stage: tests
95112
needs: [ "generate-templates" ]

.gitlab/ci-images.yml

Lines changed: 0 additions & 214 deletions
This file was deleted.

.gitlab/generate-appsec.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"test appsec extension":
7272
stage: test
7373
extends: .appsec_test
74-
image: registry.ddbuild.io/images/mirror/datadog/dd-trace-ci:php-${PHP_MAJOR_MINOR}_bookworm-8
74+
image: registry.ddbuild.io/ci/dd-trace-php/dd-trace-ci:php-${PHP_MAJOR_MINOR}_bookworm-9
7575
variables:
7676
KUBERNETES_CPU_REQUEST: 3
7777
KUBERNETES_CPU_LIMIT: 3
@@ -392,7 +392,7 @@
392392
"appsec code coverage":
393393
stage: test
394394
extends: .appsec_test
395-
image: registry.ddbuild.io/images/mirror/datadog/dd-trace-ci:php-8.3_bookworm-8
395+
image: registry.ddbuild.io/ci/dd-trace-php/dd-trace-ci:php-8.3_bookworm-9
396396
variables:
397397
KUBERNETES_CPU_REQUEST: 3
398398
KUBERNETES_MEMORY_REQUEST: 3Gi
@@ -514,7 +514,7 @@
514514
"appsec lint":
515515
stage: test
516516
extends: .appsec_test
517-
image: registry.ddbuild.io/images/mirror/datadog/dd-trace-ci:php-8.3_bookworm-8
517+
image: registry.ddbuild.io/ci/dd-trace-php/dd-trace-ci:php-8.3_bookworm-9
518518
variables:
519519
KUBERNETES_CPU_REQUEST: 3
520520
KUBERNETES_MEMORY_REQUEST: 9Gi
@@ -536,7 +536,7 @@
536536
"test appsec helper asan":
537537
stage: test
538538
extends: .appsec_test
539-
image: registry.ddbuild.io/images/mirror/datadog/dd-trace-ci:bookworm-8
539+
image: registry.ddbuild.io/ci/dd-trace-php/dd-trace-ci:bookworm-9
540540
variables:
541541
KUBERNETES_CPU_REQUEST: 3
542542
KUBERNETES_MEMORY_REQUEST: 3Gi
@@ -562,7 +562,7 @@
562562
#"fuzz appsec helper":
563563
# stage: test
564564
# extends: .appsec_test
565-
# image: registry.ddbuild.io/images/mirror/datadog/dd-trace-ci:bookworm-8
565+
# image: registry.ddbuild.io/ci/dd-trace-php/dd-trace-ci:bookworm-9
566566
# variables:
567567
# KUBERNETES_CPU_REQUEST: 3
568568
# KUBERNETES_MEMORY_REQUEST: 5Gi

0 commit comments

Comments
 (0)