Cancel a running pipeline in circleci - circleci

How do I cancel a running pipeline in circleci?
Update: When I click on 'Old Experience' there is a button to cancel it, but how is this possible with the 'new experience'?

When you navigate to a job details, you have Rerun option with a drop-down. You can find option to cancel. Checkout the image.

Related

How can I trigger Pipeline CI/CD using GitLab CI or Jenkins when a user click on button in application?

For example when a user clicks on the button sign up I want to trigger a pipeline CI/CD
Jenkins trigger has an option of triggering via API,
https://www.jenkins.io/doc/book/using/remote-access-api/
You can use this and this shall work for you.

Pipeline tab is missing in Jenkins

enter image description here
Please, i am unable to see the pipeline tab on Jenkins page as shown in pic. Can someone comment on this?
if you mean you can't see an option to create a pipeline job; then for that, you need to click on "New item" on the top in the left-hand menu. Second - you need the pipeline plugin https://plugins.jenkins.io/workflow-aggregator

Is it possible to get the name of the user who triggered another Jenkins job through a static link?

I have a Jenkins job, ABC. The job runs every 24 hours as defined in the crontab. A build description is set after each successful build. The description is basically a link that triggers another job, XYZ.
Is it somehow possible to know which user clicked the link and triggered the job XYZ?
Cheers!
Yes, you just need to click in the status option of your job :

Jenkins pipeline: How to prompt "Do you really want to build?"

We are using Jenkins with Pipeline Jobs and of course the awesome Jenkinsfile.
Twice now a developer accidentally clicked on the build button, which ended up causing a bit of chaos. I am trying to figure out if it is possible to have something like a popup that asks "Do you really want to start this build?".
Any ideas on this user related issue are welcome.
Have a look at the article Controlling the Flow with Stage, Lock, and Milestone in the Jenkins blog, which covers a bit more than only asking for confirmation.
Essentially, there is the input step, which requires user input to continue pipeline execution.
The problem with the input step as suggested by StephenKing is that you won't be able to run the build automatically anymore as it will always ask for the user to confirm the input step manually. This prevents "automatic builds" triggered e.g. by webhooks or CRON jobs.
One workaround is to have a timeout and the build is triggered if the timeout is over. Like that, a user can at least abort an unintended build. But this leads to significantly longer build times.
What we did in my old company was, that we created a so called "parametrized" build, which had a simple checkbox "Do you really want to build this job" that resulted in a flag REALLY_BUILD as an environment variable. You can then ask for ${REALLY_BUILD}==1 in the Jenkinsfile. Every time a developer triggers a build, he has to check the box, otherwise the build will not start / immediately stop.
When you trigger your job via a webhook, you can pass a parameter REALLY_BUILD as an URL parameter (see this comment in the Jenkins tracker) and access it in the Jenkinsfile as before.
Here is another resource for how to use parameters in Pipelines.

Stash notifier plugin for jenkins generates the wrong jenkins URL

I am using the Stash Notifier plugin on jenkins to notify Stash of sucessful builds. When you click on the link for the build (Green tick link) in Stash, it pops up a dialog with a link back to jenkins. The URL it uses to link back to jenkins is wrong. I can't see anywhere to configure it.
Does anyone know where this link can be configured to use the right URL.
Log into jenkins as Admin
Select Jenkins (top left of screen)
From the drop down select 'Manage Jenkins'
Select 'Configure System'
About half way down the page there is a menu Jenkins Location, and under that there is an item 'Jenkins URL'
Add the correct URL
Save and exit

Resources