Is it possible to interface Jenkins with Tivoli Workload Scheduler, such as to trigger Jenkins to run a job requested by a TWS job stream ?
A trigger should wait for the Jenkins job to complete and return to TWS with a proper returncode.
But I havn't been able to find any info as yet!
PS. I'm just the interface guy and I have no Jenkins knowledge that so ever, so please any points of direction is welcome.
Related
We have multiple Jenkin masters and have enabled Jenkins Prometheus plugin and connected these masters as data sources to Grafana. I am currently interested in finding jobs which are waiting for executors for more than a certain time and create an alert based on this. I looked at Jenkins metrics but did not find any suitable metric to have monitoring for this use case. How can I achieve this?
You can access the Jenkins build queue via Groovy and check for entries waiting for too long.
It is possible to run Groovy scripts via the Jenkins REST API, which then will be your interface for polling for such "blocked" jobs.
I have a working Jenkins setup that can pull source code from RTC (Jazz server) and build etc. I can run this Jenkins job on demand or schedule to run at a random interval. However, now I am exploring as to how I can run this job only on detecting a change in the repository (e.g. new change set is delivered). I dont want to use the polling mechanism that Jenkins provide and I want RTC's post commit process to call my Jenkins job remotely.
Please can anyone guide me how I do it? Thank you.,
I have a linux slave and windows master configured in Jenkins. However if i am scheduling periodic job on the linux slave and i shutdown my master (Windows), will the scheduled job execute ?
Answer in case of Jenkins is definitive no, but here is what you have as an alternative https://www.rundeck.com is the modern it operations management platform in other words it is scheduller with UI wich can a lot of power and if just need to run simple cases one per week it will do that job.
Ofc, you can always use cron with some shell scripts we it is an *nix system
No! You cannot.
All the jobs will be configured on Master and Master tells slaves to do what and when. So, its quite obvious that you cannot have what you are asking.
I am trying to understand how to best deploy an instance of Jenkins, complete with plugins, users and jobs using Chef. I am currently using the Chef Jenkins Supermarket cookbook.
I am attempting to achieve automated deployment of our Pipelines as part of the project. From what I have gathered, the best way to go about this is to have Chef configure a seed job in Jenkins initial setup and configuration.
The seed job should specify, among other things, the git repository from which to find and use a Jenkinsfile for a given job. I've found this resource by Daniel Spilker to be helpful in explaining seed jobs.
So the seed Jenkins job would be run, which would then generate the Jenkins job we have just scripted with it (in this case the seed job would be to pull the Jenkinsfile from source control and configure a new Jenkins job (our pipeline), with the details of the Jenkinsfile).
Am I understanding this correctly as the proper way to not only automate Jenkins job configuration, but also as the proper way to always have an up to date job configuration for any given job in the event the job configuration were to change?
If we used a seed job to setup our pipeline, what are some possible solutions to having the initial seed job run automatically once Jenkins is fully configured by Chef?
As for job configuration changes that may occur over time, would we need to setup the seed job to poll source control for any changes in the Jenkinsfile periodically in the event the Jenkinsfile has been modified? (It may be helpful to note that we are currently using BitBucket for source control).
Just getting started with pipeline as code. Thanks to everybody in advance for their patience and guidance.
I've mentioned this a bit in your other questions, but the least painful approach is to treat Jenkins as a database, not a web service. Have Chef do the basic install, but then configure the initial bits by hand. For DR, rely on your backups rather than Chef.
Is it possible to interface Tivoli Workload Scheduler with Jenkins such as to trigger TWS job streams from Jenkins?
There's no out-of-the-box jenkins plugin, but there are many IBM Workload Scheduler interfaces that you can leverage to submit the job stream from jenkins:
conman sbs command line.
https://www.ibm.com/support/knowledgecenter/en/SSGSPN_9.4.0/com.ibm.tivoli.itws.doc_9.4/distr/src_ref/awsrgsubmitsched.htm
REST APIs,if you are running TWSd 9.3 FP2 or later.
https://start.wa.ibmserviceengage.com/twsd/
Java APIs.
https://www.ibm.com/support/knowledgecenter/en/SSGSPN_9.4.0/com.ibm.tivoli.itws.doc_9.4/common/src_dgd/awsddjapi.htm
generate a custom event using sendevent and create an event rule to handle that event performing a submit.
https://www.ibm.com/support/knowledgecenter/en/SSGSPN_9.4.0/com.ibm.tivoli.itws.doc_9.4/distr/src_ref/awsrgeventsend4dyn.htm