jenkins-plugins

Re-deploying a “versioned” war file from Jenkins to Tomcat fails

戏子无情 提交于 2019-12-24 13:37:46
问题 I am using the Jenkins deploy plugin to deploy to Tomcat. The .war file that gets generated is named using the following format: MyApp##[version].[buildnumber].war For example, the war file will be generated as: MyApp##alpha.13.war The reason for the hashes in the filename is for Tomcat manager html page to list the version in the version column of the deployed applications. This way, we can double check which version is currently deployed to Tomcat. Now when trying to deploy via Jenkins for

Pushing/committing with the Jenkins git plugin: #Not on any branch (GitHub repo)

假如想象 提交于 2019-12-24 09:55:02
问题 I am using the Git Plugin of Jenkins and have a Job that needs to commit and push some changes. The git repository I am using is hosted on GitHub. Bear with me, I am somewhat new to git. However, when I run git status or git commit it says # Not on any branch . If I tell the plugin to use a 'branch specifier', i.e. origin/master this doesn't help. Ho do I get the plugin to behave as if I would have done git clone on my desktop? 回答1: you have run git checkout <some-sha> probably, so now git is

Jenkins external credentials storage on CyberArk

妖精的绣舞 提交于 2019-12-24 09:49:32
问题 How to use external CyberArk vault to store credentials in free version Jenkins? Here you can find info regarding the standard jenkins credentials plugin - that provides an API for external storage. But after digging a while on the net, I’ve found that: 1. Cyberark vault is available on Cloudbees Jenkins only 2. HarshiCorp vault plugin is available for free 3. Here is a nice example how wrong permissions policy can lead to exposing all credentials. I tried it, works like a magic! :) 回答1: You

Password shows in plain text using Jenkins credentials plugin

让人想犯罪 __ 提交于 2019-12-24 08:28:09
问题 I am trying to use Jenkins Credentials plugin to get user input and make use of it in Jenkinsfile for processing. Since the password field is highly sensitive, I was hoping credentials plugin would mask the password from displaying in the console output. However seems like password is displayed in plain text. I noticed an existing issue https://issues.jenkins-ci.org/browse/JENKINS-38181 that talks about echo statements outside of withCredentials block displays passwords in plain text, which

Jenkins pass or fail build on external executable

送分小仙女□ 提交于 2019-12-24 08:25:10
问题 As part of my build process, I have an EXE that I wrote that pushes database changes to the staging DB. This process encounters errors sometimes, and if so, I would like the build to fail. How can I add the EXE as a build step so that on failure (which I could catch as an exception) I can fail the build and log some details (similar to the way NUNit shows failures)? I would also like the exe to log some other details (like what's changed - whether the build passes or fails). Is there any

Jenkins: Configure ActiveDirectorySecurityRealm Plugin using Groovy

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 08:04:35
问题 I'm currently spending some time setting up a generic configuration using Jenkins AD-SecurityRealm (ActiveDirectorySecurityRealm) Plugin (v2.6) and stuck over a nasty issue: It seems that my approach to (auto) set up a valid AD-connection (following the corresponding documentation) is not working at all. Every time I'll re-init my Jenkins instance an incomplete config.xml will provide - the " bindName " property (XML-node) is always missing. This property is required by the ad-server I'll use

Jenkins parallel build on different agents

≡放荡痞女 提交于 2019-12-24 07:53:30
问题 I have a small example of a Jenkins declarative pipeline that should run on both 'Windows' and 'Linux' agents in parallel. The goal is to dynamically build a configuration matrix (e.g. Release / Debug configurations; different CMake parameters; etc.) and let all combinations run in parallel. However, I'm stuck in building a pipeline that executes the parallel steps from a prepared variable. This is a version of the script where the parallel stages are specified explicitly within the parallel{

How to install jenkins offline?

一个人想着一个人 提交于 2019-12-24 07:45:22
问题 I could successfully install the jenkins online over my laptop. But while trying to install the jenkins offline (on my office workstation which cannot be connected to internet) the hell breaks loose. After running the jenkins.war over command line although the jenkins was successfully installed yet some of the plugins were missing.I managed to get some help from the post How to install a plugin in Jenkins manually? But then each of the plugins have to be individually downloaded and then

Jenkins plain text console output not in real time

两盒软妹~` 提交于 2019-12-24 06:50:59
问题 The "html" version console output works fine for me and displays real time from console. But when I switch to the plain text version (i.e. ), it doesn't work. It only display a small portion of console output until build is complete then it shows full output. For now the problem only exist on console output that is longer than 5k lines. Jenkins version: 1.477 回答1: That is because output is truncated by default around 5k lines, so the full text will always pull the last 5k while the build is

How to attach the build file in jenkins post build email?

人盡茶涼 提交于 2019-12-24 03:55:09
问题 I am new to jenkins. I wish to know as to how to attach the build file generated , into the email sent as the post build action? Thanks 回答1: you can use this plugin, which let you customize the email and attach the build file. 来源: https://stackoverflow.com/questions/24717015/how-to-attach-the-build-file-in-jenkins-post-build-email