Jenkins

Syntax error in one of two almost-identical batch scripts: “)” cannot be processed syntactically here

拥有回忆 提交于 2020-06-07 05:29:45
问题 I am trying to set up a Jenkins server for automatic Unity builds. Therefore I have written two (in my eyes) basically identical batch scripts. Both scripts are run as build steps by Jenkins via an Execute Windows batch command step using Command: E:\unityImport.bat and after that a second Execute Windows batch command step using Command: E:\unityBuild.bat They both have the same beginning as I need to gather some file paths and in particular the project's unity version. So in both scripts I

How to change the number of builds kept by Jenkins?

雨燕双飞 提交于 2020-05-29 11:06:06
问题 How can one set the number of builds kept by Jenkins for a specific job? Jenkins keeps the last 30 builds of all our jobs. For a specific job, though, we would like to keep 60 builds, not 30. I went to the job's configuration page, ticked "Discard old builds", entered "60" into "Max # of builds to keep", saved the job configuration, and restarted Jenkins. After this change, Jenkins still keeps only 30 builds of the job. What am I doing wrong? Related question: Why are only 30 builds kept? (I

Jenkins fails to build multi-module Maven project

不羁的心 提交于 2020-05-29 05:39:32
问题 I have a multi-module Maven project where I have multiple micro services as modules so I have modules listed in my parent pom.xml like below: <modules> <module>core</module> <module>model-base</module> <module>module1</module> <module>module2</module> ... <module>module5</module> <module>module7</module> <module>module6</module> </modules> Here the module7 is dependent on module5, 6 so I have dependencies listed like below in my module7 pom.xml : <parent> <artifactId>pojectA</artifactId>

Mark Jenkins build as success, in case of timeout on input? (declarative pipeline)

时光总嘲笑我的痴心妄想 提交于 2020-05-28 13:48:48
问题 I'm creating a declarative Jenkins pipeline, that looks like this: pipeline { agent { label 'mylabel' } stages { stage('Install dependencies') { milestone() steps { sh "yarn install" } } stage('Lint files') { steps { sh "eslint src" } } stage('Create bundle') { steps { sh "yarn run build:server" sh "yarn run build:client" } } stage('Publish') { steps { timeout(time: 15, unit: 'SECONDS') { input(message: 'Deploy this build to QA?') } // deployment steps } } } } It works great, however, if the

Mark Jenkins build as success, in case of timeout on input? (declarative pipeline)

六眼飞鱼酱① 提交于 2020-05-28 13:47:22
问题 I'm creating a declarative Jenkins pipeline, that looks like this: pipeline { agent { label 'mylabel' } stages { stage('Install dependencies') { milestone() steps { sh "yarn install" } } stage('Lint files') { steps { sh "eslint src" } } stage('Create bundle') { steps { sh "yarn run build:server" sh "yarn run build:client" } } stage('Publish') { steps { timeout(time: 15, unit: 'SECONDS') { input(message: 'Deploy this build to QA?') } // deployment steps } } } } It works great, however, if the

Mark Jenkins build as success, in case of timeout on input? (declarative pipeline)

守給你的承諾、 提交于 2020-05-28 13:45:56
问题 I'm creating a declarative Jenkins pipeline, that looks like this: pipeline { agent { label 'mylabel' } stages { stage('Install dependencies') { milestone() steps { sh "yarn install" } } stage('Lint files') { steps { sh "eslint src" } } stage('Create bundle') { steps { sh "yarn run build:server" sh "yarn run build:client" } } stage('Publish') { steps { timeout(time: 15, unit: 'SECONDS') { input(message: 'Deploy this build to QA?') } // deployment steps } } } } It works great, however, if the

How to speed up git pulling triggered using jenkins?

空扰寡人 提交于 2020-05-27 13:48:10
问题 This is a xamarin mobile application of size more than 2 GB. My lead was able to build it using MSBuild. I am given the task of automating the build using Jenkins with MSBuild as plugin. Since this is a very big application, git pulling has already taken more than one hour and the task progress bar is showing around 95%. Question 1) How can I speed up this jenkins/git pulling process? I am working on the client's virtual machine and internet speed is fairly good I am sharing my jenkins

Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy default-deploy on project

◇◆丶佛笑我妖孽 提交于 2020-05-27 06:16:21
问题 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project. Failed to deploy artifacts: Could not transfer artifactReturn code is: 401, ReasonPhrase: Unauthorized. -> [Help 1] There was no changes made since last successful build. I double check settings.xml(username and password).Also check in pom.xml(distribution management) I working on this issue since last 2 days.I gone through all the forum,nothing works.please help me out. 回答1:

Chrome is not stable on my jenkins and ubuntu 18.04

落爺英雄遲暮 提交于 2020-05-27 04:59:09
问题 Chrome is not stable on my Jenkins. When I run build 5 times, it runs 1 - 2-time success, and the other 3 times I have the above error. Code for Chrome : ChromeOptions options = new ChromeOptions(); System.setProperty("webdriver.chrome.driver","/usr/local/bin/chromedriver"); options.addArguments("--headless"); options.addArguments("--no-sandbox"); options.addArguments("--disable-dev-shm-usage"); driver = new ChromeDriver(options); driver.get("https://mywebsite.com"); Some steps I have already

Jenkins Pipeline - global pipeline library updates show up in job's list of recent changes, how to prevent this?

浪尽此生 提交于 2020-05-26 07:58:53
问题 I don't want my global pipeline changes to show up in Jenkins list of changes. Whenever a build is ran and there are global pipeline updates, the list of changes for that build include all updates made to the global pipeline. I only want the list of changes that the build picked up from the SCM branch that is being built, not any of the global pipeline updates. Is this possible? 回答1: Such option to disable the changelog exists since version 2.9 of the Pipeline Shared Groovy Libraries Plugin: