Closed 4ydan closed 1 year ago
Thanks for creating the issue!
No, it is not on purpose. It happens on PRs where the branch is also within PermaplanTs repository. Currently we don't need to build any branch but master branch, so if you find a way to disable these "branch" builds, it would be very good for the environment.
Btw. I think Elektra has the same problem but branches in the main repo are not so typical but still they exist and lead to many useless build jobs.
Do we know anything about that yet? It is quite a waste of resources and also sometimes confusing (if one passes and the other fails).
We could maybe try to solve this with jenkins API, to cancel a running branch when it's opened as PR, but I didnt have much time looking into this.
we could do this
but then no more CI when it's not opened as PR. The issue is, that you cant open the PR before pushing the new branch.
we could do this
Yes, sounds like exactly what we need.
but then no more CI when it's not opened as PR.
We would need another pipeline for these PR.
Or maybe this? https://plugins.jenkins.io/autocancel/ only 92 installs though
I don't think autocancel is a good idea: we would see aborted runs all the time.
Let us go with the option you found and master in a separate pipeline. People simply should create PRs for branches they want to build.
so master still has both and PR's need to be pushed for CI? I'm a bit confused.
No, master is the only branch that should be build without having a PR.
Can you have a quick look at #668? Did you cancel the build?
Ok I understand.
Can you have a quick look at https://github.com/ElektraInitiative/PermaplanT/pull/668? Did you cancel the build?
It was not me.
Or maybe it was me, when I moved the folders in Jenkins, possible.
Ok, no problemo :wink:
Everything is done and well, thanks for your great responsiveness! Maybe you can also do a release soon?
Great, next time I should probably not touch anything in jenkins on release day.
Maybe you can also do a release soon?
sure
Together in a discord session with @4ydan ,
we have added a Filter by name (with regular expression)
with (PR-.*)|master
. If I understand this correctly this should build all PRs (PR-.*
) and the branch named master
.
@4ydan will be testing this now.
In Jenkins we can now see that all branches except master
are in disabled
state; PRs are not disabled.
The triggered Pipeline scan will now rebuild lots of PRs unfortunately, but that's just a one time thing. (after changing the settings in the multi branch pipeline it automatically triggers a full scan).
Very impressive and elegant solution from lukas.
Describe the Bug
I have seen this multiple times now. is it intended?
Steps to Reproduce the Problem
Open a PR
Expected Result
One Jenkins build to start.
Actual Result
Two are started.
PermaplanT version
master
Operating System
-
Browser
-
Versions of other relevant software/extensions
-
Additional info/logs