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 errors in publish extension workflow and add logging #829

Merged
merged 5 commits into from
Feb 10, 2022

Conversation

Jaifroid
Copy link
Member

@Jaifroid Jaifroid commented Feb 8, 2022

This should fix #823.

  • Corrects the regexp that decides which release tags to build and push to docker
  • Adds logging in the form of "echo" statements that will be visible to us in the Workflow run log

@mossroy Kindly check the bash script statements carefully with your "Linux glasses" on! I'm not very familiar with it. If it can be simplified, happy to do so.

I will create a quick test script (copy of the rewrite script in the workflow) with some sample input to be sure the rewriting works, and will test in WSL on Windows.

@Jaifroid Jaifroid requested a review from mossroy February 8, 2022 21:41
@Jaifroid Jaifroid self-assigned this Feb 8, 2022
@Jaifroid Jaifroid added bug build Code relating to building, publishing, or maintaining the app tests labels Feb 8, 2022
@Jaifroid Jaifroid added this to the v3.3 milestone Feb 8, 2022
@Jaifroid
Copy link
Member Author

Jaifroid commented Feb 8, 2022

I decided to move the script that replaces the version numbers in the app from the Workflow (where it is difficult to maintain and test) into a bash script in /scripts.

This runs correctly in a WSL bash, tested on Windows 10 Debian shell.

I have tested the workflow by publishing a test version to gh-pages using the manual workflow dispatch. I got this result. Hopefully the logging is more informative now. NB this did not publish to Docker, only to our test implementation on gh-pages.

image

@Jaifroid
Copy link
Member Author

Jaifroid commented Feb 8, 2022

image

To test it yourself, ensure you run the workflow dispatch from the branch Correct-publish-extension.... and not from master (dropdown in the Action UI).

Please note that there is a difference between the version number that we put in the files and that is displayed to the user, and the value that will be used as the docker push tag. The docker push tag is actually irrelevant to us, the user will never see it. But it is significant if we are releasing a tag.

  • For a release, the Docker push will only run if the release tag matches ^v*([0-9.]+)$.
  • For a Workflow dispatch, the user can set it to update gh-pages or update docker. The docker push will run (if selected) regardless of the value we set for the version number in that case.

Copy link
Contributor

@mossroy mossroy left a comment

Choose a reason for hiding this comment

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

I did not test but the code looks good.
I've only made some minor remarks.

scripts/rewrite_app_version_number.sh Outdated Show resolved Hide resolved
scripts/rewrite_app_version_number.sh Outdated Show resolved Hide resolved
@mossroy mossroy mentioned this pull request Feb 9, 2022
18 tasks
@mossroy mossroy modified the milestones: v3.3, v3.3.1 Feb 9, 2022
@Jaifroid
Copy link
Member Author

Jaifroid commented Feb 9, 2022

Latest regexp changes tested via test workflow, to ghpages, setting a release number of v3.3.0-testing-workflow. Initial v was successfully removed, and a version of 3.3.0-testing-workflow was set in the files, and was pushed to ghpages. I guess we won't really know for certain it's all working with Docker until we create tag for 3.3.1.

image

image

Copy link
Contributor

@mossroy mossroy left a comment

Choose a reason for hiding this comment

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

OK you can merge

@Jaifroid Jaifroid merged commit 829aaf2 into master Feb 10, 2022
@Jaifroid Jaifroid deleted the Correct-publish-extension-workflow-regex branch February 10, 2022 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug build Code relating to building, publishing, or maintaining the app tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add logging to the workflow job that updates version numbers and incorrect regular expression
2 participants