Skip to content

Commit 4909589

Browse files
authored
Merge branch 'master' into stephan.koshcheev/RUM-17237/add-rum-shopify-documentation
2 parents 403fec4 + 9c197fe commit 4909589

26 files changed

Lines changed: 410 additions & 65 deletions
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Allows the protected integrations-extras GitLab release job to dispatch the
2+
# post-tag GitHub wheel workflow. GitHub exposes workflow dispatch through the
3+
# repository-wide actions:write permission; the token cannot write contents or tags.
4+
issuer: https://gitlab.ddbuild.io
5+
subject: project_path:DataDog/integrations-extras:ref_type:branch:ref:master
6+
7+
claim_pattern:
8+
ci_config_ref_uri: gitlab\.ddbuild\.io/DataDog/integrations-extras//\.gitlab-ci\.yml@refs/heads/master
9+
pipeline_source: push
10+
project_path: DataDog/integrations-extras
11+
ref_protected: "true"
12+
ref_path: refs/heads/master
13+
14+
permissions:
15+
actions: write

.github/chainguard/self.release.tag-push.sts.yaml

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

.github/workflows/release-trigger.yml

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
name: Trigger Wheel Builds
22

3-
# Thin wrapper — all tagging and dispatch logic lives in integrations-core's
4-
# reusable release-dispatch.yml workflow.
3+
# The legacy GitLab release job owns signing and tag creation. This receiver
4+
# delegates detection, validation, and wheel dispatch to integrations-core.
55

66
on:
7-
push:
8-
branches:
9-
- master
10-
paths:
11-
- "*/CHANGELOG.md"
12-
- "*/datadog_checks/*/__about__.py"
7+
# Automatic push triggering is intentionally disabled. The legacy GitLab release
8+
# job dispatches this workflow with the exact signed SHA after pushing all tags.
139
workflow_dispatch:
1410
inputs:
1511
packages:
@@ -32,6 +28,10 @@ on:
3228
required: false
3329
type: string
3430

31+
concurrency:
32+
group: release-${{ inputs.source-repo-ref }}
33+
cancel-in-progress: false
34+
3535
jobs:
3636
context:
3737
name: Detect release context
@@ -47,25 +47,19 @@ jobs:
4747
echo "is-stable-release=false" >> "$GITHUB_OUTPUT"
4848
fi
4949
50-
approve:
51-
name: Await release approval
52-
needs: context
53-
runs-on: ubuntu-latest
54-
environment: release
55-
steps:
56-
- run: echo "Release approved"
57-
5850
dispatch:
5951
name: Release
60-
needs: [context, approve]
52+
needs: context
6153
uses: DataDog/integrations-core/.github/workflows/release-dispatch.yml@master
6254
with:
6355
source-repo: integrations-extras
6456
packages: ${{ inputs.packages || '' }}
65-
source-repo-ref: ${{ inputs.source-repo-ref || github.sha }}
57+
source-repo-ref: ${{ inputs.source-repo-ref }}
58+
source-repo-branch: master
59+
create-tags: false
6660
dry-run: ${{ inputs.dry-run || false }}
6761
ddev-version: ${{ inputs.ddev-version || '' }}
6862
is-stable-release: ${{ needs.context.outputs.is-stable-release }}
6963
permissions:
7064
id-token: write
71-
contents: write
65+
contents: read

.gitlab-ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ workflow:
1616
release-auto:
1717
stage: release
1818
image: $TAGGER_IMAGE
19+
id_tokens:
20+
DDOCTOSTS_ID_TOKEN:
21+
aud: dd-octo-sts
1922
script:
2023
- ddev --version
2124
- ddev config set repos.extras .
@@ -24,5 +27,5 @@ release-auto:
2427
- eval "$(ssh-agent -s)"
2528
- ./.gitlab/release/git-auth.sh
2629
# Prefix every line with a timestamp
27-
- ./.gitlab/release/tag-release.sh 2>&1 | ts "[%H:%M:%S %Z] "
30+
- set -o pipefail; ./.gitlab/release/tag-release.sh 2>&1 | ts "[%H:%M:%S %Z] "
2831
tags: ["arch:amd64"]
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
IFS=$'\n\t'
4+
5+
SOURCE_REPO_REF=$(git rev-parse HEAD)
6+
if [[ ! "$SOURCE_REPO_REF" =~ ^[0-9a-f]{40}$ ]]; then
7+
echo "Expected a full signed commit SHA, got: $SOURCE_REPO_REF" >&2
8+
exit 1
9+
fi
10+
11+
payload=$(printf '{"ref":"master","inputs":{"source-repo-ref":"%s"}}' "$SOURCE_REPO_REF")
12+
13+
echo "Dispatching autonomous wheel publishing for integrations-extras@$SOURCE_REPO_REF"
14+
set +x
15+
DISPATCH_TOKEN=$(dd-octo-sts token \
16+
--scope DataDog/integrations-extras \
17+
--policy self.gitlab.release.dispatch-wheel-publishing)
18+
trap 'set +x; dd-octo-sts revoke -t "$DISPATCH_TOKEN" 2>/dev/null || true' EXIT
19+
20+
# A lost success response can produce a duplicate dispatch. That is safe: each
21+
# run uses the same source SHA and downstream TUF writes are retry-safe.
22+
curl --fail-with-body --silent --show-error \
23+
--retry 3 --retry-all-errors --retry-delay 2 --max-time 30 \
24+
--request POST \
25+
--header "Accept: application/vnd.github+json" \
26+
--header "Authorization: Bearer $DISPATCH_TOKEN" \
27+
--header "X-GitHub-Api-Version: 2022-11-28" \
28+
--data "$payload" \
29+
https://api.github.com/repos/DataDog/integrations-extras/actions/workflows/release-trigger.yml/dispatches

.gitlab/release/tag-release.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ if [[ $status -eq 0 ]]; then
1414
# Order of steps matter as we want the tag to point to the signing commit.
1515
# 1. Sign
1616
# 2. Create tag(s)
17-
# 3. Trigger the build pipeline
17+
# 3. Trigger the legacy build pipeline
18+
# 4. Dispatch autonomous wheel publishing from the signed, tagged commit
1819
./.gitlab/release/sign-release.sh
1920
ddev release tag all
2021
./.gitlab/release/build-packages.sh
22+
./.gitlab/release/dispatch-wheel-publishing.sh
2123
elif [[ $status -eq 2 ]]; then
2224
echo "No new releases, skipping the build pipeline trigger"
2325
else

.in-toto/tag.4912ca73.link

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)