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

Makes Gitlab CI Interruptible #1365

Merged
merged 4 commits into from
Jul 11, 2023
Merged

Makes Gitlab CI Interruptible #1365

merged 4 commits into from
Jul 11, 2023

Conversation

MarcelKoch
Copy link
Member

This PR makes our Gitlab CI interruptible, similar to the setup that we have for github. Only CI that does not run on master/develop branch can be interrupted.

@MarcelKoch MarcelKoch self-assigned this Jul 10, 2023
@MarcelKoch MarcelKoch requested a review from a team July 10, 2023 13:17
@ginkgo-bot ginkgo-bot added the reg:ci-cd This is related to the continuous integration system. label Jul 10, 2023
@MarcelKoch MarcelKoch added the 1:ST:no-changelog-entry Skip the wiki check for changelog update label Jul 10, 2023
Copy link
Member

@upsj upsj left a comment

Choose a reason for hiding this comment

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

LGTM! Awesome that his now works :)

Copy link
Member

@yhmtsai yhmtsai left a comment

Choose a reason for hiding this comment

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

the tag version needs to out of interruptible job

.gitlab-ci.yml Outdated
Comment on lines 27 to 28
rules:
- if: $CI_COMMIT_BRANCH != "master" && $CI_COMMIT_BRANCH != "develop"
Copy link
Member

Choose a reason for hiding this comment

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

also the tagged branch $CI_COMMIT_TAG can not be interruptible.
We also use the tag for the release although the tagged version should only be pushed once.

@yhmtsai
Copy link
Member

yhmtsai commented Jul 10, 2023

also @tcojean needs to adjust the option https://docs.gitlab.com/ee/ci/pipelines/settings.html#auto-cancel-redundant-pipelines to make it work

@MarcelKoch
Copy link
Member Author

I've made some dummy commits to test it, see: https://gitlab.com/ginkgo-project/ginkgo-public-ci/-/pipelines/926404360

Copy link
Member

@tcojean tcojean left a comment

Choose a reason for hiding this comment

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

LGTM. Minor format aspect.

.gitlab-ci.yml Outdated Show resolved Hide resolved
@MarcelKoch
Copy link
Member Author

I think the interrupt doesn't work if we force push... That makes it not as helpful with our workflow

@MarcelKoch MarcelKoch added the 1:ST:ready-to-merge This PR is ready to merge. label Jul 10, 2023
@yhmtsai
Copy link
Member

yhmtsai commented Jul 10, 2023

It's sad they do not handle the forced push. if it does not lead another error, it's still helpful partially.
I guess they go through all previous sha not the branch name.
Another annoying way is to use the API to get all pipeline with the same branch name and then cancel them by API.

@MarcelKoch
Copy link
Member Author

rebase!

@MarcelKoch MarcelKoch merged commit 2e0f4ea into develop Jul 11, 2023
11 checks passed
@MarcelKoch MarcelKoch deleted the ci-trigger branch July 11, 2023 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1:ST:no-changelog-entry Skip the wiki check for changelog update 1:ST:ready-to-merge This PR is ready to merge. 1:ST:run-full-test reg:ci-cd This is related to the continuous integration system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants