jenkins-plugins

Jenkins How can i upload a text file and use it as a parameter

馋奶兔 提交于 2019-12-22 09:46:51
问题 I have a txt file that is holding a string inside, I want to be able to use this string in one of my scripts, so I'm wondering if there is a way to set the content of the file as one of the build properties or parameters which I'll be able to use in my scripts it should be the same as using one of the build environment properties. For example : ${JOB_NAME} which is holding the the job name, so in the same way I want to access the content of the file which is holding some value inside. Is it

Docker Plugin for Jenkins error: Scripts not permitted to use method

会有一股神秘感。 提交于 2019-12-22 08:41:39
问题 I'm trying to publish to Docker from my Jenkins Pipeline but most things I try result in an error. My latest try was this: docker.withDockerRegistry('https://docker-registry.myco.com/lsacco/swagger-rest', 'docker-credential') { def image = docker.image(APPLICATION_NAME); image.tag("latest"); image.push() } When I run this, Jenkins outputs this error: org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use method groovy.lang.GroovyObject invokeMethod

Build-timeout Plugin in Jenkins: how long is 'too long'?

萝らか妹 提交于 2019-12-22 08:31:33
问题 I would like to take advantage of this plug-in but the 'Abort the build if it's stuck' option doesn't set any timer and the description of the plug-in doesn't say how long is the timer, it just says: 'This plugin allows you to automatically abort a build if it's taking too long' My question is how long is that? 1 hour, less/more? Can I set up my own time? Is that timer for the overall job or every line in the batch file has that timer? 回答1: Build-timeout plugin has multiple options (taken

Jenkins MultiJob - Send Results e-mail with data from inner Jobs

若如初见. 提交于 2019-12-22 08:22:41
问题 I have a MultiJob Project with 3 inner jobs which needs to be executed in the following sequence Master MultiJob Project (Job) |----- Phase 1 |------> JOB A |----- Phase 2 |------> JOB B |----- Phase 2 |------> JOB C When Job C ends, the Master MultiJob Project (Job) will send a mail (Using the Email-ext plugin) with status about the results from all the inner Jobs (A, B and C) (As a Post Build Step) I need to find a way to get a the results from each of these inner Jobs (as Parameter or any

Run Jenkins build when git commit is done

核能气质少年 提交于 2019-12-22 08:04:03
问题 I know that this question is posted in different topic.But my case is a little bit different. I want to trigger my test goal when a commit is detected by Jenkins. Most tutorials in the internet show how to do this using WebHook. In my case I have two problems : 1) I did not find the option "Trigger build when a commit is detected" 2) All tutorials speak about configuring webhook, from Git URL.in my case, my git repository is local and I did not have access to the web interface. So how to do

How do I access files in a Shared Library?

我们两清 提交于 2019-12-22 04:58:09
问题 I have a Shared Library with a .groovy script that I call in a jenkinsfile like this: MySharedLibFunction{ .. some args} I also have a .ps1 file in my shared library I want to execute. But if I do powershell pwd from in my shared library function when I call that function from my jenkinsfile the current working directory is the jenkins working directory of my pipeline where the jenkinsfile is located (which is usually what you want). Is there a way to access files in the shared lib? I want to

How to restart Jenkins in Windows

China☆狼群 提交于 2019-12-22 04:48:20
问题 Not able to restart Jenkins manually. Already tried all below ways: http://localhost:8080/safeRestart Error message: Jenkins cannot restart itself as currently configured. Manage Jenkins → Restart Safely Plugin . Error message: Jenkins cannot restart itself as currently configured. Not able to find any Jenkins Service in services.msc . Navigate to jenkins-cli directory in CMD mode java -jar jenkins-cli.jar -s http://[jenkins-server]/ restart See below screenshot for error message: 回答1: Use

Access BitBucket payload data in Jenkins pipeline job

坚强是说给别人听的谎言 提交于 2019-12-22 04:09:07
问题 I've got a Jenkins pipeline job; it is configured to build on remote trigger which is being called by a BitBucket webhook. This works and is triggering the build. I also need to access the payload data sent by BitBucket (described here) to get details about the push such as the specific branch. The BitBucket plugin would usually parse this payload and present it to the job as an environment variable, but I can't set the pipeline job as being connected to a specific repo for that plugin, so it

Jenkins: deploying war files from artifactory

柔情痞子 提交于 2019-12-22 03:43:44
问题 We are using Jenkins to build ( maven ) & deploy artifacts (JARs & * WAR *s) to an in-house artifactory server (both snapshots and releases). For deployment, currently, we got Jenkins jobs that package the war file (from a release scm tag) and deploy to different environments/servers. We want to skip the package phase as it seems unnecessary to package it again & again for a released version because it's not possible to get a different copy of war file even after trying 1000 times. We are

How to store last value of parameter in parameterized job as a default value for next build in Jenkins?

家住魔仙堡 提交于 2019-12-22 03:22:16
问题 I have been using Jenkins for a few weeks and I have one small problem. I can't find any plugin or solution for storing the last value of a parameter in a parametrized job as a default value for the next build. For example: My parameter takes build version (1.0.0.01) in the first build. In the next build it will be changed to 1.0.0.02, but I want to have a 1.0.0.01 in the default value field as a hint. Does anybody have a solution or advice? 回答1: You can add a System groovy build step to your