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

feat(release): change the prerelease logic #743

Merged
merged 21 commits into from
Apr 24, 2024
Merged

Conversation

yj-yan
Copy link
Contributor

@yj-yan yj-yan commented Mar 5, 2024

Please read CONTRIBUTING.md for additional information on contributing to this repository!

What this PR does / why we need it

  • Separate the pre-release and release jobs to allow main branch to release unstable and rc versions, and release branch for stable version.
  • Add a trigger_rc_release job and script to create release commit on main branch to trigger rc release when there are changes. This job could be configured to require manual approval.

Jira ID

DT-4238 DT-4241

Notes for your reviewers

Copy link

swarmia bot commented Mar 5, 2024

@getoutreach-ci-2
Copy link

Link to code coverage report (posted by coverbot 🤖)

@getoutreach-ci-2
Copy link

Link to code coverage report (posted by coverbot 🤖)

@yj-yan yj-yan marked this pull request as ready for review March 5, 2024 21:36
@yj-yan yj-yan requested a review from a team as a code owner March 5, 2024 21:36
condition: << parameters.dryrun >>
steps:
- run:
name: Pre-elease (Dry-run)
Copy link
Member

Choose a reason for hiding this comment

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

Nit:

Suggested change
name: Pre-elease (Dry-run)
name: Pre-release (dry run)

@@ -1,4 +1,4 @@
description: Releases a new version of the application
description: Pre-releases a new version of the application
Copy link
Member

Choose a reason for hiding this comment

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

question: isn't this a stable release?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this job is for stable release. Will correct the description in the pre-release job.

Comment on lines 95 to 100
# Read the GH_TOKEN from the file
GH_TOKEN="$(cat "$HOME/.outreach/github.token")"
if [[ -z $GH_TOKEN ]]; then
echo "Failed to read Github personal access token" >&2
fi
Copy link
Member

Choose a reason for hiding this comment

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

issue: according to this, ~/.outreach/github.token is the legacy path:

# Configure the legacy path
mkdir -p "$HOME/.outreach"
echo "$GITHUB_TOKEN" >"$HOME/.outreach/github.token"

You should be using gh auth token, I believe.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I updated to use gh auth token.

Comment on lines 20 to 21
releaseUsername="Outreach CI"
releaseUseremail="outreach-ci@outreach.io"
Copy link
Member

Choose a reason for hiding this comment

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

issue: perhaps the default values for this should be in the box config. We should avoid Outreach-specific values in this repo since it's public.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, I've made it configurable from service.yaml. Will also add the default value in box config.

@@ -44,6 +44,6 @@ fi

GH_TOKEN="$GH_TOKEN" yarn --frozen-lockfile semantic-release --dry-run

# Handle unstable releasing for CLIs, pre-conditions for this exist
# Handle prerelease releasing for CLIs, pre-conditions for this exist
Copy link
Member

Choose a reason for hiding this comment

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

Nit:

Suggested change
# Handle prerelease releasing for CLIs, pre-conditions for this exist
# Handle prereleases for CLIs, pre-conditions for this exist

@getoutreach-ci-1
Copy link
Contributor

Link to code coverage report (posted by coverbot 🤖)

2 similar comments
@getoutreach-ci-1
Copy link
Contributor

Link to code coverage report (posted by coverbot 🤖)

@getoutreach-ci-2
Copy link

Link to code coverage report (posted by coverbot 🤖)

@yj-yan yj-yan requested a review from malept March 6, 2024 18:22
@getoutreach-ci-1
Copy link
Contributor

Link to code coverage report (posted by coverbot 🤖)

2 similar comments
@getoutreach-ci-1
Copy link
Contributor

Link to code coverage report (posted by coverbot 🤖)

@getoutreach-ci-1
Copy link
Contributor

Link to code coverage report (posted by coverbot 🤖)

@getoutreach-ci-1
Copy link
Contributor

Link to code coverage report (posted by coverbot 🤖)

@getoutreach-ci-2
Copy link

Link to code coverage report (posted by coverbot 🤖)

orbs/shared/jobs/trigger_rc_release.yaml Outdated Show resolved Hide resolved
shell/ci/release/dryrun.sh Outdated Show resolved Hide resolved
yj-yan and others added 3 commits April 24, 2024 11:27
Co-authored-by: Mark Lee <malept@users.noreply.github.com>
Co-authored-by: Mark Lee <malept@users.noreply.github.com>
@yj-yan yj-yan requested a review from malept April 24, 2024 20:48
@malept
Copy link
Member

malept commented Apr 24, 2024

Need to run make fmt as linting failed

@yj-yan
Copy link
Contributor Author

yj-yan commented Apr 24, 2024

Need to run make fmt as linting failed

Thanks, fixed the format.

@yj-yan yj-yan merged commit b1e66aa into main Apr 24, 2024
4 checks passed
@yj-yan yj-yan deleted the yjyan/change-prerelease branch April 24, 2024 21:30
@getoutreach-ci-2
Copy link

🎉 This PR is included in version 2.27.0-rc.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

yj-yan added a commit that referenced this pull request May 20, 2024
* fix(stencil): upgrade modules (2024-04-16) (#768)

* fix(stencil): upgrade modules (2024-04-16)

* Update .circleci/config.yml

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* Update package.json

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* update yarn.lock

---------

Co-authored-by: getoutreach-ci-1[bot] <95656460+getoutreach-ci-1[bot]@users.noreply.github.com>
Co-authored-by: Phil Brocker <5331286+pbr0ck3r@users.noreply.github.com>
Co-authored-by: Mark Lee <malept@users.noreply.github.com>
Co-authored-by: Devbase CI <phil.brocker@outreach.io>

* chore: revert semantic-release dependency bumps (#769)

* chore: add cortex.yaml (#770)

* chore: add cortex.yaml

* remove opslevel

* fix(release-dryrun): CI-specific commands; use gh (#772)

* fix(release-dryrun): only setup git user name/email in CI
* refactor(release-dryrun): use gh for GitHub token

* feat: add `make stencil` and `make restencil` (#771)

* chore(deps): bump github.com/cloudflare/circl from 1.3.3 to 1.3.7 (#773)

Bumps [github.com/cloudflare/circl](https://github.com/cloudflare/circl) from 1.3.3 to 1.3.7.
- [Release notes](https://github.com/cloudflare/circl/releases)
- [Commits](cloudflare/circl@v1.3.3...v1.3.7)

---
updated-dependencies:
- dependency-name: github.com/cloudflare/circl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: add catalog sync script, used when catalog manifest isn't a template (#774)

* feat(coverbot): update version of coverbot to v1.0.5 (#775)

* fix: bump kubeconform to 0.6.4 (#777)

* fix: replace vulnerable, unmaintained dependency with a fixed, maintained fork (#779)

* fix(go): parse HTTPS git URLs correctly (#780)

* feat(release): change the prerelease logic (#743)

* feat(release): change the prerelease logic

* fix: typo

* fix: linter

* fix: remove testing lines

* fix: add comments

* fix: add script and orb to trigger rc release

* fix: set branch to current if it is null

* fix: comments and remove testing lines

* fix: address comments

* fix: force to trigger release for testing access token

* fix: config release uer in service.yaml and default in box

* fix: revert testing

* fix: linter

* fix: box config for release user

* fix: use GH_TOKEN

* fix: allow partial match the commit message

* fix: skip release dryrun for empty change

* use gh auth

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* update description

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* fix format

---------

Co-authored-by: Devbase CI <devbase@outreach.io>
Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* chore(deps): bump github.com/getoutreach/localizer from 1.15.3 to 1.15.4 (#778)

* chore(deps): bump github.com/getoutreach/localizer from 1.15.3 to 1.15.4

Bumps [github.com/getoutreach/localizer](https://github.com/getoutreach/localizer) from 1.15.3 to 1.15.4.
- [Release notes](https://github.com/getoutreach/localizer/releases)
- [Changelog](https://github.com/getoutreach/localizer/blob/main/.releaserc.yaml)
- [Commits](getoutreach/localizer@v1.15.3...v1.15.4)

---
updated-dependencies:
- dependency-name: github.com/getoutreach/localizer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Restencil

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: --global <mark.lee@outreach.io>
Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* fix(linters): prettier 3+ log level flag compatibility (#781)

* fix: rc prerelease before unstable release (#783)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: getoutreach-ci-1[bot] <95656460+getoutreach-ci-1[bot]@users.noreply.github.com>
Co-authored-by: Phil Brocker <5331286+pbr0ck3r@users.noreply.github.com>
Co-authored-by: Mark Lee <malept@users.noreply.github.com>
Co-authored-by: Devbase CI <phil.brocker@outreach.io>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jan Pecek <jan.pecek@outreach.io>
Co-authored-by: Devbase CI <devbase@outreach.io>
Co-authored-by: --global <mark.lee@outreach.io>
@getoutreach-ci-1
Copy link
Contributor

🎉 This PR is included in version 2.27.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

None yet

2 participants