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

SWC-6663: build and publish SWC artifact from GH #5513

Merged
merged 21 commits into from
Sep 11, 2024

Conversation

xschildw
Copy link
Contributor

@xschildw xschildw commented Sep 6, 2024

This PR should enable building SWC and publishing the artifact from Github Workflow

  • action.yml is modified to accept an mvn goal and an optional pom version (to version the artifact)
  • build-test-e2e.yml now calls the action with 'package' goal (as it was hardcoded in action previously)
  • main.yaml
    • on pull request to dev or release branch, call build with 'test' goal
    • on push request to dev or release branch, version accordingly and call build with 'deploy' goal ('package' first to test)
  • release.yaml releases a branch to production
    • tag branch with v.1 version (staging is .0)
    • create a new v+1 branch and tags it with v+1.0
    • starts a build off v+1 branch
  • maven.yml is replaced by main.yaml

@xschildw xschildw changed the title SWC-6663: Dev plfm swc 6663 merge SWC-6663: build and deploy SWC artifact from GH Sep 9, 2024
@xschildw xschildw marked this pull request as ready for review September 9, 2024 23:19
git push origin $new_branch
echo "pomversion=$new_tag" >> $GITHUB_ENV

- id: build_new_release_branch
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The original idea was to just push in the step above and have the trigger do the build but the trigger does not get fired if the push is coming from an action (unless it's done with a PAT), so starting a build of the new branch here.

Copy link
Contributor

Choose a reason for hiding this comment

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

The commit should already be tested, so this seems fine. When would we run this workflow?

- id: build_new_release_branch
uses: ./.github/workflows/build
with:
mvn_goal: package
Copy link
Contributor Author

Choose a reason for hiding this comment

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

package first to test


- uses: ./.github/workflows/build
with:
mvn_goal: package
Copy link
Contributor Author

Choose a reason for hiding this comment

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

package first to test

@xschildw xschildw requested a review from nickgros September 9, 2024 23:48
@xschildw xschildw changed the title SWC-6663: build and deploy SWC artifact from GH SWC-6663: build and publish SWC artifact from GH Sep 9, 2024
Comment on lines +36 to +37
tag_name="${release_number}.1"
git tag -a $tag_name -m stack-${release_number}-prod
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like I'm just missing some context:

  • How do we build + tag patch versions today? Will this be compatible with that process (or is that an intended future change)?
  • What's the purpose of these new -prod/-staging tags?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now I manually run a shell script that takes the repo, the current and next release number (e.g. 'create-branch ~/bin/create-branch.sh SynapseWebClient 512 513') to tag and create the branches each week. It clones the repo and does essentially the same steps as here (simpler since I give it the versions...). I figured it'd be nice to just click a button right in GH since I'm there re-checking that everything is merged anyway.

The '-prod' and 'staging' are just added to the comment on the git tag (to remind that .0 lives while that version is on staging and .1 while it's in prod).

To version the artifacts, we use 2 scripts (one for dev branch, one for release branches) that modify the version in all the pom.xml files, I would like to replace them by the optional 'mvn versions:set' step in build/actions.yml.

@xschildw xschildw merged commit bc1c926 into Sage-Bionetworks:develop Sep 11, 2024
3 checks passed
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