ci: add GitLab pipeline to bump rshell in datadog-agent on new tag#188
ci: add GitLab pipeline to bump rshell in datadog-agent on new tag#188
Conversation
…lls" This reverts commit 9e0ed9f.
|
@codex conduct a comprehensive security and code review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 20d3ba3fda
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex conduct a comprehensive security and code review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3c0ac3884b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex conduct a comprehensive security and code review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b363e85897
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex conduct a comprehensive security and code review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 47b1847a6e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex conduct a comprehensive security and code review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 810ac250e0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| branch = f"bump-rshell-{version}" | ||
|
|
||
| log(f"checking {TARGET_REPO} for existing PR with head={branch}") | ||
| existing = list(repo.get_pulls(state="open", head=f"{TARGET_REPO.split('/')[0]}:{branch}")) |
There was a problem hiding this comment.
Handle closed existing PRs before attempting create_pull
The idempotency check only looks for open PRs, so if a prior bump PR for the same bump-rshell-vX.Y.Z branch was closed, this path will still push and then call create_pull. GitHub rejects duplicate head/base PR creation for that branch, which turns retries or manual reruns for the same version into hard failures instead of a safe no-op/update path. Query state="all" (or explicitly closed) and reuse/reopen the existing PR when present.
Useful? React with 👍 / 👎.
| @@ -0,0 +1,26 @@ | |||
| name: CI scripts | |||
Summary
Adds a GitLab CI pipeline that automatically opens a draft PR on
DataDog/datadog-agentto bump the pinned rshell version whenever a new rshell tag (matchingv*.*.*) is detected.rules: - if: $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/) plus an opt-in manual path viaRun pipelineonmainwithBUMP_VERSION=vX.Y.Z.dd-octo-stsmints a short-lived GitHub token via GitLab OIDC; no static secrets anywhere.replace github.com/DataDog/rshelldirective (one-time v0.0.11 transition) →go get→dda inv tidy→ write a reno note → commit → push → open draft PR.changelog/no-changelog,ask-review; review requested from@DataDog/action-platform.Mirrors the
generate_windows_gitlab_runner_bump_prpattern already indatadog-agent/.gitlab/distribute/trigger_release/agent.yml.Prerequisites
gitlab.ddbuild.io/DataDog/rshellwith Trigger pipelines for mirror updates enabled.DataDog/datadog-agent#49490adding theself.rshell.bump-rshell-versionocto-sts policy must merge before this is effective.Test plan