Jenkins

Escaping parameters with white space in the docker .withRun command in Jenkins declarative pipeline

倖福魔咒の 提交于 2021-02-11 14:33:09
问题 Currently unable to get my head around how to correctly pass my parameters from Jenkins, to the docker .withRun function, in Jenkins Docker Plugin (specifically in declarative pipelines), which contain whitespace. Tried an unknown amount of methods to get this working and currently at a loss. See code below stage('Send Notifications') { steps { // Send a notification based on the parameters passed script { docker.withRegistry(registry, registryCredentials) { // echo "${TITLE}" docker.image(

Permission denied when connecting to docker daemon on jenkinsci/blueocean image deployed to kubernetes

萝らか妹 提交于 2021-02-11 14:32:57
问题 Summary Running a declarative pipeline job in jenkins which was deployed to a kubernetes cluster fails when using the docker agent with the following error: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.39/images/create?fromImage=node&tag=10.15.1: dial unix /var/run/docker.sock: connect: permission denied How can I solve this permission error in the kubernetes declaration? Background We have

how to use jenkins to build 32 bit and 64 bit program and sealed in one package

南楼画角 提交于 2021-02-11 14:27:54
问题 it is another time to seek help from stack overflow . I am trying to use jenkins , My aim is to build a windows install package that contains 32bit and 64bit version. My prior manual routine is : built the 32bit and 64bit separately , and use innoSetup to build the package containing 2 versions. if use jenkins ,the procedure will be : a linux jenkins server(master) send a build request to windowns jenkins server(agent) agent checkout code from svn built the package with 2 versions I guess the

Jenkins check which plugins are not being used

做~自己de王妃 提交于 2021-02-11 13:27:49
问题 I have over 150+ plugins installed on Jenkins and was wondering how to (running Jenkins Console Script maybe?) find the plugins that are not being used at all. Is there a way to get a list like that? EDIT: I found this plugin, although it shows only ~half of all plugins how many jobs use it, the other half is ignored and not showed if they are being used 回答1: It is hard question. Plugin usage plugin shows you list of plugins and number of jobs, which are using these plugins. But there is a

Jenking not displaying build history from a single user

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-11 13:15:14
问题 Latest Jenkins 1.615. Server is working on FreeBSD (x64). Open https://my_domain/ user /my_user/ builds Chrome browser doesn't give any communication errors in the console. And there are no builds for any user. Any suggestions? 回答1: Can you provide more information? That would be helpful for others to provide potential helpful answer. Well, when I try on my own machine, it works fine for me. Accessing http://localhost:8080/user/admin/builds return me all the builds executed by user admin 来源:

How to remove an LDAP user from Jenkins

别说谁变了你拦得住时间么 提交于 2021-02-11 12:33:33
问题 I know it's weird but I can't delete/disable users from Jenkins. I check everywhere but no chance. Jenkins ver is 2.217 When I click "People"-->"Any User", the options are like below; If I click "configure" page and there is also nothing. I also checked "Manage jenkins"->"Configure Global Security" but nothing in there also. How can i do that? Thanks! 回答1: For a short answer: you can't do it from Jenkins Jenkins LDAP authentication works as a gateway and passes all user/passwords request to

How to trigger another Jenkins pipeline that needs a $BRANCH variable?

旧巷老猫 提交于 2021-02-11 12:32:29
问题 I have 3 pipelines. Say: build-and-release build release I'm refactoring my pipelines, so that I can just call the build and release jobs, from within the build-and-release . Something along these lines: // build-and-release JenkinsFile node('master') { build job: "build", propagate: true, wait: true build job: "release", propagate: true, wait: true } // build JenkinsFile node('master') { stage('Build') { // do stuff } } // release JenkinsFile node('master') { stage('Release') { // do other

yarn install consumes all memory on TeamCity and Jenkins

偶尔善良 提交于 2021-02-11 12:29:21
问题 I'd really like to get yarn working with TeamCity or Jenkins, however yarn install consumes all my build server's cpu & memory, even with a tiny npm project. Any idea why? Summary yarn install , when run by TeamCity or Jenkins, consumes most CPU/memory, never finishes running yarn install from the command line on the build server works (finishes in a few seconds) npm install completes in a few seconds when run by TeamCity/Jenkins build server: Windows Server 2012, 2 cores, 4GB mem yarn

Jenkins concurrent builds on docker slaves

血红的双手。 提交于 2021-02-11 12:11:36
问题 I have a Jenkins Server (2.204.1) with Docker plugin (1.1.9) and a docker cloud API. I work with Jenkins docker agents (slaves) And i map the docker slave build workspace between the container and the host in order to be able to path Artifacts to the downstream jobs. in Jenkins Configuration - Docker Cloud Details - Container settings: Volumes /var/lib/jenkins:/var/lib/jenkins This works fine for a single build , The problem starts when i run concurrent builds, They are all mapped to the same

List Jenkins job build detials for last one year along with the user who triggered the build

寵の児 提交于 2021-02-11 06:51:05
问题 Is there any simple way to work with APIs or with scripting to get list of all builds performed on all jobs for last one year along with the user who triggered the build as a report? 回答1: This should do. Run from <JENKINS_URL>/script or in a Jenkins job with an " Execute System Groovy Script " (not an "Execute Groovy script"). Updated: to include details from the subject line. def jobNamePattern ='.*' // adjust to folder/job regex as needed def daysBack = 365 // adjust to how many days back