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

Workflow to release midstream plugin #10

Conversation

aliok
Copy link

@aliok aliok commented May 8, 2024

  • Workflow to release midstream plugin
  • Publishing to GitHub packages
  • Uses a PAT from myself

Tested here: https://github.com/aliok/backstage-plugins-no-fork-test/

aliok added 2 commits May 6, 2024 16:39
Signed-off-by: Ali Ok <[email protected]>
(cherry picked from commit 918c58f)
Copy link

openshift-ci bot commented May 8, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci bot added the approved label May 8, 2024
@aliok aliok marked this pull request as ready for review May 8, 2024 10:47
@openshift-ci openshift-ci bot requested review from matzew and pierDipi May 8, 2024 10:47
.github/workflows/release-plugins.yaml Show resolved Hide resolved
Comment on lines 37 to 38
DATE_TIME=$(date +"%Y%m%d%H%M%S")
RELEASE_NAME="${BASE_RELEASE_VERSION}.0-${DATE_TIME}"
Copy link
Member

@pierDipi pierDipi May 8, 2024

Choose a reason for hiding this comment

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

can we append the short commit sha instead of the datetime?

Copy link
Author

Choose a reason for hiding this comment

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

I think commit hash alone is not good, but I can add it to the end like release-1.2.3-202401010101-deadbeef

Copy link
Member

Choose a reason for hiding this comment

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

why is not good?

Copy link
Member

@pierDipi pierDipi May 8, 2024

Choose a reason for hiding this comment

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

Also the - is an indicator of pre-releases, I think what we want is the build identifier with a +, eg 1.33.0+<buid-id>

Copy link
Member

Choose a reason for hiding this comment

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

I'm also wondering if we should increment the patch version versus pre-releases or build numbers

Copy link
Member

@pierDipi pierDipi May 8, 2024

Choose a reason for hiding this comment

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

I think we can also list versions and figure out what's the "next patch for a major.minor" ?

Copy link
Author

Choose a reason for hiding this comment

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

Yeah, all commits in a release branch would cause a new package being published.

Copy link
Member

@pierDipi pierDipi May 9, 2024

Choose a reason for hiding this comment

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

BASE_RELEASE_NAME="0.1"; npm view @knative-extensions/plugin-knative-event-mesh-backend versions --json | grep ${BASE_RELEASE_NAME} | tail -1 | tr -d '"' | awk -F \. '{print $3+1}'

This will give us the next patch version for @knative-extensions/plugin-knative-event-mesh-backend package, which is 3, given the BASE_RELEASE_NAME being 0.1

Copy link
Author

Choose a reason for hiding this comment

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

Ok, what can go wrong, right? :D Let me incorporate this

Copy link
Member

Choose a reason for hiding this comment

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

A lot can go wrong :) but I think it's a little better

for sure we need to add the concurrency https://docs.github.com/en/actions/using-jobs/using-concurrency as a follow up

.github/workflows/release-plugins.yaml Outdated Show resolved Hide resolved
.github/workflows/release-plugins.yaml Outdated Show resolved Hide resolved
Copy link
Member

@pierDipi pierDipi left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

Copy link

openshift-ci bot commented May 9, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aliok, pierDipi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@pierDipi
Copy link
Member

pierDipi commented May 9, 2024

/test all

@pierDipi pierDipi merged commit 0255e5b into openshift-knative:release-v1.12 May 9, 2024
4 of 6 checks passed
@pierDipi
Copy link
Member

pierDipi commented May 9, 2024

Pipeline failed https://github.com/openshift-knative/backstage-plugins/actions/runs/9018345667/job/24778750006

go: modules disabled by GO111MODULE=off; see 'go help modules'
Error: Process completed with exit code 1.

@aliok
Copy link
Author

aliok commented May 9, 2024

Sorry, my bad. This wasn't ready!

I wrote you in private that I will test stuff locally before merging, but didn't add a hold.

Reverting now.

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

Successfully merging this pull request may close these issues.

2 participants