Jenkins AbstractTrigger checkIfModified method called multiple times

2018-04-23 Thread Shashank Bhargav
Hi,

We have a requirement where poll has to be done to DB, check some 
conditions and based on conditions satisfied trigger a build. So we have 
extended "AbstractTrigger" class and overriden "checkIfModified" method.
But what is noticed is the method is being called multiple times within a 
minute even though the cron expression is set to poll every minute. Its not 
very consistent on how many times a minute, has anyone faced this before? 
Could someone help.

-- 
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/1fd5c1ad-f48e-45d3-818e-1517e9bcc1fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Docker Slaves plugin - how to specify volumes

2018-04-23 Thread 'Archimedes Trajano' via Jenkins Users

>
>
> We also considered to offer an option to cache some path, comparable to 
> travis-ci approach (based on tar.gz), so typically let end-user configure 
> maven local repository as "cached". Backed could rely on additional volumes 
> for this purpose, but definitively not on bind-mounts :P. This would let us 
> investigate scalability challenge to distribute such a cache, maybe just by 
> relying on docker volume-plugin features (but then relying on proprietary 
> API), or maybe by using jenkins as a volume replication facility, *à la* 
> TravisCI.
>
>
Is there an example of how to do caching of some folders with 
docker-slaves-plugin?

-- 
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/78b8fb05-015f-4b49-954a-5666ad88e949%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Create iOS Warnings and Errors report in Jenkins

2018-04-23 Thread Ullrich Hafner
You can use the warnings plugin to show compiler warnings. There is an parser 
for Clang (LLVM) available.

> Am 23.04.2018 um 08:45 schrieb mmanagem...@gmail.com:
> 
> How to generate report for Warnings and Errors generated from Xcode in 
> Jenkins? Is there any API that would give me the count of warnings, errors 
> that I could use of?
> 
> --
> 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/0aa7a601-8691-4b9a-8b2c-8af1cc8128fc%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/21560CED-B37C-410C-A263-F525D6414804%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Message signed with OpenPGP


Re: Need Help with SSH Slave Plugin - Unable to Start Node with SSH

2018-04-23 Thread Iván Fernández Calvo

On the “Known Hosts Key Validation" agents, where you imported the key on the 
jenkins user ssh authorized keys folder or on the etc ssh authorized keys 
folder? On etc does not work.

The other error seems related with the format of the host public key, it 
should’ve something like the following algorithm+base64 key encode

ssh-rsa B3NzaC1yc2EBIwAAAQEAklOUpkDHrfHY17SbrmTIpNLTGK9Tjom/BWDSU 
GPl+nafzlHDTYW7hdI4yZ5ew18JH4JW9jbhUFrviQzM7xlELEVf4h9lFX5QVkbPppSwg0cda3 
Pbv7kOdJ/MTyBlWXFCR+HAo3FXRitBqxiX1nKhXpHAZsMciLq8V6RjsNAQwdsdMFvSlVK/7XA 
t3FaoJoAsncM1Q9x5+3V0Ww68/eIFmb1zuUFljQJKprrX88XypNDvjYNby6vw/Pb0rwert/En 
mZ+AW4OZPnTPI89ZPmVMLuayrD2cE86Z/il8b+gw3r3+1nKatmIkjn2so1d01QraTlMqVSsbx 
NrRFi9wrf+M7Q== test@host


> El 23 abr 2018, a las 16:27, srk  escribió:
> 
> I restarted multiple times. I tried all options available "Known Hosts Key 
> Validation", "Manually Provided key Validation", etc..still get the 
> same/similar errors. I have the below messages in my WebLogic logs for 
> both..The first five are for nodes configured with "Known Hosts Key 
> Validation" while the last one is for "Manually Provided Key validation"... I 
> am able to login at server level using same ssh keys, but when invoking the 
> same using same credentials via Jenkins, it fails. 
> 
> 
> <[04/23/18 
> 10:07:53] SSH Launch of ZZZ on Z.ZZZ.com failed in 26 ms>
> <[04/23/18 
> 10:07:56] SSH Launch of ZZZ on Z.ZZZ.com failed in 2 ms>
> <[04/23/18 
> 10:08:43] SSH Launch of ZZZ on Z.ZZZ.com failed in 3 ms>
> <[04/23/18 
> 10:10:43] SSH Launch of ZZZ on Z.ZZZ.com failed in 3 ms>
> <[04/23/18 
> 10:11:38] SSH Launch of ZZZ on Z.ZZZ.com failed in 35 ms>
>
>   http://abc.xyz.com:1234/jenkins/computer/ZZZ/descriptorByName/hudson.plugins.sshslaves.verifiers.ManuallyProvidedKeyVerificationStrategy/checkKey
> java.lang.reflect.InvocationTargetException
> at 
> org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:347)
> at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184)
> at 
> org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117)
> at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:129)
> at 
> org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
> Truncated. see log file for complete stacktrace
> Caused By: java.lang.IllegalArgumentException: Key should be 2 parts: 
> algorithm and Base 64 encoded key value.
> at 
> hudson.plugins.sshslaves.verifiers.ManuallyProvidedKeyVerificationStrategy.parseKey(ManuallyProvidedKeyVerificationStrategy.java:98)
> at 
> hudson.plugins.sshslaves.verifiers.ManuallyProvidedKeyVerificationStrategy.access$000(ManuallyProvidedKeyVerificationStrategy.java:52)
> at 
> hudson.plugins.sshslaves.verifiers.ManuallyProvidedKeyVerificationStrategy$ManuallyProvidedKeyVerificationStrategyDescriptor.doCheckKey(ManuallyProvidedKeyVerificationStrategy.java:120)
> at 
> java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
> at 
> org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
> Truncated. see log file for complete stacktrace
> >
> 
>> On Friday, April 20, 2018 at 9:15:04 AM UTC-4, srk wrote:
>> Hi 
>> 
>> I have deployed Jenkins 2.117 war file onto WebLogic 12.2.1.2 as a 
>> webapplication and I am able to login to the application. I want to add 
>> additional nodes (remote servers) and would like to launch them using SSH, I 
>> have ssh key setup configured between the master where the WebLogic hosting 
>> Jenkins is running and remote servers and able to connect via shell. But 
>> when I try to do the same from within the application, I keep getting the 
>> below error message on the console output. I tried searching web and other 
>> support sites, and it seems this was fixed sometime in 2017 in older 
>> releases i.e in SSH Slave Plugin 1.20. I still keep getting the same and I 
>> see the plugin version installed is 1.26 for SSH Slave.
>> 
>> Any help or pointers in right direction is appreciated.
>> 
>> Thanks
>> 
>> Warning: no key algorithms provided; JENKINS-42959 disabled
>> [04/20/18 08:39:05] [SSH] Opening SSH connection to XXX.abc.com:22.
>> ERROR: Unexpected error in launching a slave. This is probably a bug in 
>> Jenkins.
>> java.lang.NoSuchMethodError: 
>> com.trilead.ssh2.Connection.connect(Lcom/trilead/ssh2/ServerHostKeyVerifier;III)Lcom/trilead/ssh2/ConnectionInfo;
>>  at 
>> hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1324)
>>  at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:831)
>>  at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:820)
>>  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>  at 
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>>  at 
>> 

kubernets plugin jnlp4

2018-04-23 Thread Edward Bond
Hello All,

I am using Jenkins LTS, 2.107.2. with kubernetes plugin: 1.1.3, jnlp-2, 
using kops inside aws. 

I have to have jnlp2-connect enabled because using jnlp4 has a higher 
failure rate.

Currently I am getting abount a 80% success rate with my current setup. 
When I upgraded ( 2 months ago ) to latest master and latest k8s plugin I 
was having about a 15% success rate of builds.

WARNING: Failed to send back a reply to the request 
hudson.remoting.Request$2@725700df
hudson.remoting.ChannelClosedException: Channel 
"hudson.remoting.Channel@7083e923:Channel to /100.96.3.149": channel is 
already closed
at hudson.remoting.Channel.send(Channel.java:715)
at hudson.remoting.Request$2.run(Request.java:377)
at 
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at org.jenkinsci.remoting.CallableDecorator.call(CallableDecorator.java:19)
at 
hudson.remoting.CallableDecoratorList$1.call(CallableDecoratorList.java:21)
at 
jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException
at hudson.remoting.Channel.close(Channel.java:1443)
at hudson.remoting.Channel.close(Channel.java:1399)
at hudson.slaves.SlaveComputer.closeChannel(SlaveComputer.java:746)
at hudson.slaves.SlaveComputer.access$800(SlaveComputer.java:99)
at hudson.slaves.SlaveComputer$3.run(SlaveComputer.java:664)
at 
jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
... 4 more

These are the type of errors I get.

Anyone have a list of versions that work for them and jnlp4?

It would be awesome to have a known good config of:

   1. Master docker image version
   2. K8s plugin version
   3. jnlp pod agent base image version


Thanks in advance.

-- 
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/9c07626f-a538-4e9a-9d3b-0cc8c3948355%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Job corrupt when using enable button

2018-04-23 Thread Mark Smit
Hello all,

We are moving jobs from one Jenkins machine to another. On the old machine 
we disable the job, then we copy the project in the jobs folder from the 
old to the new machine. In the new Jenkins I load the jobs by reloading the 
configuration. All copied jobs appear to the existing ones, but they are 
still disabled. I open each job and press the Enable button in the status 
view. And then my problem appears: the job is enabled, but builds nothing. 
When I compare the latest with the previous configuration I see that a huge 
block is added to the configuration with the dependency graph information. 
Why does Jenkins add this? Such corrupt config.xml files are more than 200k 
in size, were they are normally around 10k.
I already did find a work around: to enable a job I open the configuration, 
remove the check from 'disable project' and save the configuration. After 
that the configuration does not get corrupt. Has anyone experienced the 
same issue? And perhaps has a solution?
Jenkins version: 2.107.2

regards,
Mark

-- 
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/eb586fe2-f9bf-4395-9913-a35ccddcd0e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Need Help with SSH Slave Plugin - Unable to Start Node with SSH

2018-04-23 Thread srk
I restarted multiple times. I tried all options available "Known Hosts Key 
Validation", "Manually Provided key Validation", etc..still get the 
same/similar errors. I have the below messages in my WebLogic logs for 
both..The first five are for nodes configured with "Known Hosts Key 
Validation" while the last one is for "Manually Provided Key validation"... 
I am able to login at server level using same ssh keys, but when invoking 
the same using same credentials via Jenkins, it fails. 



<[04/23/18 10:07:53] SSH Launch of ZZZ on Z.ZZZ.com failed in 26 ms>

<[04/23/18 10:07:56] SSH Launch of ZZZ on Z.ZZZ.com failed in 2 ms>

<[04/23/18 10:08:43] SSH Launch of ZZZ on Z.ZZZ.com failed in 3 ms>

<[04/23/18 10:10:43] SSH Launch of ZZZ on Z.ZZZ.com failed in 3 ms>

<[04/23/18 10:11:38] SSH Launch of ZZZ on Z.ZZZ.com failed in 35 ms>
   
 http://abc.xyz.com:1234/jenkins/computer/ZZZ/descriptorByName/hudson.plugins.sshslaves.verifiers.ManuallyProvidedKeyVerificationStrategy/checkKey
java.lang.reflect.InvocationTargetException
at 
org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:347)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184)
at 
org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117)
at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:129)
at 
org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
Truncated. see log file for complete stacktrace
Caused By: java.lang.IllegalArgumentException: Key should be 2 parts: 
algorithm and Base 64 encoded key value.
at 
hudson.plugins.sshslaves.verifiers.ManuallyProvidedKeyVerificationStrategy.parseKey(ManuallyProvidedKeyVerificationStrategy.java:98)
at 
hudson.plugins.sshslaves.verifiers.ManuallyProvidedKeyVerificationStrategy.access$000(ManuallyProvidedKeyVerificationStrategy.java:52)
at 
hudson.plugins.sshslaves.verifiers.ManuallyProvidedKeyVerificationStrategy$ManuallyProvidedKeyVerificationStrategyDescriptor.doCheckKey(ManuallyProvidedKeyVerificationStrategy.java:120)
at 
java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
at 
org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
Truncated. see log file for complete stacktrace
>

On Friday, April 20, 2018 at 9:15:04 AM UTC-4, srk wrote:
>
> Hi 
>
> I have deployed Jenkins 2.117 war file onto WebLogic 12.2.1.2 as a 
> webapplication and I am able to login to the application. I want to add 
> additional nodes (remote servers) and would like to launch them using SSH, 
> I have ssh key setup configured between the master where the WebLogic 
> hosting Jenkins is running and remote servers and able to connect via 
> shell. But when I try to do the same from within the application, I keep 
> getting the below error message on the console output. I tried searching 
> web and other support sites, and it seems this was fixed sometime in 2017 
> in older releases i.e in SSH Slave Plugin 1.20. I still keep getting the 
> same and I see the plugin version installed is 1.26 for SSH Slave.
>
> Any help or pointers in right direction is appreciated.
>
> Thanks
>
> Warning: no key algorithms provided; JENKINS-42959 disabled
> [04/20/18 08:39:05] [SSH] Opening SSH connection to XXX.abc.com:22.
> ERROR: Unexpected error in launching a slave. This is probably a bug in 
> Jenkins.
> java.lang.NoSuchMethodError: 
> com.trilead.ssh2.Connection.connect(Lcom/trilead/ssh2/ServerHostKeyVerifier;III)Lcom/trilead/ssh2/ConnectionInfo;
> at 
> hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1324)
> at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:831)
> at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:820)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> [04/20/18 08:39:05] Launch failed - cleaning up connection
> [04/20/18 08:39:05] [SSH] Connection closed.
>

-- 
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/92c8f6b9-7572-4bc0-870c-bbe04a81cb4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


From upstream pipeline, how to know on which node has been executed downstream pipeline in parallel job execution

2018-04-23 Thread Vincent SCHMITT
Hello

I have an upstream scripted pipeline calling in parallel downstream script 
pipeline.
I would like after the run, that the upstream pipeline know on which slave 
they have been executed.

Would you know how can we do this?


Upstream pipeline ("pipeline 123"):
import hudson.Util;

node ("master") {
cleanWs()
def tc_job_name
def tc=["tc002","tc003"]
def branches=[:]   

stage ("phase")   {
tc_job_name = "subpipeline"

for (int i = 0; i <= tc.size()-1; i++) {
def index = i //if we tried to use i below, it would equal 
tc.size()-1 in each job execution.
branches["${tc[index]}"] = {
def first_run,job_hudson,build_hudson,build_env
first_run = build job: tc_job_name, parameters: 
[string(name:'dummy', value: "${index}")], description:'${tc[index]}', 
propagate: false

def rawbuild = first_run.getRawBuild() 
def build_properties = rawbuild.getProperties()
def log = build_properties['log']

def node = log.tokenize('\n').findAll {it.contains 
'Running on'}.each {it}[0].split(" ")[2]
echo node

   } // end of branches["${tc[index]}"] definition
} // for (int i = 0; i <= tc.size()-1; i++) 
parallel branches
} // stage phase
} // node ("master") 


Downstream pipeline ("subpipeline"):
node('only_tc') {
stage ("test") {
echo env.NODE_NAME
}
}

What has been tried:
* In upstream pipeline I have tried to get the owner of the executor 
launching the downstream pipeline:

tc_job_name ='subpipeline'

first_run=build job: job_name

def build_hudson = first_run.getRawBuild()

def build_properties = build_hudson.getProperties() 

def executor = build_properties['executor']

println "Node: "+ executor.getOwner().getCaption()


But it doesn't work with parallelized job execution , it outputs "Master" 
which is not the jenkins slave executor


* Getting NODE_NAME environment parameter:

tc_job_name ='subpipeline'

first_run=build job: job_name

def build_hudson = first_run.getRawBuild()

 def build_env = build_hudson.getEnvironment()

   println build_env.get("NODE_NAME","no node name")


But the environment variables of a pipeline is not the same as a freestyle 
job and it has not any NODE_NAME


* Parsing the log environment variable: (see first sample), but it's not 
the right way to do I guess.


Thanks in advanced !!


Vincent

-- 
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/feb98bbd-260e-43da-960f-abd773f6f1bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Unexpected EOF in Jenkins Ant on macOS because of password symbols

2018-04-23 Thread Denis Kazantsev
Actually problem was caused by quote character in the password that passed 
to Ant from Jenkins. Simply escaping char with `\` solved my problem.

On Thursday, March 1, 2018 at 8:54:50 PM UTC+3, Denis Kazantsev wrote:
>
> I'm also created topic on stackoverflow 
> 
>  
> but I guess here will help me better.
>
> I'm using local instance of Jenkins on my macOS machine. It configured to 
> use macOS system Ant. I'm using This project is parameterized option to 
> pass password to ant build script. But because password contains 
> single-quote symbol I got an error:
>
> /Applications/Utilities/apache-ant-1.9.4/bin/ant: eval: line 336: unexpected 
> EOF while looking for matching ``'
> /Applications/Utilities/apache-ant-1.9.4/bin/ant: eval: line 337: syntax 
> error: unexpected end of file
>
> If I'm using (wrong) password without that quote symbol, there is no same 
> error. I'm already tried to use String parameter instead of password and 
> add double-quotes at start and end but getting the same error.
>
> Ant script is looks fine because when I'm trying to execute ant script in 
> terminal on the same macOS machine and pass parameters using -Dname=value 
> script is executes successful.
>
> On my Windows Jenkins instance password worked well. I have no possibility 
> to change password so it's not the solution for me.
>

-- 
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/53c2e98f-7377-48ac-abc0-97e37c28c563%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Best Practices Jenkins in a Microsoft environment

2018-04-23 Thread John.Peterson
We use Jenkins in a windows environment for system tests.  We are still using 
Cruise Control for build control, but are eventually planning to migrate to 
Jenkins so it is all self contained and build jobs can chain (or integrate) 
system test jobs.

It’s pretty straight forward.  We just installed Jenkins and created some 
projects.

We are using 2 methods of launching a test.  “Monitor Changes in Directory” and 
a direct launch from CC such as https://OurJenkins:8080/jobs/ThisTestJob:Delay=0

The biggest non-default thing we have done is to do a groovy post-build which 
renames the job sequence number to = the build number which is much more useful.

We are using vSphere plugin to launch VM’s as needed and control snapshots.

John E. Peterson
ASW Quality Program Manager
john.peter...@nikon.com
Tel: +1 (810) 220-4360
Fax: +1 (810) 220-4300

Nikon Metrology, Inc.
631 Bear Run Lane
Lewis Center, OH  43035
USA
www.nikonmetrology.com



From: jenkinsci-users@googlegroups.com  On 
Behalf Of EvilWonka
Sent: Saturday, April 21, 2018 2:33 PM
To: Jenkins Users 
Subject: Best Practices Jenkins in a Microsoft environment

Hello All,

I am new to Jenkins and was hoping someone can direct me to any information 
with regard to 'Best Practices" using Jenkins in a Microsoft shop.
Or some feedback from some who has a similar environment with regard to using 
Jenkins.

Some background on tools etc..:
Visual Studio 2017
C#
ASP.net Websites wish to convert to Web Applications
SVN (Subversion)
MSBuild currently powershell command line builds to build releases

Currently the build/deploy process is very manual
Basically an operator pulls the projects from SVN and performs cleanup, revert 
etc...
using MSBuild; complies the appropriate projects, compresses the output and 
manually deploys the builds to the respective environment (leaving out a lot of 
details)
Btw, we are planning on convert ASP websites to ASP Web Applications so as to 
utilize transforms etc..

With CI in mind, We are planning on using Jenkins->Web deploy in the future  to 
perform releases into the Test, QA, Production etc... environments
Of course this is a very cursory explanation, however I was primarily curious 
of any lessons learned when setting up Jenkins in this scenario?
Hopefully even some examples of a pipeline or Job stream which could suffice as 
a general template. It would interesting for instance if Jenkins is interacting 
with Web Deploy.

Any help would be sincerely appreciated.

Thank you!!!

--
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/798ee0f5-6b54-42ca-9449-ae5b5a0c7f9d%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/1723f09318d34bd185b5e786ca89d638%40NKEU-EX-02.nikonoa.net.
For more options, visit https://groups.google.com/d/optout.


How to inject an env variable from declarative script?

2018-04-23 Thread David Aldrich
Hi

I'm trying to fix the occasional MSBuild error:

"Fatal error C1090: PDB API call failed, error code '23'"

1.  The advice given in 
JENKINS-9104 is to inject 
the following environment variable using EnvInject:

_MSPDBSRV_ENDPOINT_=$BUILD_TAG

I don't really understand the difference between defining and injecting an 
environment variable.  I want to specify this setting directly in a declarative 
script.  I could do:

stage('build_VisualStudio') {
agent { label "jenkinswin10" }
environment { _MSPDBSRV_ENDPOINT_=$BUILD_TAG }
etc.

Would that be sufficient or must env variable injection be done in a different 
way?

Best regards

David

-- 
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/ddde7031f8154464b33559098ec26027%40EUX13SRV1.EU.NEC.COM.
For more options, visit https://groups.google.com/d/optout.


Re: automating jenkins (master) setup - plugins / extensions and their configs

2018-04-23 Thread nicolas de loof
init.groovy scripts is a very powerful way to setup jenkins but require to
know jenkins / plugins programmatic API. If you're not a plugin developer
this might be very uncomfortable to write and maintain.

As an alternative, you might be interested in
https://github.com/jenkinsci/configuration-as-code-plugin



2018-04-23 11:02 GMT+02:00 Alex Els :

> Hi there,
>
> I'm trying to create a automated setup of Jenkins masters and am
> struggling with setting up custom plugins, like terraform or docker,
> programatically via groovy scripts in
> init.groovy.d
>
>  are there any good resources on how to do this?
>
> I'm using the Jenkins docker image, which can automatically install all
> the desired plugins, but it's a mystery on how to use groovy init scripts
> to configure any custom installed plugin/extension. I've found resources
> that configure things like maven etc., but nothing that would help me set
> up a "installation" of `terraform` and such ..
>
> How do people on here go about this in general? Just do the clicky thing
> and the put the XML files into Git (minus the passwords, if any, of
> course)? I'd really rather not do that, and use the groovy init scripts
> instead, if at all possible for these cases?
>
> Thanks
> Alex
>
> --
> 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/21149959-9810-47d6-b77e-58bec2c053e2%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/CANMVJzmPBL7xN9_pAX5qTDryecUiypHjDbNVCwqh9KwBsdm%3DVw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


automating jenkins (master) setup - plugins / extensions and their configs

2018-04-23 Thread Alex Els
Hi there,

I'm trying to create a automated setup of Jenkins masters and am struggling 
with setting up custom plugins, like terraform or docker, programatically 
via groovy scripts in  
init.groovy.d

 are there any good resources on how to do this?

I'm using the Jenkins docker image, which can automatically install all the 
desired plugins, but it's a mystery on how to use groovy init scripts to 
configure any custom installed plugin/extension. I've found resources that 
configure things like maven etc., but nothing that would help me set up a 
"installation" of `terraform` and such .. 

How do people on here go about this in general? Just do the clicky thing 
and the put the XML files into Git (minus the passwords, if any, of 
course)? I'd really rather not do that, and use the groovy init scripts 
instead, if at all possible for these cases?

Thanks
Alex

-- 
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/21149959-9810-47d6-b77e-58bec2c053e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Problem running Visual Studio 2017 build tools from Jenkins

2018-04-23 Thread David Aldrich
Hi

I'm having difficulty running the Visual Studio 2017 build tools on a Windows 
10 slave as a Jenkins job.  I have described my problem in StackOverflow:

https://stackoverflow.com/questions/49922959/how-to-fix-java-was-unexpected-at-this-time-when-invoking-vs-2017-build-to/49944377#49944377

If anyone has this working or can advise on the problem I would be grateful.

Best regards

David

-- 
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/5c9a27c5dc5e4642a6a5e25845fcc469%40EUX13SRV1.EU.NEC.COM.
For more options, visit https://groups.google.com/d/optout.


Create iOS Warnings and Errors report in Jenkins

2018-04-23 Thread mmanagemail
How to generate report for Warnings and Errors generated from Xcode in 
Jenkins? Is there any API that would give me the count of warnings, errors 
that I could use of?

-- 
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/0aa7a601-8691-4b9a-8b2c-8af1cc8128fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: setNextBuildNumber from upstream job

2018-04-23 Thread Victor Martinez

IIUC, there are two different points here:

*1) Variable interpolation.*

It looks like *$COPY_FROM_BUILD* is not interpolated unless it's double 
quoted: 


nextBuildNumber("$COPY_FROM_BUILD") 

*NOTE*: that particular variable might be declared somehow, see below


*2) Upstream parameter.*

Off the top of my head: 

It might depends on how the upstream job triggers the downstream job.


a) If it's using the build step then you might create a new parameter to be 
used only when the upstream pipeline triggered the downstream job which 
will use the parameters accordingly.
b) Using the feature property *'*
*hudson.model.ParametersAction.keepUndefinedParameters'* . (described: 
https://wiki.jenkins.io/display/JENKINS/Features+controlled+by+system+properties)
 
then you won't need to declare the parameter in the downstream job. 
Although, it  might be unsafe as explained
c) Other way, it might be using the archive and copyArtifact 

 
step and then readFile step 

d) I'm pretty sure there are other ways that someone else could help with. 
:)


Cheers

-- 
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/3b29cb62-453e-4a37-8b9a-3689467dec5e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.