jenkins-jobs | Job definitions derived from jenkins-job-builders | Job Scheduling library
kandi X-RAY | jenkins-jobs Summary
kandi X-RAY | jenkins-jobs Summary
Job definitions derived from jenkins-job-builders
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of jenkins-jobs
jenkins-jobs Key Features
jenkins-jobs Examples and Code Snippets
Community Discussions
Trending Discussions on jenkins-jobs
QUESTION
I am wondering is it possible to pass in the --extra-vars
when running an ansible-playbook in order to inject the variables into an inventory file, which I am using to run my playbook.
sample playbook
...ANSWER
Answered 2019-Oct-25 at 03:59I am looking to pass in
jenkins.component.name
at run time, I have attempted this with the followingjenkins.component.name=
and"{'jenkins':{'component':{'name':}}}"
You were very close: the --extra-vars
wants either key=value
pairs, JSON, YAML, or @./some/file
, as specified in the fine manual
Regrettably, what you provided was Python syntax, and not JSON syntax; if you change your command line to --extra-vars '{"jenkins":{"component":{"name":}}}'
update:
However, even that has a problem: it appears that for dict
structures, ansible does not merge inventory dict
s and extra-var
dict
s, so you will need to either choose a "flat" extra-var
name (such as almost what you also attempted: --extra-vars '{"jenkins_component_name": ""}'
) or manually merge the structures together in your playbook (perhaps via pre_tasks:
or similar)
QUESTION
I'm new in docker. I want to create a docker container with Newman, Jenkins, Jenkins-job-builder. Please help me.
I built a docker image which bases on official Jenkins image https://hub.docker.com/r/jenkins/jenkins.
I used DockerFile. The build was successful, Jenkins app also runs successfully.
After running Jenkins I opened container as root
docker exec -u 0 -it jenkins bash
and tryed to add new job with jenkins-job-builder
jenkins-jobs --conf ./jenkins_jobs.ini update ./jobs.yaml
but I got bash: jenkins-jobs: command not found
There is my Dockerfile
...ANSWER
Answered 2019-Aug-22 at 07:40When building your image, you get some warnings. Especially this one is interesting:
QUESTION
I want to write data to CloudWatch using the AWS-SDK (or whatever may work).
I see this:
The only method that looks remotely like publishing data to CloudWatch is the putMetricData
method..but it's hard to find an example of using this.
Does anyone know how to publish data to CloudWatch?
When I call this:
...ANSWER
Answered 2019-Jul-08 at 21:02You're getting this error because you're not specifying any metric data. You're only setting the metric name and the timestamp. You also need to send some values for the metric.
Let's say your application is measuring the latency of requests and you observed 5 requests, with latencies 100ms, 500ms, 200ms, 200ms and 400ms. You have few options for getting this data into CloudWatch (hence the At least one of the parameters must be specified.
error).
- You can publish these 5 values one at a time by setting the
Value
within the metric data object. This is the simplest way to do it. CloudWatch does all the aggregation for you and you get percentiles on your metrics. I would not recommended this approach if you need to publish many observations. This option will result in the most requests made to CloudWatch, which may result in a big bill or throttling from CloudWatch side if you start publishing too many observations.
For example:
QUESTION
I have this sequence:
...ANSWER
Answered 2019-May-01 at 19:31interos_keys:latest
is not actually the full image name. Yout also need to use the repository. 9136xxxx0371.dkr.ecr.us-west-2.amazonaws.com/interos_keys:latest
is the full name.
QUESTION
I am running a Jenkins server on a Windows 10 computer, as a service. In one of the Jenkins-jobs I have to perform tests using a COM application. The same computer is also used by the developers in their daily work over RDP, and the Jenkins-job in question is run in the night when no regular developer is using it. But if no user is logged in on the computer or using RDP, the script in the job fails to start the COM application with the following message:
The server process could not be started because the configured identity is incorrect. Check the username and password.
I found that the issue seems to be that the identity for the COM application is taken from the current interactive user, and if there is none, it fails, see
I cant seem to be able to solve my issue. I see two options:
- Make sure that a user is logged in when the job is executed
- Figure out how to run the COM application without an interactive user
For 1 i see the following solutions and why they do not work:
- Autologin on Windows start, and leave logged-in: Will not work since we use the computer in our daily work through RDP, which means that the local logged in user will be kicked out since we are only allowed one session at a time.
- Log in using RDP and then exit using the script
tscon.exe 0 /dest:console
which will leave the session open. Will not work since we are 15 people in the team using that machine over RDP, and people will forgett to use this command when they log of by the end of the day.
For 2, i am unable to find a way to do this.
Can I in Windows schedule a user to automaticall be logged in before the job starts? Can i use a second computer and scedule an RDP-session to the first computer, before the job is executed?
...ANSWER
Answered 2019-Apr-24 at 06:52Since nobody was able to provide a good solution I will input my workardound as an answer and possible solution. What I ended up doing was using a second computer (running Windows) and schedule a task on that computer that every night (before the Jenkins-job starts) opens an RDP-session to the computer running Jenkins. This way the Jenkins job, and the COM-application, has an active user that it can use.
This is how I achieved this:
- Login to the second computer (i.e. the one not running Jenkins) and open the RDP (Remote Desktop Connection) dialog and click Show Options
- Enter the details for the first computer (i.e. the one running Jenkins). Make sure to uncheck Always ask for credentials (you will need to save the credentials to be able to automate this).
- Save the configuration to an .rdp-file, using Save As...
- IMPORTANT: Press connect to connect to the first computer, enter the password and make sure to save it. Also accept any certificates e.t.c. to prevent future warnings/dialogs.
Create a bat-file containing the following
mstsc C:\Path\To\saved_rdp_file.rdp
Create a task in Windows Sceduler that calls the bat-file created in step 5 every night.
Optional: If you want to close the rdp-session when Jenkins is done, create a second bats-script and scedule that as well, containing:
tasklist /FI "imagename eq mstsc.exe" | find "mstsc.exe" && taskkill /f /im mstsc.exe || echo process "mstsc.exe" is not running
QUESTION
I am using Pipeline Maven Plugin 3.5.5 with Jenkins 2.89.2.
Due to large amount of dependencies between Maven projects, we rely mostly on snapshotDependencies()
to ensure that Jenkins jobs are triggered in the right order. I want to re-use data stored in $JENKINS_HOME/jenkins-jobs/jenkins-jobs.mv.db
H2 database to graph dependencies between jobs, not only rely on deatures available in Jenkins GUI.
If I copy out the H2 db file away from JENKINS_HOME and try to connect I get this:
...ANSWER
Answered 2018-Dec-31 at 09:53In retrospective, it looks like issue was not related specifically to Jenkins database.
INstead, it was because of using groovy Sql in wrong way. This question helped in getting answer org.h2.jdbc.JdbcSQLException: The object is already closed.
Using createQueryCommand
instead of executeQuery
worked:
QUESTION
I have a jenkins master with loads of pipeline (workflow) jobs. I need to change the scm git repo names in all the jobs using a groovy script run via script console.
I came across a bunch of answers for it to work in freestyle jobs. Also i came across a solution for pipeline job as this.
groovy to list Jenkins jobs with GIT URL used in jobs
It just lists downs the job names and the git repos.
I want to modify the git scm. Any suggestions?
...ANSWER
Answered 2018-Dec-17 at 07:33The Git remote URL is set with the src/main/java/hudson/plugins/git/UserRemoteConfig.java#UserRemoteConfig
class, and its groovy GUI configuration.
You can see an example of changing the URL in "How to change a Git URL in all Jenkins jobs"
QUESTION
The methods from the below Groovy class are invoked by some other pipeline script classes about which I don't know. All the println statements have been replaced by logger.info.
...ANSWER
Answered 2018-Nov-28 at 20:53I assume you would like to use Gradle’s logging system for your log output from a Gradle plugin?
In that case I would suggest to create/get the logger instance differently. Either use project.logger.info(…)
or create a new Logger
like so:
QUESTION
In our company we have a TFS server used for CI tasks (build & release) and as a Source Control server (we use Git). I would like to put under version control the TFS build & release configurations, something like Jenkins Job Builder for Jenkins.
The tool I am searching for should not only act as a sort of backup, but should allow us to reconfigure TFS simply launching a CLI command (like jenkins job builder's jenkins-jobs
command).
Is there anything out there which accomplish to this requirement?
Regards
...ANSWER
Answered 2018-May-16 at 06:59Sorry, there are no similar things as Jenkins Job Builder for TFS by now.
There had been a related user voice: provide a way to version-control build definitions
We announced the public preview of YAML build definitions in VSTS. You can now author the build process in code. The preview only supports build not support with release. And this is also not available with on-premise TFS server by now.
More details please review: How to use YAML builds
As a workaround, you can simply export and import the build definitions in TFS 2017update2 and above. To update the build definition, you can use the REST API (Update a build definition) with the PUT method:
e.g.:
QUESTION
I have a jenkins pipeline which contains the following 3 stages(just description):
Stage 1: Calling a python script, that should return a list of version numbers for which a new release should be built
Stage 2: Call Jenkins-Jobs that do the built for every version number of Stage 1 in parallel.
Stage 3: After all built jobs have finished do other stuff with the built releases.
The issue I got is, I don't know how to process the output of the python script. How can I use a list, that is returned from a python function for the following Stages?
I call the python script via a bat
command. I saw, there is the possibility to redirect the output of a batch command via returnStdout
flag, but this only passes the output of the python script.
One possiblity I can think of is to store the list in a json file in the workspace and then read it back in with readJson
in the pipeline. But maybe there is a more elegant solution to this.
ANSWER
Answered 2017-Dec-11 at 21:52Since you're using the Pipeline DSL, you can use Groovy to process the result of the call to bat
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install jenkins-jobs
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page