Skip to content

Commit

Permalink
test check rc pr [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 14, 2025
1 parent 722fbe7 commit 4497f76
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/create_rc_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,11 @@ jobs:
--repo "$GITHUB_REPOSITORY" \
--base "$AGENT6_RELEASE_BRANCH" \
--json url,title \
--draft=false \
--search "Update release.json and Go modules for in:title")
if [ "$(echo "$prs" | jq 'length')" -gt 0 ]; then
pr_list=$(echo "$prs" | jq -r '.[] | "- \(.title): \(.url)"')
error_message="AGENT 6 ERROR: The following Agent 6 release candidate PRs already exist. Please address these PRs before creating a new release candidate:\n$pr_list"
inv release.send-slack-msg ${{ env.AGENT_CI_ONCALL_CHANNEL }} $error_message
inv release.send-slack-msg ${{ env.AGENT_CI_ONCALL_CHANNEL }} "$error_message"
echo -e "\n$error_message"
exit 1
fi
Expand All @@ -66,9 +64,9 @@ jobs:
DD_API_KEY: ${{ secrets.DD_API_KEY }}
DD_APP_KEY: ${{ secrets.DD_APP_KEY }}
run: |
error_message=$(inv release.check-agent6-build-status ${{ env.AGENT_CI_ONCALL_CHANNEL }})
error_message=$(inv release.check-agent6-build-status ${{ env.AGENT_CI_ONCALL_CHANNEL }} | tail -n 1)
if [ -n "$error_message" ]; then
echo -e "\n$error_message"
echo -e "$error_message"
exit 1
fi
Expand Down
8 changes: 4 additions & 4 deletions tasks/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -1275,10 +1275,10 @@ def update_current_milestone(ctx, major_version: int = 7, upstream="origin"):
def send_slack_msg(ctx, channel_id, message, webhook=None):
webhook = webhook or os.environ.get("SLACK_DATADOG_AGENT_CI_WEBHOOK")
payload = {
"channel_id": channel_id,
"message": message,
'channel_id': channel_id,
'message': message,
}
ctx.run(f"curl -X POST -H 'Content-Type: application/json' --data '{json.dumps(payload)}' {webhook}")
ctx.run(f'curl -X POST -H "Content-Type: application/json" --data "{payload}" {webhook}')


@task
Expand All @@ -1296,6 +1296,6 @@ def check_agent6_build_status(ctx, channel_id):
page_limit=5,
)
if not response.data:
err_msg = "AGENT 6 ERROR: No Agent 6 build pipelines have run in the past week. Please trigger a build pipeline for the next agent 6 release candidate."
err_msg = "\nAGENT 6 ERROR: No Agent 6 build pipelines have run in the past week. Please trigger a build pipeline for the next agent 6 release candidate."
send_slack_msg(ctx, channel_id, err_msg)
print(err_msg)

0 comments on commit 4497f76

Please sign in to comment.