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

chore(workflows): Adds workflow to release hotfix version #1511

Conversation

rafaelmag110
Copy link
Contributor

@rafaelmag110 rafaelmag110 commented Aug 23, 2024

WHAT

Adds a temporary workflow to enable the release of bugfix versions.
This workflow should be reworked as it contains duplicate code from draft-new-release and publish-new-release.
This workflow, as is, should be executed after the hotfix branch is created and all needed PRs are merged

WHY

To release 0.7.4 and since the current publish-new-release workflow doesn't work for hotfix releases.

FURTHER NOTES

  • The workflow should be released manually and only runs for branches that match the hotfix/* pattern.
  • The workflow doesn't merge to main. It also doesn't update the project version.
  • The workflow also creates the "Prepare Release X.Y.Z" commit that changes the version in all needed files to the one provided as workflow input (similar to draft-new-release workflow).
  • A validation job was added as entry gate to verify if a tag already exists for the input provided on workflow dispatch.
  • The released version will not be the latest.

@rafaelmag110 rafaelmag110 changed the title chore(workflows): Adds workflow to release hotfix verions chore(workflows): Adds workflow to release hotfix version Aug 23, 2024
.github/workflows/publish-hotfix-release.yml Outdated Show resolved Hide resolved
.github/workflows/publish-hotfix-release.yml Outdated Show resolved Hide resolved
.github/workflows/publish-hotfix-release.yml Outdated Show resolved Hide resolved
.github/workflows/publish-hotfix-release.yml Outdated Show resolved Hide resolved
.github/workflows/publish-hotfix-release.yml Outdated Show resolved Hide resolved
.github/workflows/publish-hotfix-release.yml Outdated Show resolved Hide resolved
.github/workflows/publish-hotfix-release.yml Outdated Show resolved Hide resolved
.github/workflows/publish-hotfix-release.yml Outdated Show resolved Hide resolved
.github/workflows/publish-hotfix-release.yml Outdated Show resolved Hide resolved
makeLatest: false
removeArtifacts: true

publish-to-swaggerhub:
Copy link
Contributor

Choose a reason for hiding this comment

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

the job to publish the API spec to GH Pages is missing

Copy link
Contributor Author

@rafaelmag110 rafaelmag110 Aug 26, 2024

Choose a reason for hiding this comment

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

This was a copy of the existing publish-new-release workflow. That workflow did not contain the publication to GH pages so I left it out.
Publishing to GH pages started after 0.7.3 was released. Does it make sense to add the 0.7.4 specs to GH pages?

@rafaelmag110
Copy link
Contributor Author

@paullatzelsperger
Thanks for your review. I'll comment here since i'll address most comments still unanswered.
The idea of this PR was to have a working version of the publish-new-release workflow that functions for hotfix releases.
I avoided changes to existing jobs/steps as much as possible to avoid breaking them since fixing GH workflows by running them countless times isn't a great experience.
Yes its true somethings need rework: probably unnecessary use of variables, unnecessary jobs, probably unnecessary permissions.
Since we are refactoring the workflows afterwards anyway i left it for that PR and not this one...

@paullatzelsperger
Copy link
Contributor

I understand that this is supposed to be a temporary workflow, but once these kinds of things are in the code base, they have a habit of remaining there, or be used as reference later. So I'd rather have a temporary, clean WF now, of which we could - in good conscience - borrow elements later.

since fixing GH workflows by running them countless times isn't a great experience.

I'm sorry, but "it's hard/annoying to do" isn't a valid reason IMO.

@rafaelmag110
Copy link
Contributor Author

I'm also not an adept of doing half-solutions, and I do understand your point that "there isn't a more permanent solution than a temporary one". As with everything, there are exceptions and considering a permanent solution is imminent this was one of them.
I'll consider your previous comments and adjust the pr.

Copy link

sonarcloud bot commented Aug 27, 2024

@rafaelmag110
Copy link
Contributor Author

@wolf4ood @paullatzelsperger
Thanks for the review. Can you merge it? I'll open another PR to replicate this exact WF in main, so we can run it from the Actions tab.

@paullatzelsperger paullatzelsperger merged commit 572a365 into eclipse-tractusx:bugfix/0.7.4 Aug 27, 2024
30 checks passed
@rafaelmag110 rafaelmag110 deleted the add_hotfix_release_wf branch August 27, 2024 11:08
@paullatzelsperger
Copy link
Contributor

paullatzelsperger commented Aug 27, 2024

I'll open another PR to replicate this exact WF in main, so we can run it from the Actions tab.

I don't think we need this in main, since we are currently between versions, and we should have enough time to get the "proper" solution in before 0.8.0 is scheduled for release

rafaelmag110 added a commit to rafaelmag110/tractusx-edc that referenced this pull request Aug 27, 2024
…actusx#1511)

* Add publish-hotfix-release.yml

* Adds prepare-hotfix-release job

* Fix Copyright header

* Replace unecessary check-tag action

* Comment

* Remove unecessary variable

* Remove unnecessary Job and its dependencies

* checked permissions

* Change branch validation from hotfix to bugfix

* rename file
wolf4ood pushed a commit that referenced this pull request Aug 27, 2024
* chore(workflows): Adds workflow to release hotfix version (#1511)

* Add publish-hotfix-release.yml

* Adds prepare-hotfix-release job

* Fix Copyright header

* Replace unecessary check-tag action

* Comment

* Remove unecessary variable

* Remove unnecessary Job and its dependencies

* checked permissions

* Change branch validation from hotfix to bugfix

* rename file

* Updates workflow with changes done to main

* trigger CI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

3 participants