Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update Curl Command for Build_URL #466

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

timckt
Copy link
Contributor

@timckt timckt commented Dec 30, 2024

  • The current variable BUILD_URL is as below:, there is an expected extra created, in the output, which caused the notifyUserApplyFailed cannot work properly and cannot send message to Slack.
→ curl -L \
                  -H "Accept: application/vnd.github+json" \
                  -H "Authorization: Bearer $GITHUB_TOKEN" \
                  -H "X-GitHub-Api-Version: 2022-11-28" \
                  "https://api.github.com/repos/ministryofjustice/cloud-platform-environments/issues/$PR/comments" | jq '.[].body' | awk '{print $9}' | tr -d '"'

Output:

created,
https://concourse.cloud-platform.service.justice.gov.uk/teams/main/pipelines/environments-live/jobs/apply-namespace-changes-live/builds/9493
  • This PR is to update the BUILD_URL curl command to:

    • Extract only the Concourse build link
    • Ensure that the extracted URL corresponds to the latest build (e.g., if builds are rerun, the output might include 100, 100.1, 100.2, etc., and the latest URL should be captured—100.2).
  • Relates to Concourse Bot not Outputting to Ask Channel cloud-platform#6578

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant