jenkins-2

Pipeline to use artifacts from 2 projects associated by the same git branch name

元气小坏坏 提交于 2019-12-13 02:58:18
问题 the company where I work for is evaluating jenkins 2.71, in particular the pipeline and blue ocean plugins. We already tested also GoCD and we need, as in GoCD , a way for a pipeline to automatically fetch the artifacts from 2 other pipelines (taking the last successful result of each one of them), here our case. We have these initial pipelines (build & run tests), which reflect 2 projects: frontend , ~ 15 minutes backend , ~10 minutes I created a pipeline called configure (~1 minute), with e

Groovy: regex to filter out “Key:Value” pair and store in an array

牧云@^-^@ 提交于 2019-12-12 04:34:23
问题 I am writing a GROOVY script for a Jenkinsfile to do following: Step-1: read the input file info_file.txt . Contents of info file are as under: sh> cat info_file.txt CHIP_DETAILS:1234-A0;1456-B1;2456-B0;3436-D0;4467-C0 Step-2: Store the CHIP_DETAILS in an array after removing the suffix -A0,-B1 etc.. for example: Integer[] testArray = ["1234", "1456", "2456" , "3436" , "4467"] Step-3: print the elements of the array sequentially. For example: testArray.each { println "chip num is ${it}" } I

Jenkins PackageCloud upload - Missing artifact - fingerprint - No such file or directory

感情迁移 提交于 2019-12-12 03:57:28
问题 Using: Jenkins: 2.7.2 PackageCloud Plugin: 1.11 Created a new trial account in packagecloud.io site, created a new private repository (URL just fyr: https://packagecloud.io/arunsangal/deb_stuff). As per the docs, I created a new Jenkins credential under packagecloud.io new domain. Then, in Jenkins packagecloud.io domain credential, I created a new user ( arunsangal ) and provided the password value (i.e. the generated API token which I got packagecloud.io site) and configured it as per the

Jenkins Log parser plugin - parsed console log page is not showing Load denied by X-Frame-Options does not permit framing ERR_BLOCKED_BY_RESPONSE

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 10:31:56
问题 Jenkins version: 1.642.3 or 2.32.3 Jenkins machine Ubuntu 14.04 Log parser plugin: 2.0 Browsing Jenkins from my Mac OS sierra machine. In Jenkins global configuration, I created a new entry (description and file path (full) where the file contains the following contents). error /ERROR: Couldn't find any revision to build./ error /SyntaxError: Use of const in strict mode./ error /svn: E220003: / error /npm ERR! fetch failed/ error /ERROR: Found inconsistencies/ error /ERROR: svn up failed for

Jenkins Copy Artifact unable to find folder/multiProjectPipeline/branchWithSlash

爷,独闯天下 提交于 2019-12-10 21:14:46
问题 I have Jenkins LTS 2.60.2 on Windows Server 2016 and using these plugins: Folders plugin (6.1.0) Copy Artifact plugin (1.38.1) Pipeline plugin (2.5) + all dependent pipeline sub-plugins Various other dependent plugins... See Pipeline to use artifacts from 2 projects associated by the same git branch name for more details about my setup, but to sum it up I have these items: playground (a folder created with the Folders plugin to group all these following items) frontend (multibranch pipeline)

should I use Jenkins heavyweight or flyweight executors for notifications?

China☆狼群 提交于 2019-12-10 19:16:58
问题 I have few steps in my Jenkins pipeline that notify users, in my case using Slack integration. is it a good practice to write the notification code inside a node block to use a heavyweight executor or just leave it outside to make use of a flyweight executor? According to the documentation: Every Pipeline build itself runs on the master, using a flyweight executor — an uncounted slot that is assumed to not take any significant computational power. This executor represents the actual Groovy

Read interactive input in Jenkins pipeline to a variable

做~自己de王妃 提交于 2019-12-06 07:01:28
问题 In a Jenkins pipeline, i want to provide an option to the user to give an interactive input at run time. I want to understand how can we read the user input in the groovy script. Request to help we with a sample code: I'm referring to following documentation: https://jenkins.io/doc/pipeline/steps/pipeline-input-step/ EDIT-1: After some trials i've got this working: pipeline { agent any stages { stage("Interactive_Input") { steps { script { def userInput = input( id: 'userInput', message:

Configure Jenkins 2.0 with Ansible

老子叫甜甜 提交于 2019-12-06 04:50:44
问题 I am using Ansible for provision our servers, I installed the Jenkins 2.0 but it is becomeing with a startup configuration when I open the web UI. How can I do it with Ansible or shell or jenkins-cli. CentOS 7, Ansible 2.0.1.0. So, Installing Jenkins 2.0 from http://pkg.jenkins-ci.org/redhat-rc/jenkins-2.0-1.1.noarch.rpm rpm. Install java with yum. Service start jenkins. Open 192.168.46.10:8080, which is opening the Jenkins. In Web UI adding the initial admin password. In web UI select and

Jenkins 2 Multibranch Pipelines - How can I limit the visibility/execution of branches using the Role Strategy Plugin?

非 Y 不嫁゛ 提交于 2019-12-04 22:18:46
问题 I am using multibranch pipelines in projects with two branches: develop and master. This creates two subprojects, one for each branch: App_Pipeline |---master |---develop I have set up the Role Strategy plugin to control the authorization (visibility) of the jobs/pipelines depending on the assigned role. Project Roles : manager : Uses a regexp App_.* developer : Uses a regexp App_.* With my current roles, both types of users see the superproject (App_Pipeline), and can execute both

Read interactive input in Jenkins pipeline to a variable

百般思念 提交于 2019-12-04 15:36:57
In a Jenkins pipeline, i want to provide an option to the user to give an interactive input at run time. I want to understand how can we read the user input in the groovy script. Request to help we with a sample code: I'm referring to following documentation: https://jenkins.io/doc/pipeline/steps/pipeline-input-step/ EDIT-1: After some trials i've got this working: pipeline { agent any stages { stage("Interactive_Input") { steps { script { def userInput = input( id: 'userInput', message: 'Enter path of test reports:?', parameters: [ [$class: 'TextParameterDefinition', defaultValue: 'None',