AW: jenkins not showing viewvc link for CVS

2017-09-12 Thread Reinhold Fuereder
Hi Terry,

this sounds related or like https://issues.jenkins-ci.org/browse/JENKINS-36451 
and/or https://issues.jenkins-ci.org/browse/JENKINS-44956.
Would you mind checking that and ideally also commenting and/or up-voting the 
respective issues?

Frankly, I am not sure though, whether or not these are the root causes of the 
problem…

cu Reinhold


Von: jenkinsci-users@googlegroups.com [mailto:jenkinsci-users@googlegroups.com] 
Im Auftrag von Terry O'Leary
Gesendet: Mittwoch, 13. September 2017 00:14
An: Jenkins Users
Betreff: jenkins not showing viewvc link for CVS

Hey Folks,

I have been looking into this issue for a while now. Basically the problem is 
that when I look on the changes view of a job particularly using a project with 
the CVS repository, the code changes no longer show as a link using the ViewVC 
plugin. I can see the changes in a job, but they don't appear as a link to 
ViewVC.

I ran an older version of Jenkins (version 1.534) and used the ViewVC plugin 
(version 1.6) and I was able to see the link in any jobs that has changes from 
the previous build.

I recently built up a new Jenkins (version 2.65) with the ViewVC plugin 
(version 1.7) and while I see the changes, they are not linking to ViewVC.

The version of ViewVC I used with the old Jenkins was 1.1.20 and it works. 
However the new setup does not work. I actually upgraded to the most recent 
version 1.1.26 of ViewVC and it still works with the old version of Jenkins, 
but not the new version. I don't see any errors in the jenkins logs either.

I don't see any option to rollback the ViewVC plugin to 1.6 via the plugin 
manager. If anyone has encountered this before any input would be great!

Also on a side note, we also use Git and I am able to setup jobs that use Git 
repository to link their changes just fine.

Thanks in advance!
Terry
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/524c4bcf-cc91-4b8c-9b01-009aabbe7fdb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/C3D41C0B1D5991438F1A43F586F4B47F692AF2D4%40TIGER2010.xortex.local.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins slave (EC2 AWS plugin) fails occasionally when build takes too long with error "Caused: java.io.IOException: Unexpected termination of the channel"

2017-09-12 Thread K S
The ansible script is minimal and runs a yocto build process.

Are you suggesting ansible interacting with this plugin could be a problem?

On Tuesday, September 12, 2017 at 12:50:26 PM UTC-4, Joshua Noble wrote:
>
> I've had great success with the EC2 plugin. Might I suggest using 
> Hashicorp Packer to build an AMI, and have the EC2 plugin launch that AMI? 
> That will let you remove Ansible (or any provision tool) out of the 
> equation and save on agent provisioning time. I know that when our cluster 
> scales up another node using the EC2 plugin, we generally need that node 
> online ASAP.
>
> On Monday, September 11, 2017 at 9:32:30 PM UTC-4, K S wrote:
>>
>> I have Jenkins configured to launch EC2 instances (via AWS plugin) to 
>> execute a build.
>> The actual build steps use the Execute Shell method, and launch ansible 
>> scripts.
>>
>> I find that if the ansible script runs for too long, the Jenkins slave on 
>> the EC2 system goes down.
>> The Jenkins GUI shows this error:
>>
>> Connection was broken
>>
>> java.io.EOFException
>>  at 
>> java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2638)
>>  at 
>> java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3113)
>>  at 
>> java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:853)
>>  at java.io.ObjectInputStream.(ObjectInputStream.java:349)
>>  at 
>> hudson.remoting.ObjectInputStreamEx.(ObjectInputStreamEx.java:48)
>>  at 
>> hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34)
>>  at 
>> hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:59)
>> Caused: java.io.IOException: Unexpected termination of the channel
>>  at 
>> hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:73)
>>
>>
>>
>>
>> Some googling lead to this page: 
>> https://wiki.jenkins.io/display/JENKINS/Remoting+issue
>> It suggests I check these log files:
>> 1) connection logs on master - I checked these, and they have the same 
>> information as stack trace.
>> 2) slave logs - I do not know where to find these.  *The locations 
>> suggested do not exist on my slave.*  
>>
>> I even inspected the files that the slave java process opens, and the 
>> only file that seems like a log file ends up being empty:
>>
>> ubuntu@ip-172-31-93-175:~/support$ ps auxww | grep java | grep slave
>> ubuntu25235  8.0  0.5 12211452 157616 ? Ssl  22:23   0:05 java 
>> -jar /tmp/slave.jar
>> ubuntu@ip-172-31-93-175:~/support$ sudo lsof | grep 25235  | grep -i log 
>> | awk '{print $NF}' | sort | uniq
>> /home/ubuntu/support/all_2017-09-11_22.23.07.log
>> ubuntu@ip-172-31-93-175:~/support$ cat 
>> /home/ubuntu/support/all_2017-09-11_22.23.07.log 
>> ubuntu@ip-172-31-93-175:~/support$ 
>>
>>
>>
>> Has anyone run into this issue or know how or where to find the java 
>> slave logs? 
>>
>> Thanks so much.
>>
>>
>> *VERSION INFO:*
>> *Master:*
>> Jenkins ver. 2.60.2
>> Java:  openjdk version "1.8.0_131"
>>
>> *Build node:*
>> Launched via: AWS plugin: 
>> https://wiki.jenkins.io/display/JENKINS/Amazon+EC2+Plugin (latest 
>> version)
>>
>> Ec2 instance running Ubuntu 14.04 and Java 8:
>> ubuntu@ip-172-31-93-175:~$ cat /etc/*release* | grep VERSION
>> VERSION="14.04.5 LTS, Trusty Tahr"
>> VERSION_ID="14.04"
>> ubuntu@ip-172-31-93-175:~$ *java -version*
>> java version "1.8.0_144"
>> Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
>> Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
>>
>>
>>
>>
>>
>>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/f234ccf9-d175-4a56-8f10-8190710f1937%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: jenkinsfile gdsl for intellij not working

2017-09-12 Thread red 888
OK so I created a brand new groovy project and added my files to it and now 
it seems be resolving jenkinsfile stuff, BUT it still doesn't like 
"pipeline" and is still saying it "cannot be applied to 
'(groovy.lang.Closure)'

On Tuesday, September 12, 2017 at 8:51:33 PM UTC-4, red 888 wrote:
>
> followed the instructions and this article:
> https://st-g.de/2016/08/jenkins-pipeline-autocompletion-in-intellij
>
> But the dsl is not working. Made sure it was in src which I marked as a 
> source root. I got the message to Activate Back in Intellij and clicked it 
> but even after doing that for jenkinsfile-isms like "echo" or "powershell" 
> it says "cannot resolve symbol"
>
> Also more alarming I see this for my pipeline block I have in one of my 
> shared libraries:
>
> 
>
> My JAVA_HOME is set correctly, I'm not sure where else to look. I'm not 
> even sure what this error means
>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/453de103-0e7a-41ba-9b01-74eea7ea9edd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


jenkinsfile gdsl for intellij not working

2017-09-12 Thread red 888
followed the instructions and this article:
https://st-g.de/2016/08/jenkins-pipeline-autocompletion-in-intellij

But the dsl is not working. Made sure it was in src which I marked as a 
source root. I got the message to Activate Back in Intellij and clicked it 
but even after doing that for jenkinsfile-isms like "echo" or "powershell" 
it says "cannot resolve symbol"

Also more alarming I see this for my pipeline block I have in one of my 
shared libraries:


My JAVA_HOME is set correctly, I'm not sure where else to look. I'm not 
even sure what this error means

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/6f5284d2-d260-41ce-a010-3ef4f5d4b48e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Build submodule with building the parent module

2017-09-12 Thread Mark Waite
If you want to clone the entire project, but only build the modified
subprojects, I'm not aware of any direct support for that technique.

Are you intending to use it as some form of "incremental build"?  If so,
then you may want to make that incremental build part of your build script
(Makefile, maven pom, etc.) and rely on those scripts to determine which
things have changed since the last build in that workspace.

Another alternative would be to create a job which only operates on the
submodule, without cloning the parent module or any of the other submodules.

Mark Waite

On Tue, Sep 12, 2017 at 5:02 PM jpereira  wrote:

> Hi all,
>
> I'm having toubles setting up the following (which should be very easy but
> I
> cannot find a way to do it, sorry):
>
> I have a big project with several git submodules.
>
> When a change is made to a submodule I want this submodule to build without
> building the all project.
>
> Is this possible to acomplish ?
>
> Thanks in advance,
>
>
>
> --
> Sent from:
> http://jenkins-ci.361315.n4.nabble.com/Jenkins-users-f361316.html
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/1505250650205-0.post%40n4.nabble.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtEm5YMJVmKOfGyXNq_v6U0nrMmQBo4f8a3GvV7QVi4T_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


GitHub pull request for pipelines

2017-09-12 Thread Sharon Grubner
We've been using github pull request builder plugin in our freestyle DSL 
jobs, and now we're in the process of migrating to pipelines.
Is there non-multibranch pipeline support for this plugin? Either scripted 
or declarative pipelines.

If not, is there an alternative supported plugin that could provide similar 
features?

Thanks!
Sharon

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/4a72d537-87f4-492e-983b-52bd9f596eb3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Build submodule with building the parent module

2017-09-12 Thread jpereira
Hi all, 

I'm having toubles setting up the following (which should be very easy but I
cannot find a way to do it, sorry):

I have a big project with several git submodules.

When a change is made to a submodule I want this submodule to build without
building the all project.

Is this possible to acomplish ?

Thanks in advance,



--
Sent from: http://jenkins-ci.361315.n4.nabble.com/Jenkins-users-f361316.html

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/1505250650205-0.post%40n4.nabble.com.
For more options, visit https://groups.google.com/d/optout.


jenkins not showing viewvc link for CVS

2017-09-12 Thread Terry O'Leary
Hey Folks,

I have been looking into this issue for a while now. Basically the problem 
is that when I look on the changes view of a job particularly using a 
project with the CVS repository, the code changes no longer show as a link 
using the ViewVC plugin. I can see the changes in a job, but they don't 
appear as a link to ViewVC.

I ran an older version of Jenkins (version 1.534) and used the ViewVC 
plugin (version 1.6) and I was able to see the link in any jobs that has 
changes from the previous build. 

I recently built up a new Jenkins (version 2.65) with the ViewVC plugin 
(version 1.7) and while I see the changes, they are not linking to ViewVC. 

The version of ViewVC I used with the old Jenkins was 1.1.20 and it works. 
However the new setup does not work. I actually upgraded to the most recent 
version 1.1.26 of ViewVC and it still works with the old version of 
Jenkins, but not the new version. I don't see any errors in the jenkins 
logs either.

I don't see any option to rollback the ViewVC plugin to 1.6 via the plugin 
manager. If anyone has encountered this before any input would be great!

Also on a side note, we also use Git and I am able to setup jobs that use 
Git repository to link their changes just fine.

Thanks in advance!
Terry

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/524c4bcf-cc91-4b8c-9b01-009aabbe7fdb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


build user id in declarative pipeline

2017-09-12 Thread Russ Cox
Hi, I'm using Jenkins to run a bunch of self service jobs and need to be 
able to determine the user id of the person who ran a job.

We've been doing this with the scripted pipeline up until now by using the 
BuildUser plugin (quite why this isn't just a default exported variable I 
don't know, other CI servers do)

wrap([$class: 'BuildUser']) {
 sh 'echo "${BUILD_USER}"'
 sh 'echo "${BUILD_USER_ID}"'
 sh 'echo "${BUILD_USER_EMAIL}"'
}

I can run the following within a step but the variable isn't available to 
subsequent steps.

  steps {
wrap([$class: 'BuildUser']) {
 sh 'echo "${BUILD_USER}"'
 sh 'echo "${BUILD_USER_ID}"'
 sh 'echo "${BUILD_USER_EMAIL}"'
}
echo "${USER_ID}"

Seems like there must be a way round this but can't find an answer in 
documentation or google, any help would be great.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/4be2dcc6-fc13-4e70-bbd4-96556f3d27d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Add Dhttps.protocols=SSLv3,TLSv1.1,TLSv1.2 in Jenkins

2017-09-12 Thread niristotle okram
that depends on how you enabled the https (apache/nginx...?) ..
Understanding a little on SSL wont hurt, instead of posting non-jenkins
questions in a jenkins users distro.

On Tue, Sep 12, 2017 at 1:53 PM, Prasu S  wrote:

> We recently changed Jenkins from http to https . Where should
> Dhttps.protocols=SSLv3,TLSv1.1,TLSv1.2  setup in Jenkins ? TIA
>
> --
> 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.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-users/27253e06-bb52-4cd8-b911-a702811c383f%40googlegroups.
> com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Regards
nirish okram

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAPzcO4jK2__iC3hKTU337dGzsRGWSADpqq8UE71J_Wv9re3LYQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Add Dhttps.protocols=SSLv3,TLSv1.1,TLSv1.2 in Jenkins

2017-09-12 Thread Prasu S
We recently changed Jenkins from http to https . Where should  
Dhttps.protocols=SSLv3,TLSv1.1,TLSv1.2  setup in Jenkins ? TIA

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/27253e06-bb52-4cd8-b911-a702811c383f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Running a bat file

2017-09-12 Thread jerome
Take care that you are actually chaining batch command. What is chaining 
batch, someone somewhere though it would be nice to make this super weird 
feature for batch script only (yeah a lot of sarcasm here, the first time 
you see this beahavior and realize wtf someone wanted to do this is beyond 
total common sense), where you call a batch from another batch script, the 
remaining in between one can be skipped entirely. Here's the documentation 
from https://jpsoft.com/help/call.htm which give a better explanation of 
this eye bleeding nightmare:

WARNING! If you execute a batch file from inside another batch file without 
using CALL, the original batch file is terminated before the other one 
starts. This method of invoking a batch file from another is usually 
referred to as chaining. Note that if the batch file A.BTM uses CALL B, and 
B.BTM chains to the batch file C.BTM, on exit from C.BTM (without executing 
a CANCEL  command) processing of batch 
file A.BTM is resumed as if it had used CALL C.

I suspect that the Jenkins shell execute the script you gave it as it is a 
call itself maybe, maybe the Jenkins people can shed some light on this.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/d6337c9f-723b-48fb-b7f5-c13283deb708%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins slave (EC2 AWS plugin) fails occasionally when build takes too long with error "Caused: java.io.IOException: Unexpected termination of the channel"

2017-09-12 Thread Joshua Noble
I've had great success with the EC2 plugin. Might I suggest using Hashicorp 
Packer to build an AMI, and have the EC2 plugin launch that AMI? That will 
let you remove Ansible (or any provision tool) out of the equation and save 
on agent provisioning time. I know that when our cluster scales up another 
node using the EC2 plugin, we generally need that node online ASAP.

On Monday, September 11, 2017 at 9:32:30 PM UTC-4, K S wrote:
>
> I have Jenkins configured to launch EC2 instances (via AWS plugin) to 
> execute a build.
> The actual build steps use the Execute Shell method, and launch ansible 
> scripts.
>
> I find that if the ansible script runs for too long, the Jenkins slave on 
> the EC2 system goes down.
> The Jenkins GUI shows this error:
>
> Connection was broken
>
> java.io.EOFException
>   at 
> java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2638)
>   at 
> java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3113)
>   at 
> java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:853)
>   at java.io.ObjectInputStream.(ObjectInputStream.java:349)
>   at 
> hudson.remoting.ObjectInputStreamEx.(ObjectInputStreamEx.java:48)
>   at 
> hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34)
>   at 
> hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:59)
> Caused: java.io.IOException: Unexpected termination of the channel
>   at 
> hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:73)
>
>
>
>
> Some googling lead to this page: 
> https://wiki.jenkins.io/display/JENKINS/Remoting+issue
> It suggests I check these log files:
> 1) connection logs on master - I checked these, and they have the same 
> information as stack trace.
> 2) slave logs - I do not know where to find these.  *The locations 
> suggested do not exist on my slave.*  
>
> I even inspected the files that the slave java process opens, and the only 
> file that seems like a log file ends up being empty:
>
> ubuntu@ip-172-31-93-175:~/support$ ps auxww | grep java | grep slave
> ubuntu25235  8.0  0.5 12211452 157616 ? Ssl  22:23   0:05 java 
> -jar /tmp/slave.jar
> ubuntu@ip-172-31-93-175:~/support$ sudo lsof | grep 25235  | grep -i log | 
> awk '{print $NF}' | sort | uniq
> /home/ubuntu/support/all_2017-09-11_22.23.07.log
> ubuntu@ip-172-31-93-175:~/support$ cat 
> /home/ubuntu/support/all_2017-09-11_22.23.07.log 
> ubuntu@ip-172-31-93-175:~/support$ 
>
>
>
> Has anyone run into this issue or know how or where to find the java slave 
> logs? 
>
> Thanks so much.
>
>
> *VERSION INFO:*
> *Master:*
> Jenkins ver. 2.60.2
> Java:  openjdk version "1.8.0_131"
>
> *Build node:*
> Launched via: AWS plugin: 
> https://wiki.jenkins.io/display/JENKINS/Amazon+EC2+Plugin (latest version)
>
> Ec2 instance running Ubuntu 14.04 and Java 8:
> ubuntu@ip-172-31-93-175:~$ cat /etc/*release* | grep VERSION
> VERSION="14.04.5 LTS, Trusty Tahr"
> VERSION_ID="14.04"
> ubuntu@ip-172-31-93-175:~$ *java -version*
> java version "1.8.0_144"
> Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
> Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
>
>
>
>
>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/cccf48eb-f780-443e-8f51-828c8a5e3f6e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Best way to reload job settings from Jenkinsfile without triggering a build

2017-09-12 Thread Joshua Noble
The challenge here is that a multibranch pipeline uses source control 
events, by design, to launch itself. Since the Jenkinsfile (your config) is 
stored in source control, there's really no way to push without triggering 
a run. As soon as you disable and/or delete the job, it will be re-created 
and run after you push to your repo. (At least it will using the Github 
branch source plugin, which uses multibranch config setups under the hood)

On Tuesday, September 12, 2017 at 10:56:32 AM UTC-4, ishan jain wrote:
>
> Hi all,
>
> I keep my Jenkinsfile in a git repo. For features and fixes, i create 
> branches on this repo, each having a slightly different Jenkinsfile. I have 
> a jenkins job of type multibranch pipeline, scanning these pipelines as i 
> create a branch.
>
> Assuming i have the basic declarative pipeline structure for all 
> Jenkinsfiles in different branches
>
> pipeline {
> agent any
> triggers {
> cron('H 4/* 0 0 1-5')
> }
> stages {
> stage('Example') {
> steps {
> echo 'Hello World'
> }
> }
> }
> }
>
>
>
> I sometimes want to change the cron of certain jobs, sometimes even to 
> disable it. The best ideal way to do it would be to change it in 
> Jenkinsfile in the GIT repo. But after changing the code and invoking 'scan 
> multibranch pipeline' from Jenkins UI, it does 1 execution, which is 
> something i do not want.
>
> How can i make sure that updated settings done in Jenkinsfile are picked 
> up without executing it ? And can it happen automatically immediately ?
> What is the simplest way to disable a job for a while in the above setup ?
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/60de6c4e-966d-44b7-9039-d44d2481b558%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Building docker images with declarative pipeline

2017-09-12 Thread Joshua Noble
With declarative pipelines this is pretty straight forward, just build the 
Docker image like you would on your local machine using `sh` commands.

For example, in our cluster all build agents are actually the same, but 
most builds run inside of a container on one of these nodes, which you've 
noted (correctly) that you don't want to do, since you want to build an 
image. We've simply given the "docker" label to our build agents, and our 
declarative Jenkinsfile's use that label under the agent option.

For example, you could use the following Jenkinsfile to build your-app. 
Note that I'm using a GIT_SHA variable here which actually doesn't resolve, 
but you could easily write a pipeline shared library to provide this info. 
In addition, I only like to publish master branch builds on some repos in 
order to save space in our registry. You can even tell Jenkins to use 
specific credentials when pushing.

pipeline {
  agent { label 'docker' }
  options {
ansiColor colorMapName: 'XTerm'
  }
  stages {
stage('Build') {
  steps {
sh "docker build -t 
registry.yourcompany.com/company/your-app:${GIT_SHA} ."
  }
}
stage('Publish') {
  when {
branch 'master'
  }
  steps {
withDockerRegistry([credentialsId: 'registry-creds', url: 
'https://registry.yourcompany.com']) {
  sh "docker push 
registry.yourcompany.com/company/your-app:${GIT_SHA}"
}
  }
}
  }
}




On Tuesday, February 14, 2017 at 2:32:56 PM UTC-5, Thomas Fjellstrom wrote:
>
> Hi,
>
> I'm brand new to jenkins, and have been reading a lot about the pipeline 
> plugin. I think I have a basic grasp of it, but I haven't been able to 
> figure out the proper syntax to build docker images in a pipeline stage. I 
> don't want to run the steps IN a docker container, but rather build 
> containers (multiple containers) in a pipeline Jenkinsfile. I also have 
> some other requirements, like accessing credentials setup in the jenkins 
> interface, and a private docker registry.
>
> Any help would be appreciated.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/7202bd44-f3b3-4ad6-9b9b-ec9cf3425c49%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Best way to reload job settings from Jenkinsfile without triggering a build

2017-09-12 Thread ishan jain
Hi all,

I keep my Jenkinsfile in a git repo. For features and fixes, i create 
branches on this repo, each having a slightly different Jenkinsfile. I have 
a jenkins job of type multibranch pipeline, scanning these pipelines as i 
create a branch.

Assuming i have the basic declarative pipeline structure for all 
Jenkinsfiles in different branches

pipeline {
agent any
triggers {
cron('H 4/* 0 0 1-5')
}
stages {
stage('Example') {
steps {
echo 'Hello World'
}
}
}
}



I sometimes want to change the cron of certain jobs, sometimes even to 
disable it. The best ideal way to do it would be to change it in 
Jenkinsfile in the GIT repo. But after changing the code and invoking 'scan 
multibranch pipeline' from Jenkins UI, it does 1 execution, which is 
something i do not want.

How can i make sure that updated settings done in Jenkinsfile are picked up 
without executing it ? And can it happen automatically immediately ?
What is the simplest way to disable a job for a while in the above setup ?

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/771929da-459f-4d6b-a224-edf5327e26dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Running a bat file

2017-09-12 Thread harvey
Hi,

I am trying to run a bat file to start a server and I used the following 
script:

cd c:\...\bin
call asadmin start-domain

But I see that Jenkins isn't waiting for the batch script to exhibit.

I would be thankful, if you could guide me in this regard.

Regards,
Harvey

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/27491f4b-13df-4afb-a3f5-878acf1cef93%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline Maven: Running on Windows slave

2017-09-12 Thread Cyrille Le Clerc
Hello Svere,

It seems that we have some work to make withMaven(){} more friendly to 
Windows+Cygwin users.

We have already tracked:

   - JENKINS-44089 Request that withMaven pipeline step produce both mvn 
   and mvn.cmd wrappers on Windows 
   
   - JENKINS-44276 Maven fails in pipeline + cygwin 
   
   
Some refactoring of the code will be needed to generate both standard 
Windows and Cygwin friendly scripts on Windows agents.

Please feel free to give us hints on what a smooth integration with Windows 
and Cygwin should look like.

Cyrille

On Monday, September 11, 2017 at 9:08:53 AM UTC+2, Baptiste Mathus wrote:
>
> Hello,
> I know the developers of that plugin would like to make it as good as 
> possible. To that, if so, could you please try and summarize what you think 
> could be made easier/better? And even if possibly a config error, if you 
> think the error could help more quickly understand what is wrong?
>
> Thanks!
>
> Le 11 sept. 2017 09:03, "Sverre Moe"  a 
> écrit :
>
>> The fix was to set the Windows slave Remote Root Directory to Windows URI
>> C:\cygwin64\home\username
>>
>> mandag 11. september 2017 08.35.29 UTC+2 skrev Sverre Moe følgende:
>>>
>>> Well, adding a new JDK in Jenkins Tools pointing to the Windows path of 
>>> Java worked
>>> Then withMaven(jdk: "jdk1.8-win")
>>>
>>> I have though hit another snag. Lots of ERROR after build success.
>>> ERROR: [withMaven] WARNING: Exception archiving and fingerprinting 
>>> MavenArtifact{no.spacetec:myApp:jar:1.0.0-SNAPSHOT 
>>> C:\home\username\workspace\myApp_username_work-3U54DPE57F6TMOZM2O6QBWDQ2LNRU2QHAXT6INC3UPGWF2ERMXAQ\target\myApp-1.0.0-SNAPSHOT.jar},
>>>  
>>> skip archiving of the artifacts
>>>
>>> ERROR: [withMaven] WARNING: Exception archiving and fingerprinting 
>>> MavenArtifact{no.spacetec:myApp:rpm:1.0.0-SNAPSHOT 
>>> C:\home\username\workspace\myApp_username_work-3U54DPE57F6TMOZM2O6QBWDQ2LNRU2QHAXT6INC3UPGWF2ERMXAQ\target\rpm\myApp-windows-installer\RPMS\noarch\myApp-windows-installer-1.0.0-SNAPSHOT20170911082120.noarch.rpm},
>>>  
>>> skip archiving of the artifacts
>>>
>>> ERROR: [withMaven] WARNING Exception executing Maven reporter 'Junit 
>>> Publisher' / 
>>> org.jenkinsci.plugins.pipeline.maven.publishers.JunitTestsPublisher. Please 
>>> report a bug associated for the component 'pipeline-maven-plugin' at 
>>> https://issues.jenkins-ci.org 
>>> java.lang.IllegalArgumentException: Cannot relativize 
>>> 'C:\home\username\workspace\myApp_username_work-3U54DPE57F6TMOZM2O6QBWDQ2LNRU2QHAXT6INC3UPGWF2ERMXAQ\target/surefire-reports'
>>>  
>>> relatively to 
>>> '/home/username/workspace/myApp_username_work-3U54DPE57F6TMOZM2O6QBWDQ2LNRU2QHAXT6INC3UPGWF2ERMXAQ'
>>> at 
>>> org.jenkinsci.plugins.pipeline.maven.util.XmlUtils.getPathInWorkspace(XmlUtils.java:226)
>>> at 
>>> org.jenkinsci.plugins.pipeline.maven.publishers.JunitTestsPublisher.executeReporter(JunitTestsPublisher.java:234)
>>> at 
>>> org.jenkinsci.plugins.pipeline.maven.publishers.JunitTestsPublisher.process(JunitTestsPublisher.java:181)
>>> at org.jenkinsci.plugins.pipeline.maven.MavenSpyLogProcessor.pr
>>> ocessMavenSpyLogs(MavenSpyLogProcessor.java:109)
>>> at 
>>> org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution$Callback.finished(WithMavenStepExecution.java:864)
>>> at 
>>> org.jenkinsci.plugins.workflow.steps.BodyExecutionCallback$TailCall.onSuccess(BodyExecutionCallback.java:114)
>>> at 
>>> org.jenkinsci.plugins.workflow.cps.CpsBodyExecution$SuccessAdapter.receive(CpsBodyExecution.java:362)
>>> at com.cloudbees.groovy.cps.Outcome.resumeFrom(Outcome.java:73)
>>> at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:165)
>>> at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:162)
>>> at org.codehaus.groovy.runtime.Gr
>>> oovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:122)
>>> at org.codehaus.groovy.runtime.Gr
>>> oovyCategorySupport.use(GroovyCategorySupport.java:261)
>>> at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:162)
>>> at 
>>> org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:19)
>>> at 
>>> org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:35)
>>> at 
>>> org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:32)
>>> at 
>>> org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
>>> at 
>>> org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:32)
>>> at 
>>> org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:174)
>>> at 
>>> org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:330)
>>> at 
>>> org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:82)
>>> at 
>>>