Skip to content

Commit 5d5f327

Browse files
committed
chore: add supported-configurations v2
This adds the supported-configurations.json to php. That file is auto generated from configuration.h. As long as they are in sync, things will work easily. The validation step verifies in the CI if the file got updated or not and would fail, if a change was added without committing. The one pipeline CI checks are added as well to make sure new configurations are added to the central repository before the PR that adds the config lands.
1 parent 32aaf0a commit 5d5f327

File tree

4 files changed

+3047
-0
lines changed

4 files changed

+3047
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Validate supported configurations
2+
3+
on:
4+
pull_request:
5+
push:
6+
7+
jobs:
8+
validate-supported-configurations:
9+
name: validate supported configurations
10+
runs-on: ubuntu-24.04
11+
permissions:
12+
contents: read
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
17+
with:
18+
fetch-depth: 0
19+
clean: true
20+
21+
- name: Verify supported configurations are in sync
22+
run: |
23+
python3 tooling/generate-supported-configurations.py
24+
25+
if ! git diff --exit-code -- metadata/supported-configurations.json ext/configuration.h; then
26+
echo "ERROR: @metadata/supported-configurations.json and @ext/configuration.h got out of sync. Please run tooling/generate-supported-configurations.py locally."
27+
git --no-pager diff -- metadata/supported-configurations.json ext/configuration.h
28+
exit 1
29+
fi

.gitlab-ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
stages:
22
- build
33
- tests
4+
- shared-pipeline
45
- deploy
56
- ci-build
67

@@ -17,6 +18,7 @@ include:
1718
- project: DataDog/apm-reliability/libdatadog-build
1819
ref: 5826819695d93286569e70ed087ae6bf906ce2c3
1920
file: templates/ci_authenticated_job.yml
21+
- local: .gitlab/one-pipeline.locked.yml
2022
- local: .gitlab/ci-images.yml
2123

2224
generate-templates:
@@ -95,3 +97,17 @@ package-trigger:
9597
GIT_SUBMODULE_PATHS: libdatadog appsec/third_party/cpp-base64 appsec/third_party/libddwaf appsec/third_party/msgpack-c
9698
NIGHTLY_BUILD: $NIGHTLY_BUILD
9799
RELIABILITY_ENV_BRANCH: $RELIABILITY_ENV_BRANCH
100+
101+
validate_supported_configurations_v2_local_file:
102+
extends: .validate_supported_configurations_v2_local_file
103+
variables:
104+
LOCAL_JSON_PATH: "metadata/supported-configurations.json"
105+
BACKFILLED: "false"
106+
107+
update_central_configurations_version_range_v2:
108+
extends: .update_central_configurations_version_range_v2
109+
variables:
110+
LOCAL_REPO_NAME: "dd-trace-php"
111+
LOCAL_JSON_PATH: "metadata/supported-configurations.json"
112+
LANGUAGE_NAME: "php"
113+
MULTIPLE_RELEASE_LINES: "false"

0 commit comments

Comments
 (0)