Re: How to skip a build after a "git push" done by a Jenkinsfile

2017-03-24 Thread Idan Adar
The above is not the solution. It simply makes the job not run... -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com.

Re: How to git push from a Jenkinsfile?

2017-03-24 Thread Idan Adar
Okay, solved at last. In addition to the below stage, for your reference, I had to also add the id_rsa and id_rsa.pub files to ~/.ssh. Then I had to do a git push manually from the command line which then instructed me to trust the ssh key. Following this, the script from the stage then worked.

Re: How to git push from a Jenkinsfile?

2017-03-24 Thread Kevin Burnett
you may want to omit the -b in "git checkout -b master" if the master branch already exists (seems likely). we use this to make maven release work on any branch (maven release has a similar issue where it cannot work with detached head): sh 'git checkout ' + env.BRANCH_NAME On Friday, March 2

Can I exclude build branches on specific repos in a GitHub Organization?

2017-03-24 Thread Trever
We have a Github Organization defined in Jenkins with branches defined to build (master, develop, etc). There are some repos in our org that we do not want the develop branch to build because it's built on a different Jenkins. Is it possible to exclude the develop branch only on specific repo

Autofill problem with ActiveDirectory plugin

2017-03-24 Thread tarocaravan
I'm experiencing the same issue that was supposed to be resolved by https://issues.jenkins-ci.org/browse/JENKINS-29280 Our environment is Jenkins 2.32.3 on CentOS ActiveDirectory plugin 2.3 Chrome browser ver 56.0.2924.87 The workaround is to manually edit the username in config.xml and resta

Re: Why do I have to refresh Artifactory connection/repositories after Jenkins is restarted

2017-03-24 Thread Baptiste Mathus
/seems/ like a big in the audacity artifactory plugin. If you confirm, then filing at least a jira and precise reproduction steps on a fresh Jenkins install would be a must. Then you could consider working on it yourself. Because there's not necessarily any guarantee someone will work on this. Le

Re: Multiple pipelines in Jenkinsfile

2017-03-24 Thread Mike Rooney
I have not found a solution yet but I'd love to know if there is one. Current best practice seems to be to have a Jenkinsfile which triggers Job DSL to process DSL files located in a subdirectory, so at least they are all organized in your repo and Jenkinsfile serves as the single point of entry. Y

Declarative pipeline Mailer sendToIndividuals does not appear to work

2017-03-24 Thread Jon Dufresne
I'm using a Jenkinsfile using the declarative syntax. In it is the blurb: post { failure { step([$class: 'Mailer', recipients: 'c...@example.com', sendToIndividuals: true]) } } When a build breaks, c...@example.com is correctly emailed. However, the individuals that broke the b

Re: Iteration over list or map in Pipeline script

2017-03-24 Thread Baptiste Mathus
It might have been fixed, I didn't check very recently, but not long ago that kind of loop (Java 5 style) was not working either. So either double check or use c-style loops only in general. Le 14 mars 2017 1:03 AM, "Bill Dennis" a écrit : > You can do it with a for loop. There are issues using

Re: Interactive input with new DSL

2017-03-24 Thread Baptiste Mathus
The general recommendation is to look for it in the tracker, then file it as thoroughly as possible if not. Thanks Le 17 mars 2017 2:40 PM, "Peter Marcoen" a écrit : > I experience the same effect. > > I have a top-level agent definition for the agent I want to use by default. > In some underlyi

Email weekly status report of all jobs running on Jenkins server

2017-03-24 Thread skrp . 1010
Hi all, Thank for your time. *Task:* Email should be sent to a group once in a week of all the jobs which ran from Monday thru Friday in pictorial representation or HTML file like format showing each job success and failure status. (can be comprehensive view also) (Can we do this task by a

docker jenkins override config.xml when restarting container

2017-03-24 Thread maxim . chouinard
Hey guys, i have a jenkins docker container and it has a mounted volume for the JENKINS_HOME which is the /var/jenkins_home/ in the container. Somehow when i create views, those are removed from the config.xml when i restart the container. is there something that i am missing to prevent

Re: multi master jenkins

2017-03-24 Thread Ankita Nema
Havn't tried it. thanks for sharing the link. Do you use it? On Wednesday, March 22, 2017 at 8:05:35 PM UTC-7, suresh kumar wrote: > > Check this plugin > https://wiki.jenkins-ci.org/display/JENKINS/Gearman+Plugin whether it > works for you. > > > On Thursday, March 23, 2017 at 4:58:36 AM UTC+

Re: what is the max no of slaves you have added to jenkins master?

2017-03-24 Thread Ankita Nema
Thank you everyone for the response. This talk was helpful as well. https://www.cloudbees.com/scaling-jenkins-docker-swarm-kubernetes-or-mesos On Wednesday, March 22, 2017 at 4:27:51 PM UTC-7, Ankita Nema wrote: > > Hi ! > > Want to understand how many slaves can we added to jenkins without >

Re: Continous Delivery Plugin w/ manual steps?

2017-03-24 Thread Turbo Fredriksson
On Friday, March 17, 2017 at 2:02:43 PM UTC, Daniel Beck wrote: > On 17.03.2017, at 11:40, Turbo Fredriksson > wrote: > > > > And with _a lot_ of commits (at the moment), there's going to be a lot > of waiting... > > This doesn't cost notable resources if you do it right, i.e. outside node >

Re: Jenkins LDAP and SSHA passwords

2017-03-24 Thread 'Björn Pedersen' via Jenkins Users
And note: FreeIPA is auto-detected only with current master, for older releases you need to configure all attributes manually. See https://gerrit-review.googlesource.com/#/c/94925/ for hints. Björn Am Freitag, 24. März 2017 09:11:50 UTC+1 schrieb Maciej D: > > Hi Björn > > I'm using Freeipa. >

Re: Jenkins LDAP and SSHA passwords

2017-03-24 Thread 'Björn Pedersen' via Jenkins Users
Hi, You can find the docs at: https://gerrit-review.googlesource.com/Documentation/config-gerrit.html#ldap What you pasted is not a valid gerrit LDAP configuration entry. Björn Am Freitag, 24. März 2017 09:11:50 UTC+1 schrieb Maciej D: > > Hi Björn > > I'm using Freeipa. > > That would mean

Re: How to git push from a Jenkinsfile?

2017-03-24 Thread Idan Adar
Joshua, perhaps you mean something like this? The git commands likely miss something... stage ("Publish to npm") { steps { script { STAGE_NAME = "Publish to npm" } // Prepare the workspace deleteDir() sh ''' git checkout -b master

Re: How to git push from a Jenkinsfile?

2017-03-24 Thread Idan Adar
Thanks for the question Joshua. Here's the full Jenkinsfile: http://pastebin.com/nG4iTZhQ What happens is this: 1. Developers make a pull request to the master branch from their feature branch. 2. The pull_request webhook tells Jenkins to start working based on the stages in the Jenkinsfile. Thi

Re: How to git push from a Jenkinsfile?

2017-03-24 Thread Joshua Noble
Generally when you do a basic checkout, the Jenkins workspace is in a detached HEAD state. You want to check out to a local branch likely using " localBranch". I have to ask though - if Jenkins does a merge of the PR - why would you need to push? On Friday, March 24, 2017 at 7:37:57 AM UTC-4, Id

Re: How to git push from a Jenkinsfile?

2017-03-24 Thread Idan Adar
Unfortunately it fails with ERROR: No branch repo to push to defined On Friday, March 24, 2017 at 3:34:34 PM UTC+3, Mark Waite wrote: > > That seems reasonable. I haven't evaluated that pull request, so I don't > know the steps for sure, that's just my assumption. > > Mark Waite > > On Fri, Mar

Re: How to git push from a Jenkinsfile?

2017-03-24 Thread Mark Waite
That seems reasonable. I haven't evaluated that pull request, so I don't know the steps for sure, that's just my assumption. Mark Waite On Fri, Mar 24, 2017 at 6:32 AM Idan Adar wrote: > More context: > > sh "npm --no-git-tag-version version minor" > > // commit the updated version number back

Re: How to git push from a Jenkinsfile?

2017-03-24 Thread Idan Adar
More context: sh "npm --no-git-tag-version version minor" // commit the updated version number back to GHE sh "git commit -am 'Bumped version number [ci skip]'" gitPublisher branchesToPush: [[branchName: 'master']], credentialsId: 'caf2691d-42c7-4d10-acf0-cf5fcc2575a4', url: 'h

Re: How to git push from a Jenkinsfile?

2017-03-24 Thread Idan Adar
So, a scenario: assuming I have checked out the master branch, ran some unit tests and if all is okay I published to npm... I now up the version number in package.json and I want this change pushed back to master... using this plugin and the following generated snippet: gitPublisher branchesToP

Re: How to git push from a Jenkinsfile?

2017-03-24 Thread Mark Waite
I suspect that the "Pipeline Syntax" link will display a new step "Git Publisher" which can then be used to generate the Jenkinsfile syntax for the Git Publisher. If you're using declarative, then I suspect that it's user interface will also show a Git Publisher step. Mark Waite On Fri, Mar 24,

Re: How to git push from a Jenkinsfile?

2017-03-24 Thread Idan Adar
I can try. What are the instructions after updating the plugin? On Friday, March 24, 2017 at 3:05:35 PM UTC+3, Mark Waite wrote: > > PR452 is a pending pull request for the git plugin which adds GitPublisher > support to pipeline. > > If you're willing to download and test > https://ci.jenkins.

Re: How to git push from a Jenkinsfile?

2017-03-24 Thread Mark Waite
PR452 is a pending pull request for the git plugin which adds GitPublisher support to pipeline. If you're willing to download and test https://ci.jenkins.io/job/Plugins/job/git-plugin/view/change-requests/job/PR-452/lastSuccessfulBuild/artifact/target/git.hpi , you could provide feedback on that p

Re: How to git push from a Jenkinsfile?

2017-03-24 Thread Idan Adar
Examples: git push ':@https://github..git/ ' But it says: fatal: I don't handle protocol ':@https' Then also tried: git remote set-url origin https://:@github..git

kubernetes-plugin: logging output

2017-03-24 Thread 'Sascha Vujevic' via Jenkins Users
Hello developers, we use the kubernetes-plugin to produce slaves in Jenkins. In the logfile we can see following output: *12:38:52* [slave-test-npm] Running shell script *12:38:52* Executing shell script inside container [npm] of pod [kubernetes-cfebda342f4349e9a12bb07ff3b1db8c-9801f82825b9f] *

Re: How to git push from a Jenkinsfile?

2017-03-24 Thread Idan Adar
Note: this is done in a declarative pipeline. jglick, thoughts? On Friday, March 24, 2017 at 2:37:57 PM UTC+3, Idan Adar wrote: > > How do you get "git push" to work in a Jenkinsfile? I am not sure what am > I missing. > > The Jenkinsfile checkouts a repo using an access token (this is configure

How to git push from a Jenkinsfile?

2017-03-24 Thread Idan Adar
How do you get "git push" to work in a Jenkinsfile? I am not sure what am I missing. The Jenkinsfile checkouts a repo using an access token (this is configured in the Jenkins UI for the job). The Jenkins file also does a merge of a PR in one of its stages: withCredentials([usernamePassword(cre

Re: Issues with SSH Host Key Verification

2017-03-24 Thread Harald Wellmann
Yes, I can ssh both ways. The problem seems to be that the SSH lib used by Jenkins does not support newer ciphers like ecdsa-sha2-nistp256. After deleting the known_hosts entry and creating a new one via ssh -o HostKeyAlgorithms=ssh-rsa slave2.example.com Jenkins no longer complains. I'm not a

Re: Jenkins LDAP and SSHA passwords

2017-03-24 Thread Maciej Drobniuch
Hi Björn I'm using Freeipa. That would mean that I'm using a wrong DN? I'm using the DN because it's able to see tha password hashes. Thanks for help! Server: ldaps://ipa.mydomain root DN: dc=mydomain,dc=com User search base: cn=users,cn=accounts User search filter: (objectClass=inetOrgPerson)

Re: Run pipeline only when new commits for a specific tag

2017-03-24 Thread Stefano Tranquillini
i move the tag to the commit i want. the fact is that i can use the tag. but if i trigger the pipeline every commit it will build even if the tag. commit is it changed. right? if i've v1 v2 etc. which build will jenkins do? all? Il giorno gio 23 mar 2017 alle 16:40 Cuong Tran ha scritto: > Tags

Re: Jenkins LDAP and SSHA passwords

2017-03-24 Thread 'Björn Pedersen' via Jenkins Users
Hi, that's not how LDAP-auth normally works: Jenkins takes the user and password, and tries an LDAP bind with this password. If the LDAP server returns success, then the login is granted. I suspect there is some other problem with your LDAP config. Questions: * What type of LDAP server ar