Jenkins

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

北战南征 提交于 2020-05-26 07:57:48
问题 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:

Publish Karma unit tests in Jenkins

六月ゝ 毕业季﹏ 提交于 2020-05-26 05:30:41
问题 Jenkins already builds my Maven Java project. I want the results of karma unit tests to show up in Jenkins, but unfortunately I cannot introduce any configuration changes in Jenkins. How karma should be configured to acomplish that? 回答1: in order for Jenkins to be able to parse karma test results they must be published in the Junit XML format, the plugin that does that is karma-junit-reporter junit test results ( outputFile in the karma configuration file) must be stored in target/surefire

Permission denied error invoking Docker on Mac host from inside Docker Ubuntu container as non-root user

痴心易碎 提交于 2020-05-25 17:22:19
问题 I'm trying to invoke docker on my OSX host running Docker for Mac 17.06.0-ce-mac17 from inside a running jenkins docker container (jenkins:latest), per the procedure described at http://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/.   I mount /var/run/docker.sock into the container, I stick a ubuntu docker binary inside it, and it's able to execute - but from inside the container as user "jenkins" when I run e.g. "docker ps" I get Got permission denied while trying to

Permission denied error invoking Docker on Mac host from inside Docker Ubuntu container as non-root user

让人想犯罪 __ 提交于 2020-05-25 17:19:30
问题 I'm trying to invoke docker on my OSX host running Docker for Mac 17.06.0-ce-mac17 from inside a running jenkins docker container (jenkins:latest), per the procedure described at http://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/.   I mount /var/run/docker.sock into the container, I stick a ubuntu docker binary inside it, and it's able to execute - but from inside the container as user "jenkins" when I run e.g. "docker ps" I get Got permission denied while trying to

Permission denied error invoking Docker on Mac host from inside Docker Ubuntu container as non-root user

老子叫甜甜 提交于 2020-05-25 17:19:02
问题 I'm trying to invoke docker on my OSX host running Docker for Mac 17.06.0-ce-mac17 from inside a running jenkins docker container (jenkins:latest), per the procedure described at http://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/.   I mount /var/run/docker.sock into the container, I stick a ubuntu docker binary inside it, and it's able to execute - but from inside the container as user "jenkins" when I run e.g. "docker ps" I get Got permission denied while trying to

Trigger workflow on Github push - Pipeline plugin - Multibranch configuration

旧时模样 提交于 2020-05-24 17:36:47
问题 We are using the pipeline plugin with multibranch configuration for our CD. We have checked in the Jenkinsfile which works off git. git url: "$url",credentialsId:'$credentials' The job works fine, but does not auto trigger when a change is pushed to github. I have set up the GIT web hooks correctly. Interestingly, when I go into a branch of the multibranch job and I click "View Configuration", I see that the "Build when a change is pushed to Github" is unchecked. There is no way to check it

can not create file via Groovy code(or java code) in jenkinsfile of a pipeline job on Jenkins

被刻印的时光 ゝ 提交于 2020-05-23 10:07:28
问题 pipeline { agent any stages { stage('Build') { steps { echo 'Building..' echo "whoami".execute().text script { File f = new File('/home/jenkins/test2.txt'); f.createNewFile(); } } } stage('Test') { steps { echo 'Testing..' } } stage('Deploy') { steps { echo 'Deploying....' } } } } Jenkins console log: (got exception: Started by user Edgar Yu Running in Durability level: MAX_SURVIVABILITY [Pipeline] node Running on Jenkins in /var/jenkins_home/workspace/test2 [Pipeline] { [Pipeline] stage

Hide command executed, only show output

前提是你 提交于 2020-05-23 08:03:47
问题 I want to hide jenkins sh execute command in pipeline pipeline { agent any stages { stage('Load Lib') { steps { sh "ls -al /" } } } } Current result: [Pipeline] { [Pipeline] stage [Pipeline] { (Load Lib) [Pipeline] sh [Test] Running shell script + ls -al / I want to hide Running shell script ls -al / command in output. Please help 回答1: This is definitely related to Echo off in Jenkins Console Output For pipeline, what this means is: pipeline { agent any stages { stage('Load Lib') { steps { sh

kubectl exec into pod resulting in Unable to use a TTY error every time if run through automation

。_饼干妹妹 提交于 2020-05-17 09:24:32
问题 i have a simple automation to exec into a kubernetes pod but it always results in the below error :- kubectl exec -it my-pod -c my-contaner -n my-namespace /bin/bash Unable to use a TTY - input is not a terminal or the right kind of file I am trying to run a simple shell script using jenkins to exec into a pod and execute ls -las in the root directory but its not allowing to exec into the pod automatically. The same thing works fine if i do manually on the linux server terminal. Can someone

Tomcat deploy script returns 405

泪湿孤枕 提交于 2020-05-17 07:32:22
问题 I am setting up Jenkins to learn how to implement the automated deployment of a maven project in tomcat. tomcat-users.xml has the roles and username defined, the ones of interest <role rolename="manager-script"/> <user username="jenkins" password="jenkins" roles="manager-script"/> I have set up web.xml to allow the PUT method <init-param> <param-name>readonly</param-name> <param-value>false</param-value> </init-param> and even tried to setup the manager application to allow the PUT method for