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

CI/CD Commit/Tag Flow Consolidation #659

Open
amydevs opened this issue Dec 21, 2023 · 1 comment
Open

CI/CD Commit/Tag Flow Consolidation #659

amydevs opened this issue Dec 21, 2023 · 1 comment
Labels
development Standard development

Comments

@amydevs
Copy link
Member

amydevs commented Dec 21, 2023

Specification

A race condition was discovered where the CI/CD pipeline triggered by a Tag may merge bad changes to master.

The CI/CD must be changed so that:

  • Tag pipeline now only publishes releases, without guarantee of succeeded tests
  • npm version only creates a version commit rather than both a version commit and tag
  • Tests and merge jobs should happen on all pipelines on commits on staging, including version commits.
  • Tags should be created manually from the version commits after the pipeline of the version commit has succeeded.
  • Tags and Releases should only be created from master

This will now mean that, any Tags that's history diverge from staging/master, will no longer be merged into master. This makes sense, as tags can be created from any history, even one that doesn't align with any branches on the repository.

This means that master will only ever be merged from staging, after staging is confirmed to have been successfully tested.

The flow to release should be the following:

  1. Commit to staging
  2. Run npm config set git-tag-version=false to disable tags from being created from npm version
  3. Run npm version ... to create a version commit
  4. git push
  5. CI/CD runs tests on staging.
  6. CI/CD merges staging to master
  7. Create a Tag from master
  8. CI/CD publishes GitHub release from Tag

Untitled-2023-10-23-0424 excalidraw(8)

Untitled-2023-10-23-0424 excalidraw(9)

Additional context

Tasks

  1. Change .gitlab-ci.yml on Polykey to reflect changes
  2. Change .gitlab-ci.yml on Polykey-CLI to reflect changes
@amydevs amydevs added the development Standard development label Dec 21, 2023
@CMCDragonkai
Copy link
Member

This MatrixAI/Polykey-CLI#40 (comment) might be relevant here too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Standard development
Development

No branches or pull requests

2 participants