jenkins-pipeline

This version of OSX is not able to perform the necessary dSYM transformations

我的未来我决定 提交于 2020-07-06 07:48:03
问题 [31merror: could not complete submission of dSYM at /Users/XXUSERXX/Library/Developer/Xcode/DerivedData/ProjectName-flcoueeibbfifebpxptgzctdsqel/Build/Intermediates.noindex/ArchiveIntermediates/ProjectNameAlpha/BuildProductsPath/ProjectNameAlpha-iphoneos/ProjectName.app.dSYM: Error Domain=com.crashlytics.mac.error-domain.process-dsym Code=4 "This version of OSX is not able to perform the necessary dSYM transformations." UserInfo={NSLocalizedFailureReason=This version of OSX is not able to

Call parameterized Jenkins pipeline from another pipeline

[亡魂溺海] 提交于 2020-06-27 09:14:10
问题 There is any way to trigger a pipeline job from another pipeline with parameters, i already tried build job: '/myjob', parameters: [string(name: 'param1', value:'val1')], wait: false also tried build job: 'myjob', parameters: [string(name: 'param1', value:'val1')], wait: false and build job: 'myjob', parameters: [[$class: 'StringParameterValue', name: 'param1', value: 'val1']], wait: false with no luck, it says: Item type does not support parameters 回答1: Since the subjob was another

How can I access artifacts created by Jenkins in the lastSuccessfulBuild through a URL?

纵饮孤独 提交于 2020-06-27 07:10:23
问题 I'm building an Android application using Jenkins pipeline. When a build finishes successfully, it creates an .apk file. I want members of the QA team to be able to download this file and test the application before uploading it Google store and so I want these users (which have access to the Jenkins server) to be able to access the artifact through a URL on the Jenkins server as shown in this SO question but for some reason the URL I'm using to try and download the artifact keeps giving me

Sed inside jenkins pipeline

不问归期 提交于 2020-06-25 18:10:08
问题 I am trying to run the below in jenkins and i get error any suggestions? sh ''' sed -i \':a;N;$!ba;s/\\n/\\|\\#\\|/g\' ${concl} ''' Error - Why isnt the ${concl} being repalced with filename inside the shell script? + sed -i ':a;N;$!ba;s/\n/\|\#\|/g' sed: no input files 回答1: I would suggest running bash command in double quotes and escape $ and \ character. Consider following Jenkins pipeline exemplary script: #!/usr/bin/env groovy pipeline { agent any stages { stage('Build') { steps { echo

Sed inside jenkins pipeline

一个人想着一个人 提交于 2020-06-25 18:09:41
问题 I am trying to run the below in jenkins and i get error any suggestions? sh ''' sed -i \':a;N;$!ba;s/\\n/\\|\\#\\|/g\' ${concl} ''' Error - Why isnt the ${concl} being repalced with filename inside the shell script? + sed -i ':a;N;$!ba;s/\n/\|\#\|/g' sed: no input files 回答1: I would suggest running bash command in double quotes and escape $ and \ character. Consider following Jenkins pipeline exemplary script: #!/usr/bin/env groovy pipeline { agent any stages { stage('Build') { steps { echo

Jenkins + Docker: How to control docker user when using Image.inside command

自古美人都是妖i 提交于 2020-06-24 07:04:50
问题 Dear Stackoverflow Community, I am trying to setup a Jenkins CI pipeline using docker images as containers for my build processes. I am defining a Jenkinsfile to have a build pipeline as code. I am doing something like this: node { docker.withRegistry('http://my.registry.com', 'docker-credentials') { def buildimage = docker.image('buildimage:latest'); buildimage.pull(); buildimage.inside("") { stage('Checkout sources') { git url: '...', credentialsId: '...' } stage('Run Build and Publish') {

Jenkins Agent Cannot run program “docker”: error=2, No such file or directory

浪尽此生 提交于 2020-06-17 15:03:33
问题 I have a strange behaviour with my jenkins agent. i have a master and a seperate build agent, which has access to docker. while i'm running the following pipeline script on the build agent: node { sh "id" sh "echo $PATH" sh "docker ps" docker.image("node:latest").inside("") { sh "npm --version" } } i get the following output: Running on docker-agent in /home/jenkins/workspace/test [Pipeline] { [Pipeline] sh [test] Running shell script + id uid=1000(jenkins) gid=1000(jenkins) groups=900(docker

SCP from Windows to Linux using Jenkins pipeline script

跟風遠走 提交于 2020-06-16 19:13:12
问题 I want to do SCP from Windows Jenkins node to Linux server. In this set up, Windows machine is a Jenkins slave and the target server where i want to copy is Linux. Below is my Jenkins pipeline script. Before the below script runs, i am cloning the repository and then building the project which finally creates a .jar file. I want to copy this file to Linux server. stage('SCP JAR file') { steps { bat 'scp /c/Jenkins/workspace/migration/test-project/build/libs/ssupservice-0.0.1-SNAPSHOT.jar

Using failFast with closure map breaks “parallel” step

梦想的初衷 提交于 2020-06-10 07:36:02
问题 Not sure if it's my limited knowledge of Groovy or a quirk in Pipeline parallel step. I can't make it accept failFast if I use map instead of passing each closure individually: def map = [:] map['spam'] = { node { echo 'spam' } } map['eggs'] = { node { echo 'eggs' } } parallel map // Works. parallel spam: map['spam'], eggs: map['eggs'], failFast: true // Works. parallel map, failFast: true // Fails with exception. The exception with failFast is: java.lang.IllegalArgumentException: Expected

Jenkins Pipeline docker.build() gives error '“docker build” requires exactly 1 argument(s)'

五迷三道 提交于 2020-06-09 16:43:28
问题 With this minimal Jenkins Pipeline script node { docker.build("foo", "--build-arg x=y") } I'm getting a confusing error "docker build" requires exactly 1 argument(s). But as per the documentation, the signature of docker.build() is build(image[, args]) (from Jenkins /job/dockerbug/pipeline-syntax/globals#docker ) build(image[, args]) Runs docker build to create and tag the specified image from a Dockerfile in the current directory. Additional args may be added, such as '-f Dockerfile.other -