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

Tweak GitLab jobs #4453

Merged
merged 1 commit into from
Jul 27, 2023
Merged

Tweak GitLab jobs #4453

merged 1 commit into from
Jul 27, 2023

Conversation

andrewlock
Copy link
Member

Summary of changes

  • No need to build/publish tracer when building the Tag (triggered by a release)
  • Manually trigger the package job (so we can do it in our own time instead of having a deadline

Reason for change

As part of the draft release process, the GitHub Action creates a git tag. Pushing this tag in turn triggers the GitLab build. However, the package stage in the GitLab build currently requires that the release is already published. This therefore creates a deadline for publishing a draft release, which we don't want.

Additionally, the stages in the GitLab pipeline that run on the tag, don't rely on the build or publish stages (as they're get their assets from other places). We can therefore skip these steps (as they take a long time, and block the running of subsequent stages that we do care about)

Implementation details

  • Add except clause to build and publish stages
  • Make the package stage manually triggered

Test coverage

No 😬

Other details

I hope this does what I think it does. And I hope that skipping the build and publish stages doesn't affect our ability to run the latter stages. I guess we'll find out..

- No need to build/publish tracer when building the Tag (triggered by a release)
- Manually trigger the package job (so we can do it in our own time instead of having a deadline
@andrewlock andrewlock added the area:builds project files, build scripts, pipelines, versioning, releases, packages label Jul 27, 2023
@andrewlock andrewlock requested a review from a team as a code owner July 27, 2023 13:44
Copy link
Collaborator

@pierotibou pierotibou left a comment

Choose a reason for hiding this comment

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

minor comments

@@ -196,7 +198,8 @@ package:
- if: $DOTNET_PACKAGE_VERSION
when: on_success
- if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+(-prerelease)?$/'
when: on_success
when: manual
allow_failure: false
Copy link
Collaborator

Choose a reason for hiding this comment

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

it's independent from previous job and as it's manual, I assume we could leave alllow_failure:true

Copy link
Member Author

Choose a reason for hiding this comment

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

As discussed offline, I don't think so, because that makes the job "fire and forget", whereas we require this stage to pass for subsequent stages to run

@@ -60,6 +61,7 @@ publish:
except:
variables:
- $DEPLOY_TO_REL_ENV == "true"
- $CI_COMMIT_TAG # We don't need to build/publish when building a release tag
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't think it's needed as the only lists only branches so it will run only for pipeline for a branch (cf the doc).
And I think you should set tags here per the doc

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, as discussed it's probably fine. But when running manually, and you set $CI_COMMIT_TAG, I don't think we want to run this stage, right? And tags wouldn't help us then, whereas it does in this situation 🤔

@andrewlock andrewlock merged commit c4b4431 into master Jul 27, 2023
@andrewlock andrewlock deleted the andrew/ci/break-gitlab-release-deps branch July 27, 2023 15:49
@github-actions github-actions bot added this to the vNext milestone Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:builds project files, build scripts, pipelines, versioning, releases, packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants