Skip to content

Add checks to publish.groovy script#467

Merged
IgorTodorovskiIBM merged 1 commit intomainfrom
update_publish_job
Sep 28, 2023
Merged

Add checks to publish.groovy script#467
IgorTodorovskiIBM merged 1 commit intomainfrom
update_publish_job

Conversation

@IgorTodorovskiIBM
Copy link
Copy Markdown
Member

  • Sometimes the github release is not reflected in github immediately after the release is created, so I added a loop that checks up to 5 times.
  • Also, sometimes the release doesn't actually end up being created, so I make a last resort attempt and try to recreate it.
  • This should also fix an issue with multiple .version files appearing, so it only look at installed .version now.

Comment thread cicd/publish.groovy
echo "Release should now exist"
github-release info -u ${GITHUB_ORGANIZATION} -r ${GITHUB_REPO} --tag "${TAG}" -j
# check up to 5 times for the release to appear on github
for i in {1..5}; do
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure how expensive the call is but would it better to go with maybe 2 seconds and do it 25 times?
if 10s is the 'sweet spot', then i am fine with this.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From prior experience, it usually takes about 5-10s for the release to be reflected in github, so I'll stick with 10s for now and see how it goes.

@IgorTodorovskiIBM IgorTodorovskiIBM merged commit ce8b50e into main Sep 28, 2023
@MikeFultonDev MikeFultonDev deleted the update_publish_job branch September 28, 2023 18:02
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.

2 participants