Trigger Jenkins job from Argo CD manually - jenkins

I have a requirement to trigger Jenkins job from ArgoCD manually. It should not trigger as post deployment action. This intervention should be done manually as separate stage in ArgoCD.
Appreciate your feedback.

Related

Webhook trigger for jenkins remotefile multibranch pipeline job

I have a multibranch configuration job, which I have created for using the remote jenkins file plugin, I have git repo in which I have the "jenkinsfile" named as customjenkins Now I am trying to configure the job in such a way that when ever a change is done to the "jenkinfile" the build should trigger, but in my case the top build is only triggered but the job with repo inside doesnt trigger and only can be done manually, please see the picture below for better understanding. Can anyone tell me what am I missing here

Kubernetes Cron Job to trigger a Jenkins pipeline

My team to to create a cron in Kubernetes/OpenShift that will trigger our Jenkins pipeline that we have set up. We tried doing the triggers{} syntax and the build periodically option on the Jenkins UI, however these are unreliable for us since whenever Jenkins restarts, those build triggers on Jenkins get removed.
There is two approaches you could use here:
Make your Jenkins stateless with the Configuration as Code plugin
Use a curlimages/curl container to trigger a job via the Jenkins REST API

How to trigger jenkins job that execute automation test scripts when code is pushed in development server?

I am new to Jenkins. I have development code repository at bitbucket and another test script code repository at bitbucket. Now I have setup a Jenkins job by linking test code repository. Is there any way to trigger a build when code is pushed in develop repo?
I tried many times by pushing change in develop repo, but it does not triggers the jenkins job.
You can configure the Jenkins trigger as an SCM poll.
You will have to enter a cron expression for the polling time period, like:
*/5 * * * *
This means polling from 5 to 5 minutes. If any change is detected, then the build is triggered.
You can add the BitBucket Plugin to your Jenkins instance. It will allow you to configure a webhook in BitBucket that will then trigger any Jenkins job listening for that webhook. The plugin's page has a detailed breakdown, but the basics are;
In your repo in BitBucket, create a new Webhook using your Jenkins' url. I believe the url is generally http://[your jenkins url]/bitbucket-hook/
Make the trigger a repo push.
In your Jenkins job, check the box "Build when a change is pushed to BitBucket" under the Build Triggers section.
Now any time you commit to the repo you created the Webhook on, that Jenkins job will be run.
You can also limit what branches trigger commits by parameterizing your Jenkins build to ignore certain branches / keywords / etc if that's something you need for your specific project.
You can use webhooks to trigger build automatically. There are few options how to use it. See the following articles: this, this and this.

How to trigger Jenkins downstream job from script but not manually through Jenskins?

From Jenkins plugin (ie. Delivery Pipeline, Parameterized Trigger), we could setup a pipeline which contains multiple jobs in sequence, for instance: Build -> Unit Test -> Deploy To DEV.
Now, for each pipeline, we want to stop after "Unit Test" because we need to wait for someone to approve the deployment before it can go on (We use JIRA as the tracking system for this).
Say when, someone approves the deployment ticket in JIRA, we already setup a post action to fire and trigger a job in Jenkins, say "Deploy To Dev" in this case. However, this job will run independently outside the pipeline.
Is there a way, we can trigger the down stream job from script within an instance of a pipeline so it can carry over all the parameters from upstream and shown as part of the pipeline?
Thx

jenkins gerrit trigger different jenkins jobs

i am looking if there is a way when the developer commit and push to gerrit (with custom comments), it will trigger certain jobs
example
git commit -m "DO_BUILD DO_TEST some_commit_comments", so when it is pushed to gerrit, it will launch jenkins jobs DO_ BUILD and jobs DO TEST
or
git commit -m "DO_BUILD some_commit_comments", so when it is pushed to gerrit, it will launch jenkins jobs DO_ BUILD and jobs DO TEST
i am sorry if this has been asked somewhere, but so far i cant find it anywhere
thank you
I think Gerrit TOPIC can be used for this. Because there is a build parameter in Gerrit Trigger based on TOPIC. So in DO_ BUILD case the topic would be DO_ BUILD which will trigger the build job, and DO_BUILD_TEST would trigger test job which has a build job dependency. in this way you dont need to spam your commit message with build instructions

Resources