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

Added flag to invoke doStop on WorkflowRun instead of throwing FlowInterruptedException #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cconnert
Copy link

Currently the scmSkip does not work as expected in our multi branch pipeline. The build continues to run and only is properly aborted sometimes. Still aborting the build in the JenkinsUI does work. Thus I added a backwards compatible flag to invoke the doStop on a WorkflowRun instead of throwing an execption.

Testing done

Added new unit test to cover new flag

Submitter checklist

@cconnert cconnert requested a review from a team as a code owner April 18, 2024 13:18
@zbynek
Copy link
Contributor

zbynek commented Apr 18, 2024

Interesting, my experience was the opposite: with doStop some multibranch pipelines kept running, with the exception they stop. Would be nice to have one solution that "just works" instead of a flag. I somehow suspect this may be related to agent type. What kind of agents do you use -- ssh / websocket / ... ?

@cconnert
Copy link
Author

cconnert commented Apr 18, 2024

Indeed interesting.
Well I use containerized build agents based on the standard jenkins agent container. The agent itself is then managed by the jenkins swarm plugin (https://plugins.jenkins.io/swarm/).
Inside those containers I make use of DockerInDocker (DinD) in order to write run the different stages of the declarative multibranch pipeline.
In regards to the pipeline, I do have a custom checkout step. The scmSkip step is executed directly after doing the checkout. I also tried to create a followup stage but that did not change anything.
In regards to the doStop, I did not test it yet but I strongly guess it will work, as it does within the UI.

I agree, that the flag is not a pretty solution. Just wanted to try if it works... If possible (server is not entierly under my control), I'll install a custom build in order to verify my assumption

@cconnert
Copy link
Author

@zbynek did you manage to figure something out? Otherwise it would be great to if consider merging this issue as a workaround. I know that a flag is not to pretty but it is better then nothing

@zbynek
Copy link
Contributor

zbynek commented Jul 24, 2024

@cconnert sorry, I forgot about this.

@cconnert
Copy link
Author

@zbynek: Currently it seems that the aborts to work. I'll monitor our release pipelines and get back to this issue

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.

2 participants