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

Make git notes not trigger jenkins pipeline #1288

Merged
merged 6 commits into from
Jul 16, 2024

Conversation

ElfenB
Copy link
Contributor

@ElfenB ElfenB commented May 22, 2024

Context: Bitbucket is generating ghost commits that have the commit message "Notes added by 'git notes add'" if git-notes is used (e.g. with semantic-release). To prevent Jenkins starting builds that will result in failure because there is nothing to build, the build should be stopped when those commits are coming in.

Context: Bitbucket is generating ghost commits that have the commit message "Notes added by 'git notes add'" if git-notes is used (e.g. with semantic-release). To prevent Jenkins starting builds that will result in failure because there is nothing to build, the build should be stopped when those commits are coming in.
@BraisVQ
Copy link
Contributor

BraisVQ commented May 27, 2024

@ElfenB after a little test this change does not seems to break anything on component pipeline and makes git notes changes not trigger it.
But as release manager makes commits into the repositories, git notes is likely to break it...
The push action is being blocked by remote repository

@ElfenB
Copy link
Contributor Author

ElfenB commented May 28, 2024

Perhaps we could achieve a similar result by checking the ref that is provided from Bitbucket?
I am getting builds like this:

image

If the namespace "refs/notes" would be ignored when building that would make more sense than ignoring a commit message? Because notes can't be built really because they are not pointing to some commit with code. So that is an error/bug anyways.
@braisvq1996 What do you think?

@ElfenB
Copy link
Contributor Author

ElfenB commented May 29, 2024

@braisvq1996 As discussed, I adapted the logic it to match on the ref display-id instead of the commit message to be more open for different tools.

@BraisVQ
Copy link
Contributor

BraisVQ commented May 30, 2024

thanks @ElfenB, I will test it out once I get some time for thsi

@ElfenB ElfenB marked this pull request as ready for review June 13, 2024 06:54
oalyman
oalyman previously approved these changes Jun 14, 2024
@metmajer
Copy link
Member

metmajer commented Jun 18, 2024

@ElfenB, thanks for your contribution and the review, @oalyman. We will schedule this for the next possible release. We will also ensure that there are no side effects by executing our automated tests before the merge to master. You will not need to provide any automated tests for your implementation.

@BraisVQ
Copy link
Contributor

BraisVQ commented Jun 28, 2024

@ElfenB @metmajer I managed to get some time to test it on my end and I did not find any issues but after the current release, we can run the whole set of e2e to be sure

@metmajer
Copy link
Member

metmajer commented Jul 3, 2024

@braisvq1996 let's make sure this will be included in the next release possible

@metmajer
Copy link
Member

metmajer commented Jul 3, 2024

@ElfenB please resolve the CHANGELOG.md conflict

Copy link
Contributor

@BraisVQ BraisVQ left a comment

Choose a reason for hiding this comment

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

tested it and works properly

@BraisVQ BraisVQ changed the title Workaround for bitbucket trouble with git-notes Make git notes not trigger jenkins pipeline Jul 16, 2024
@BraisVQ BraisVQ merged commit e0f2cb7 into opendevstack:master Jul 16, 2024
13 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.

5 participants