jenkins-plugins

Jenkins: how to stop downstream projects when upstream is aborted

。_饼干妹妹 提交于 2020-01-06 08:38:37
问题 I have an upstream project in Jenkins which calls in sequence some downstream projects with the "Trigger/call builds on other projects" plugin. How can I automatically abort a build of any downstream project when I perform the aborting of the upstream project? If the upstream is aborted, the downstream is still running and I want a different behaviour. Thanks. 回答1: As mentioned in my comment, you can have downstream jobs listen to upstream jobs instead of having upstream jobs trigger

Configure SonarQube on Jenkins

眉间皱痕 提交于 2020-01-06 06:42:14
问题 I have SonarQube and Jenkins dockerized(They're running on different containers); sonar is running on localhost:9000 and Jenkins is running on localhost:8080. I configured the Sonar credentials(with acces Token) on Jenkins, but i when run SonarScanner I'm getting the following error by SonarScaner on Jenkins: ERROR: SonarQube server [http://localhost:9000] can not be reached INFO: ---------------------------------------------------------------- INFO: EXECUTION FAILURE INFO: ------------------

Configuring Groovy on Jenkins

≯℡__Kan透↙ 提交于 2020-01-06 06:37:29
问题 I'm using Jenkins ver 2.121.2. I'm trying to configure the Groovy plugin to run groovy scripts via a Jenkins job. The plugin documentation provided here does not appear to match the UI I see in the System Configuration - Groovy section of this version of Jenkins. The various parameters don't match and so far I'm unable to get the plugin to run a simply groovy script. Not being familar with java and how the classpath works I'm not able to loosely interpret the instructions and get it working.

Attach screenshot to failed case on jira through jenkins

余生长醉 提交于 2020-01-06 06:25:15
问题 Hello i am new to jenkins. i have successfully done all the jira and jenkins configurations.If my case fails on jenkins the defect is auto reported on jira.I want to confirm if it is possible to attach the scrrenshot to auto reported defect. i have stored the screenshot for failed cases on my local machine directory. 来源: https://stackoverflow.com/questions/55015955/attach-screenshot-to-failed-case-on-jira-through-jenkins

loop over array of jobs to create them?

▼魔方 西西 提交于 2020-01-06 06:24:13
问题 I have the dsl job configured to delete unreferenced jobs and i want to keep that: Im trying to do this: def bitbucket_team = 'myteam' def bitbucket_user = 'mycreds' def repo_arr = ['job1','job2'] repo_arr.collect { repo -> println "${repo}" multibranchPipelineJob("${repo}") { configure { it / sources / data / 'jenkins.branch.BranchSource' / source(class: 'com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource') { credentialsId("${bitbucket_user}") //checkoutCredentialsId('bitbucket-ssh

Error while uploading ipa to hockeyapp via jenkins

…衆ロ難τιáo~ 提交于 2020-01-06 04:51:13
问题 I am working with jenkins for auto deployment of iOS app via hockey app. I am successful in creating the .ipa file. In the post-buid action at jenkin, I set up the API Token , App File and other setting. Please look into the attached image for more details. However in the console output, I am getting the below error:- Console output : 18:36:11 ** EXPORT SUCCEEDED ** 18:36:11 18:36:11 Archiving dSYM 18:36:11 [Release-iphoneos] $ ditto -c -k --keepParent -rsrc /Users/Shared/Jenkins/Home

Jenkins pipeline to build multiple projects in sequence?

倖福魔咒の 提交于 2020-01-05 07:08:16
问题 I am a novice when it comes to Jenkins. I would like to be able to take different projects and build them in sequence with each other with a Pipeline. I have noticed that Jenkins can run various stages in sequence or in parallel via a Pipeline. Is there a way for this to happen with running projects in sequence or in parallel that exists on the same node? 回答1: Yes, you can use build step to trigger any project (job) you want in Jenkins. See https://jenkins.io/doc/pipeline/steps/pipeline-build

Passing 'build with parameters' to Jenkinsfile from scm in pipeline

喜欢而已 提交于 2020-01-04 03:17:24
问题 I am on jenkins 2.x and using pipeline. I have configured the job to be built with param and have a string param : I also get the Jenkinsfile from github ( pipeline from script) : Now in my Jenkinsfile, I am using the param : ${githubUrl} and it throws error : stdout: stderr: fatal: '${githubUrl}' does not appear to be a git repository So if directly write the pipeline script , this works but fetching from scm fails. Any ideas how to get around it ? 回答1: Use url: githubUrl without dollar sign

Jenkins pipeline ansicolor console output

大城市里の小女人 提交于 2020-01-03 17:42:28
问题 I know it's possible to display color in the console output using the AnsiColor plugin. I tested a basic example below: // This shows a simple build wrapper example, using the AnsiColor plugin. node { // This displays colors using the 'xterm' ansi color map. ansiColor('xterm') { // Just some echoes to show the ANSI color. stage "\u001B[31mI'm Red\u001B[0m Now not" } } However, this example is too basic and essentially hardcoded. Is it possible to utilize AnsiColor to make the entire console

Access file parameter in jenkins

自闭症网瘾萝莉.ら 提交于 2020-01-03 03:32:08
问题 I'm working on a multiconfiguration job( Regression_L1 ) in Jenkins whose task is to run 2 kinds of tests( test1 and test2 ). In the multiconfiguration job, it triggers an executor job( Regression_executor ) to run script for the selected test. The Regression_L1 job is restricted to run in matrix_service_jobs node, while the matrix jobs are to run in the slave node custom_matrix_service_jobs node. The Regression_executor job is restricted to run in remote machines with a specific label(RL1