Jenkins

how to copy files from a directory outside the workspace to workspace in Jenkins pipeline

送分小仙女□ 提交于 2021-02-07 08:12:38
问题 I'm starting with Jenkins pipelines, and I want to copy some video files from outside any jenkins directory to my job workspace directory. I'm using the File Operations Plugin to perform some file operations for other jobs I have. With that plugin, I'm able to copy files from inside my workspace to outside: fileOperations([fileCopyOperation(excludes: '', flattenFiles: false, includes: "videos\\*.MTS", targetLocation: "H:\\home\\Videos")]) With this step, for example, I can copy 4 video files

how to copy files from a directory outside the workspace to workspace in Jenkins pipeline

醉酒当歌 提交于 2021-02-07 08:11:31
问题 I'm starting with Jenkins pipelines, and I want to copy some video files from outside any jenkins directory to my job workspace directory. I'm using the File Operations Plugin to perform some file operations for other jobs I have. With that plugin, I'm able to copy files from inside my workspace to outside: fileOperations([fileCopyOperation(excludes: '', flattenFiles: false, includes: "videos\\*.MTS", targetLocation: "H:\\home\\Videos")]) With this step, for example, I can copy 4 video files

How to run jenkins slave on windows 2012 r2 x64?

元气小坏坏 提交于 2021-02-07 06:44:51
问题 We want to use jenkins to build some specific software on Windows 2012 R2 x64. But when I trying to run it, master node fails whis this error: Connecting to 192.168.1.27 Checking if Java exists C:\Program Files\Java\jdk1.6.0_30\bin\java.exe -version returned 1.6.0. Installing the Jenkins slave service ERROR: Message not found for errorCode: 0xC00000AC org.jinterop.dcom.common.JIException: Message not found for errorCode: 0xC00000AC at org.jinterop.winreg.smb.JIWinRegStub.winreg_OpenHKLM

How to set environment variable from a job and use it in next job in jenkins?

百般思念 提交于 2021-02-07 06:19:07
问题 I want to have a job to set the environment variable and use these environment variables in all the next jobs. How can I set environment variable through Jenkins ? 回答1: Technically, you can't pass env variables from one job to the next, and I'm not aware of a plugin to do that out of the box. There is a technique however. The idea is to create a properties file in the first job (e.g. exported.properties), add that file to the job artifacts, and then import this file via the EnvInject plugin

[iOS开发] 使用Jenkins自动打包并上传至蒲公英

倖福魔咒の 提交于 2021-02-07 05:53:40
设置构建触发器 Poll SCM H/2 * * * * 设置 构建脚本 # #xodebuild & jenkins 自动构建并上传至pgyer.com #2017年5月9日 # #定义一些变量 PROJ_NAME = " zhixinStuApp " cd . / ${PROJ_NAME} ARCHIVE_NAME = " ${PROJ_NAME}#${BUILD_NUMBER}#Pro.xcarchive " LIBRARY_PATH = " ~/Library " ARCHIVE_PATH = " ${LIBRARY_PATH}/Developer/Xcode/Archives/${ARCHIVE_NAME} " DIS_TARGET = " ad-hoc " EXPORT_OPTION_PATH = " /Users/Shared/exportOptions/ad-hoc.plist " HOST_HEADER_PATH = " /Users/Shared/exportOptions/hostConfig/HostConfig.h.pro.h " IPA_DIR = " ${PROJ_NAME}#${BUILD_NUMBER} " IPA_PATH = " $/Users/Shared/Jenkins/Library/ipas/${IPA_DIR}/${DIS

Jenkins/Hudson CLI API to modify the node labels using Groovy

不问归期 提交于 2021-02-07 05:31:51
问题 Does anyone know how to modify the Jenkins/Hudson node labels in a non-manually way? I mean, thorough an API like the CLI API that this tool offers (without restarting Jenkins/Hudson of course). My guess is that the best option is using a Groovy script to enter into the Jenkins/Hudson guts. Executing something like: java -jar -s HUDSON_URL:8080 groovy /path/to/groovy.groovy Being the content of that script something like: for (aSlave in hudson.model.Hudson.instance.slaves) { labels = aSlave

Get list of branches in Jenkins multibranch pipeline

…衆ロ難τιáo~ 提交于 2021-02-07 04:18:49
问题 The Blue Ocean interface to a Jenkins multibranch pipeline project shows several branches that were automatically created. Is there a programmatic way to list the branches in the pipeline from code to be added to a Jenkinsfile? This question asks about Jenkins Project branch information located inside the Jenkins application object model, which should be accessible via the Jenkins API or CLI. I looked at all the variables that are available at http://<jenkins-home>/env-vars.html/ , but none

Get list of branches in Jenkins multibranch pipeline

≡放荡痞女 提交于 2021-02-07 04:17:20
问题 The Blue Ocean interface to a Jenkins multibranch pipeline project shows several branches that were automatically created. Is there a programmatic way to list the branches in the pipeline from code to be added to a Jenkinsfile? This question asks about Jenkins Project branch information located inside the Jenkins application object model, which should be accessible via the Jenkins API or CLI. I looked at all the variables that are available at http://<jenkins-home>/env-vars.html/ , but none

Get list of branches in Jenkins multibranch pipeline

最后都变了- 提交于 2021-02-07 04:17:03
问题 The Blue Ocean interface to a Jenkins multibranch pipeline project shows several branches that were automatically created. Is there a programmatic way to list the branches in the pipeline from code to be added to a Jenkinsfile? This question asks about Jenkins Project branch information located inside the Jenkins application object model, which should be accessible via the Jenkins API or CLI. I looked at all the variables that are available at http://<jenkins-home>/env-vars.html/ , but none

Jenkinsfile: permission denied when running sh step in Docker container

久未见 提交于 2021-02-06 20:49:56
问题 I have trouble running a simple Jenkinsfile - e.g. pipeline { agent { label 'ssh-slave' } stages { stage('Shell Test') { steps { sh 'echo "Hello World"' } } } } The logfiles of Jenkins on the master show that the container was started successfully but the build job crashes with a message like sh: 1: /home/jenkins/workspace/pipeline@tmp/durable-34c21b81/script.sh: Permission denied Here are some additional things that we configured / figured out: We are running the agent on a VM with RHEL We