jenkins-job-builder user converting to dsl (maybe pipeline)

2017-04-11 Thread dpreilan
Victor, thanks for reply.

I don't know how to read that link to determine plug in support. Is it 
accessing the API viewer on my server? If yes, I see the persistent parameter 
plugin listed

If there is no way to make it work, is there a way to read from a file to get 
value and alter the default value of a parameter. 

Thanks 
Doug

-- 
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/75ecd97e-7e04-40bd-bb66-64da679e6c53%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Run same pipeline on all nodes (and with different params)

2017-04-11 Thread Stas Kelvich
Hi there.

I'm now using declarative Jenkinsfile to build C project and run bunch of 
tests and observe results in blue ocean interface. However also I want to 
be able to run whole pipeline on different OSes and different 
compilers/buildoptions. I tried to write Jenkinsfile that runs nodes in 
parallel, but in that case blue ocean view is quite useless (it just shows 
vertical pile of circles with all OSes) and Jenkinsfile itself is 
quite clumsy. I'm thinking about something that can trigger parallel 
pipelines with same commit and  different params, so that 
OS/compiler/buildoption can be selected based on that variable; probably in 
that case blue ocean view will just render each combination as a separate 
build with proper build graph inside. Is there any easy way to achieve 
that? 

Thanks,
Stas.

-- 
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/6fb3c4ac-6a3f-482b-8cf6-2ff63af4442b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Declarative pipelines per branch and reusable stages (keeping it DRY)

2017-04-11 Thread jerome
Up vote for the forward declaration of stage/steps and just give the 
assembly later on (would just invert the 3rd example, delcare 
implementation first then use them).

-- 
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/92dcd6af-0b10-4e59-82f8-776c0a6d4cba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Migrate Jenkins cluster from 1.580.3 -> 2.x version

2017-04-11 Thread Victor Martinez
Hi there,

There are already similar questions in this group:

https://groups.google.com/forum/m/#!topic/jenkinsci-users/fq_2NDeUVVE


https://groups.google.com/forum/m/#!searchin/jenkinsci-users/Migrate/jenkinsci-users/odyzsCiILXM

Recommendation: backup the JENKINS_HOME.

Tip: Some security fixes will change the Jenkins behaviour as mentioned in the 
above urls. Some of those behaviours can be rolled back if you use some java 
properties to redefine them...

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/2e65d300-bc11-43cc-adcb-c7000307951d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


jenkins-job-builder user converting to dsl (maybe pipeline)

2017-04-11 Thread Victor Martinez
Hi Doug,

persistentStringParameterDefinition cannot be declared with the import since it 
is loaded on the fly as long as that plugin has been installed in that jenkins 
instance.

You can access, mostly all, those plugins and their DSL syntax as explained in 
the below page:

https://github.com/jenkinsci/job-dsl-plugin/wiki/Automatically-Generated-DSL


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/17e1038e-1196-4f02-bb0b-75d9bd93afb7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins SonarQube Runner 2.4 build fails execution and Read timed out on http:///api/qualitygates/show?id=2

2017-04-11 Thread Makarand Jadhav
 

Hello,

 

We have the *SonarQube Scanner for Jenkins* 
 plugin version 2.6 
running on Jenkins server version 2.32.2. I am running the SonarQube runner 
for Gradle as part of the Jenkins job and its seen that sonar build has 
been failing now consistently on "Timed Out" issue on the following URLs:

 

*http:///batch/global*  
(no proxy)

*http:///api/qualitygates/show?id=2* 
 (no proxy)



here is the snippet of stack trace what I got from Jenkins Job output log:

 

-

*05:07:17* 05:07:17.431 DEBUG - Release semaphore on project : 
*org.sonar.api.resources.Project@4707686e[id=1,key=ccms,qualifier=TRK* 
], with 
key 

*05:07:17* INFO: 


*05:07:17* INFO: EXECUTION FAILURE

*05:07:17* INFO: 


*05:07:17* Total time: 56.830s

*05:07:17* Final Memory: 35M/1433M

*05:07:17* INFO: 


*05:07:17* ERROR: Error during Sonar runner execution

*05:07:17* org.sonar.runner.impl.RunnerException: Unable to execute Sonar

*05:07:17*   at 
org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)

*05:07:17*   at 
org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)

*05:07:17*   at java.security.AccessController.doPrivileged(Native Method)

*05:07:17*   at 
org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)

*05:07:17*   at 
org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)

*05:07:17*   at 
org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)

*05:07:17*   at org.sonar.runner.api.Runner.execute(Runner.java:100)

*05:07:17*   at org.sonar.runner.Main.executeTask(Main.java:70)

*05:07:17*   at org.sonar.runner.Main.execute(Main.java:59)

*05:07:17*   at org.sonar.runner.Main.main(Main.java:53)

*05:07:17* Caused by: java.lang.IllegalStateException: Unable to request: 
/api/qualitygates/show?id=2

*05:07:17*   at 
org.sonar.batch.bootstrap.ServerClient.request(ServerClient.java:109)

*05:07:17*   at 
org.sonar.batch.bootstrap.ServerClient.request(ServerClient.java:95)

*05:07:17*   at 
org.sonar.batch.qualitygate.QualityGateProvider.fetch(QualityGateProvider.java:88)

*05:07:17*   at 
org.sonar.batch.qualitygate.QualityGateProvider.load(QualityGateProvider.java:72)

*05:07:17*   at 
org.sonar.batch.qualitygate.QualityGateProvider.init(QualityGateProvider.java:63)

*05:07:17*   at 
org.sonar.batch.qualitygate.QualityGateProvider.provide(QualityGateProvider.java:51)

*05:07:17*   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

*05:07:17*   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

*05:07:17*   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

*05:07:17*   at java.lang.reflect.Method.invoke(Method.java:483)

*05:07:17*   at 
org.picocontainer.injectors.MethodInjector.invokeMethod(MethodInjector.java:129)

*05:07:17*   at 
org.picocontainer.injectors.MethodInjector.access$000(MethodInjector.java:39)

*05:07:17*   at 
org.picocontainer.injectors.MethodInjector$2.run(MethodInjector.java:113)

*05:07:17*   at 
org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)

*05:07:17*   at 
org.picocontainer.injectors.MethodInjector.decorateComponentInstance(MethodInjector.java:120)

*05:07:17*   at 
org.picocontainer.injectors.CompositeInjector.decorateComponentInstance(CompositeInjector.java:58)

*05:07:17*   at 
org.picocontainer.injectors.Reinjector.reinject(Reinjector.java:142)

*05:07:17*   at 
org.picocontainer.injectors.ProviderAdapter.getComponentInstance(ProviderAdapter.java:96)

*05:07:17*   at 
org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:698)

*05:07:17*   at 
org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:646)

*05:07:17*   at 
org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:631)

*05:07:17*   at 
org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)

*05:07:17*   at 
org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)

*05:07:17*   at 
org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)

*05:07:17*   at 
org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)

*05:07:17*   

failed to build and we don't even have a listene

2017-04-11 Thread Limor Shemesh
I'm using Jenkins 2.50
After upgrading some plugins all jobs failed, the console log of the job is 
empty, in Jenkins system log I see the error:

Apr 11, 2017 6:54:54 PM WARNING 
org.jenkins_ci.plugins.run_condition.BuildStepRunner logEvaluateException

Exception caught evaluating condition: [java.lang.NullPointerException: null], 
action = [Fail the build]
java.lang.NullPointerException
at 
org.jenkins_ci.plugins.run_condition.BuildStepRunner$2.logRunning(BuildStepRunner.java:114)
at 
org.jenkins_ci.plugins.run_condition.BuildStepRunner$Fail.conditionalRun(BuildStepRunner.java:148)
at 
org.jenkins_ci.plugins.run_condition.BuildStepRunner.perform(BuildStepRunner.java:105)
at 
org.jenkins_ci.plugins.flexible_publish.strategy.FailAtEndExecutionStrategy.perform(FailAtEndExecutionStrategy.java:85)
at 
org.jenkins_ci.plugins.flexible_publish.ConditionalPublisher.perform(ConditionalPublisher.java:206)
at 
org.jenkins_ci.plugins.flexible_publish.FlexiblePublisher.perform(FlexiblePublisher.java:124)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
at hudson.model.Build$BuildExecution.post2(Build.java:186)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665)
at hudson.model.Run.execute(Run.java:1753)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:405)


Apr 11, 2017 6:54:54 PM SEVERE hudson.model.Run handleFatalBuildProblem

#116 failed to build and we don't even have a listener
java.lang.NullPointerException
at 
hudson.model.AbstractBuild$AbstractBuildExecution.reportError(AbstractBuild.java:752)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:728)
at hudson.model.Build$BuildExecution.post2(Build.java:186)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665)
at hudson.model.Run.execute(Run.java:1753)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:405)


Downgrade the plugins didn't help.

Please your urgent advice.


-- 
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/b3d1aa17-8b4d-49de-9336-b9374296c7ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


how to automatically build maven dependencies

2017-04-11 Thread Jörg Wille
I have a multi-module maven project split in to different git repositories.
I am using a jenkinsfile with declarative syntax in each repo (in each 
branch in fact) to build each maven module. The build gets triggered from 
commits via webhooks in gitlab.
So far so good. Now when I commit changes to my project's API-module, I 
also want to trigger builds for all other modules, which use the API as 
upstream dependency.
So, the question is, (how) can I trigger downstream dependencies builds 
from other repositories via pipeline?
Any maven project available using declarative pipelines, which I could use 
as reference?

-- 
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/cd379488-b283-4ff5-ace4-8672b04c64f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Blue ocean and github enterprise

2017-04-11 Thread Cliff Meyers
Hi Prashant,

Github Enterprise support isn't far away - you can watch and follow this
ticket for updates https://issues.jenkins-ci.org/browse/JENKINS-40855

Best,
Cliff

On Sun, Apr 9, 2017 at 12:50 AM, Prashant Potluri 
wrote:

> Hi,
>
> I would like to create a pipeline using blueocean. I am using enterprise
> GitHub and created personal access token. However, it doesn't connect to
> our enterprise github.
>
> Please provide some pointers.
>
> Regards,
> Prashant
>
> --
> 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/00072bfa-c157-4afd-8baa-f8f3a7bfdece%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/CAFm%3D0hfQqLycQYXF1f%3D7T65KX1%2BEnbZM7vDmWmL7nwL-LMjgTQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Declarative pipelines per branch and reusable stages (keeping it DRY)

2017-04-11 Thread Kenneth Brooks
TL;DR up front:
*As a user, I want to have a pipeline that performs specific pipeline 
stages based on the branch. Recommendation: Put the when{} condition 
outside the pipeline{} tag.*
*As a user, I want to declare my stages but have the implementation be 
separate so that I can reuse them in multiple pipelines*. 

Currently the Declarative syntax has the ability to perform a stage 
conditionally using 'when' but not a whole pipeline.
This leads to making the pipeline fairly inflexible and much harder to read 
thru.

Take for example:

pipeline {

   stages {
 stage('Build') {
   when { branch "develop || master || feature"} // no the real syntax, i 
know
   steps { /* do some build stuff */ }
 }

 stage('Scan') {
   when { branch "master"}
   steps { /* run static code analysis or other code scanning */}
 }

 stage('Pull Request Build') {
   when { branch "PR-*"}
   steps { /* do a merge build stuff */ }
 }

 stage('Dev Deploy') {
   when { branch "develop || master"}
   steps { /* deploy to dev */ }
 }

 stage('Pull Request Deploy') {
   when { branch "PR-*"}
   steps { /* deploy to special PR sandbox */}
 }
  }
}


In this simple example, the following will happen, but it is extremely hard to 
follow.

Feature -> Build
Master -> Build, Scan, Dev Deploy
Develop -> Build, Dev Deploy
Pull Request -> Pull Request Build, Pull Request Deploy

I would suggest we allow the when to be placed at the pipeline level 
somehow.args

pipeline('master') { // Just for naming
  when { branch "master" }
  stages {
stage('Build'){
  steps { /* do some build stuff */ }
}
stage('Scan'){
  steps { /* run static code analysis or other code scanning */}
}
stage('Dev Deploy'){
  steps { /* deploy to dev */ }
}
  }
}

pipeline('develop') { // Just for naming
  when { branch "develop" }
  stages {
stage('Build'){
  steps { /* do some build stuff */ }
}
stage('Dev Deploy'){
  steps { /* deploy to dev */ }
}
  }
}

pipeline('pull request') { // Just for naming
  when { branch "PR-*" }
  stages {
stage('Pull Request Build') {
  steps { /* do a merge build stuff */ }
}
stage('Pull Request Deploy') {
  steps { /* deploy to special PR sandbox */}
}
  }
}

pipeline('feature') { // Just for naming
  when { branch != "master || PR-* || develop" } // just do a build for any 
'other' branches, which would then include developer feature branches
  stages {
stage('Build') {
  steps { /* do some build stuff */ }
}
  }
}


That, to me, is much cleaner. It is very easy to see exactly what each pipeline 
is doing.
This brings one downside. The stage is repeated.
stage('Build') and stage('Dev Deploy') are the same impl, but I have to write 
them 2 times.
I could create a global library, but then that has 2 other downsides. It is no 
longer declarative syntax in the global library, the global library is loaded 
external. I have to now go to a whole other file to see that implementation.
  
To keep things DRY I would also like to then see the stages treated as a 
definition and and implementation.
Define the stages external to the pipeline, but pull them into each pipeline.

This can optionally be done (like you'll see on the Pull Request stages).

Here is what I believe the combination of the two would look like:


pipeline('master') { // Just for naming
  when { branch "master" }
  stages {
stage('Build')
stage('Scan')
stage('Dev Deploy')
  }
}

pipeline('develop') { // Just for naming
  when { branch "develop" }
stages {
stage('Build')
stage('Dev Deploy')
  }
}

pipeline('pull request') { // Just for naming
  when { branch "PR-*" }
  stages {
stage('Pull Request Build') {
  steps { /* do a merge build stuff */ }
}
stage('Pull Request Deploy') {
  steps { /* deploy to special PR sandbox */}
}
  }
}

pipeline('feature') { // Just for naming
  when { branch != "master || PR-* || develop" } // just do a build for any 
'other' branches, which would then include developer feature branches
  stages {
stage('Build')
  }
}

/* Stage definitions below */
stage('Build'){
  steps { /* do some build stuff */ }
}

stage('Scan'){
  steps { /* run static code analysis or other code scanning */}
}

stage('Dev Deploy'){
  steps { /* deploy to dev */ }
}


Is there a way to do this with the current declarative syntax?

If not, what is the best way to get this into the declarative syntax? Open jira 
enhancement requests?


What we've resorted to in the mean time (which still doesn't solve the DRY 
part) is to have a Jenkinsfile that does the if logic and then loads a specific 
pipeline (which has its own demons because the load evals the file immediately 
and is holding onto a heavyweight executor the whole time).


if (env.BRANCH_NAME.startsWith("develop")) {
load 'develop-pipeline.groovy'
} else if 

Re: Upgrade Jenkins from 1.580 to 2.32.2

2017-04-11 Thread Raj
Thank you very much for all the help and pointers (yes some slave issues 
did surface needing latest Java quickly resolved the issues.)
Here is the report of my upgrade:
1: it was seamless no issues faced. 
2: Upgraded all the plugins. 
3: Minor issues faced related to Jococo plugin and some lost credentials 
which had to be reselected from drop down for Jenkins build success or 
failure notification to Stash\ Bitbucket 
4: some slack api access keys configuration were lost. 
5: had to change this for  /etc/sysconfig/jenkins 
help from : 
http://stackoverflow.com/questions/38157686/migrating-to-jenkins-2-1-ajp-support-is-removed-in-winstone-3-0-due-to-jetty-9
JENKINS_AJP_PORT="-1"

But over all nothing that could be called a show stopper. 

I am \ will be for ever indebted to authors \ maintainers \ supporters of 
this software. Without you guys i am not sure where we would have been. 

regards,
Raj

On Wednesday, March 1, 2017 at 4:01:04 AM UTC-5, Baptiste Mathus wrote:
>
> Right, sorry, I misunderstood, I assumed Raj was using Java 7 VM for 
> running Jenkins already, but he didn't tell this part.
>
> @Raj: if you're still using a JDK6, then yes, you better indeed upgrade 
> everything to JDK8 while in the go. If already using JDK7, then you should 
> be fine, but you want to plan to upgrade to JDK8 everywhere probably also 
> while at it to avoid headaches with the upcoming baseline upgrade (next 
> month for first weekly, early June for first LTS requiring Java 8).
>
> 2017-02-27 20:32 GMT+01:00 Peter McNab 
> :
>
>> No to what?
>>
>> Jenkins 1.608 made slaves require Java7, so it might impact Raj's upgrade 
>> attempts.
>>
>> I know the Java8 change hasn't been made, but it's coming soon as well.
>>
>> Java7 has been around a long time, but so have the platforms I support, 
>> and we we moved up to a version that supported pipelines a number of the 
>> older platform slaves stopped working and some users had to scramble to 
>> adjust their jobs.
>>
>> Pete
>>
>> On 2/27/2017 11:16 AM, Baptiste Mathus wrote:
>>
>> Well, no. The Java 8 change hasn't been made yet, though it is coming 
>> according to the announced plan (first weekly should be on April, and first 
>> LTS requiring it should be around early June). And Java 7 has been around 
>> for a long time. 
>>
>> And we already discussed the fact that though some platforms may not have 
>> a JDK packaged with std distro, it's dead simple to download it directly 
>> from , uncompress and be done with it on the big majority of platforms 
>> (Centos 6 is not an issue at all for instance, I can relate).
>>
>> 2017-02-27 19:29 GMT+01:00 Peter McNab > >:
>>
>>> I don't remember exactly when the change was made, but keep in mind that 
>>> Java7 is required for slave nodes with recent versions of Jenkins.  If you 
>>> have slave nodes without that available they will be dead in the water.
>>>
>>> Pete
>>>
>>> On 2/27/2017 9:59 AM, Raj wrote:
>>>
>>> Thank you for the feedback.  
>>>
>>> Sure. we can do that and more simply with a vm snapshot for rollback.  
>>>
>>> but in case of staging upgrade how do you propose \ suggest to manage 
>>> the slave \ agents ? i ask since if i bring up the staging with a rsynced 
>>> config then the agents will try to connect too and might cause a issue. or 
>>> should we just make all slaves offline when i take a snaphot so when they 
>>> do comeback they will be not connected to the master and that way we can 
>>> test just the master and once it is fine then just connect all agents to 
>>> the new server ?
>>>
>>>
>>>
>>> On Saturday, February 25, 2017 at 1:35:25 PM UTC-5, Raj wrote: 

 Hello, 
 We have been stuck to a very old version of Jenkins for a while now. 
 1.580. we are on Centos 6.

 I am wondering if any one has upgraded from 1.580 to 2.32.2 via yum and 
 including all plugins ? 

 If someone could share their experience it will be really appreciated. 

 apart from need for jdk 1.8, is there any other hard dependency for the 
 upgrade?
 Regards,
 Raj

 -- 
>>> 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-use...@googlegroups.com .
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jenkinsci-users/3f246128-6cea-4013-a175-c27bcce0e588%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-use...@googlegroups.com .
>>> 

Azure VM: The server rejected the connection: None of the protocols were accepted ...

2017-04-11 Thread Kristian
Hi,

I have this problem: I want to add a Windows slave on a master
Jenkins. The master is within an internal network (192.168.X.X). The
new Windows slave is a Virtual Machine in Azure. But the connection is
rejected after starting a job in Jenkins, which should run on that
Virtual Machine.

1) So, the first problem was this: How the slave knows, where is the
master? This is done throught VPN with OpenVPN. So I have now a
connection from my slave to internal network.

2) To get the name resolution working, I added two entries in
C:\Windows\System32\drivers\etc with the internal IP address of the
master slave and svn server. So now I can visit the page of Jenkins
Master with it's hostname.

3) The Jenkins slave agent is launched via Java Web Start.

This is the setup so far. Now the problem: When I now start a job in
Jenkins which runs in that Virtual Machine, after about thirty
seconds, I get on the slave this error message:

> java.lang.Exception: The server rejected the connection: None of the 
> protocols were accepted ...

So I tried to experiment a little bit: In the configuration page of
the slave, I changed the "Tunnel through:" option into ":5" and
opened the ports on the Virtual Machine in Azure itself and in Azure
for that Virtual Machine (in and out on both sides). I got the same
error.

Then I changed the option "Tunnel through" to [slavemachine]:5. I
got the same error.

Then I opened port 8080 on Azure and on the Slave Machine for in and
out. I got the same error.

The jenkins version is 2.46.1

Can someone give me some hints how to solve this problem?

-- 
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/CAO5HUhOafUOFkHo5DJNw655WNLAa%3DHWO5zvQuLMMtf1Zy1fbZw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Declarative pipeline - Repeating a stage after getting some input

2017-04-11 Thread ishan jain
I am using declarative pipeline syntax to implement continuous integration 
and here is a part of the pipeline

stage ('Tag') {
when {
expression {
return releaseVersion()
}
}
agent { label 'master' }
steps {
script {
// tag some stuff
}
}
}
stage ('Promote') {
agent none
steps {
def promote = input message: "Promote to " + nextVersion()
if (promote) {
 // need to do some stuff and call 'Tag' stage above again 
} else {
// end
}
}
}


*I am not sure how can i re-call a stage again*. I do not have enterprise 
edition, so not looking into checkpoint. The tag stage does the same work 
but with a different value and hence i do not wish to rewrite that stage 
again and again. In regular groovy code, i would define the stage {} inside 
a method and i would then just need to call it again. But with declarative 
pipeline, things are different.

-- 
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/8024378c-1f72-4fd3-883c-cf0fe1e782c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Always run specific build/postbuild step

2017-04-11 Thread Alex Domoradov
Thanks Richard, but it seems I had found alternative solution.

I got the same result with Execute a set of scripts in Post-build Actions -
http://i.imgur.com/g9wMKPW.png

On Tue, Apr 11, 2017 at 3:21 PM, Richard Ginga 
wrote:

> your Step 1 returns 1 which is a failure and Jenkins is always going to
> stop build execution at that point. no other "build steps" will be
> executed.
>
> You can install the flexible publish plugin (this lets you can run many
> build steps in the Post-build phase). the condition can be set to test the
> "Current build status" where you can set Worst as Failed and best as
> Success, then I think it will always run.
>
>
> On Mon, Apr 10, 2017 at 5:29 PM, Alex Domoradov 
> wrote:
>
>> Hello,
>>
>> is it possible at all? I have tried to use Conditional BuildStep with
>> condition "Always" but without success. I have two build step each of them
>> is shell script.
>>
>> Build step1 - Execute shell
>> #!/bin/bash -ex
>>
>> echo "*** STEP1 ***"
>> exit 1
>>
>> Build step2 - Execute shell
>> #!/bin/bash -ex
>>
>> echo "*** STEP2 ***"
>> exit 0
>>
>> Conditional step (single)
>> Run?: Always
>> Builder: Execute shell
>> #!/bin/bash
>>
>> echo "%%% CLEAN %%%"
>>
>> With such settings I get the following result
>>
>> Started by user Alex
>> [EnvInject] - Loading node environment variables.
>> Building on master in workspace /usr/share/tomcat8/.jenkins/workspace/temp
>> Run condition [Always] enabling prebuild for step [Execute shell]
>> [temp] $ /bin/bash -ex /var/cache/tomcat8/temp/hudson8076614436373471043.sh
>> + echo '*** STEP1 ***'
>> *** STEP1 ***
>> + exit 1
>> Build step 'Execute shell' marked build as failure
>> Finished: FAILURE
>>
>> P.S.
>> Jenkins ver. 1.652
>>
>> --
>> 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/ms
>> gid/jenkinsci-users/0c5b0978-570f-4871-b2cc-4ca806774dbb%
>> 40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Dick Ginga
> Build Engineer
> rgi...@disruptorbeam.com
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/jenkinsci-users/515uGxnDt64/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CAL3PpaXQpOg_PCwKJ-KAgbQDYNHqumnqa5w7s4yrkgw%
> 3DgnsFow%40mail.gmail.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/CAK90gp4Vi%3DyD970o6uKLe0AAVytn3LkYD4U-hPLTi6Aa0GtJ8Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


svn error 'ISVNAuthentication provider did not provide credentials'

2017-04-11 Thread David Aldrich
Hi

Since upgrading:

SCM API plugin from 1.3 to 2.1.1
Subversion Plugin 2.7.1 to 2.7.1

we are seeing the following exception occurring occasionally:


svn: E200015: ISVNAuthentication provider did not provide credentials; HTTP 
authorization cancelled.

at 
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:66)

at 
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:57)

at 
org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:798)

at 
org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:391)

at 
org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:379)

at 
org.tmatesoft.svn.core.internal.io.dav.DAVConnection.performHttpRequest(DAVConnection.java:862)

at 
org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:698)

at 
org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:118)

at 
org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:1049)

at 
org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getLatestRevision(DAVRepository.java:189)

at 
org.tmatesoft.svn.core.internal.wc2.ng.SvnNgRepositoryAccess.getRevisionNumber(SvnNgRepositoryAccess.java:119)

at 
org.tmatesoft.svn.core.internal.wc2.SvnRepositoryAccess.getLocations(SvnRepositoryAccess.java:195)

at 
org.tmatesoft.svn.core.internal.wc2.ng.SvnNgRepositoryAccess.createRepositoryFor(SvnNgRepositoryAccess.java:46)

at 
org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteLog.run(SvnRemoteLog.java:160)

at 
org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteLog.run(SvnRemoteLog.java:35)

at 
org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)

at 
org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1235)

at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)

at org.tmatesoft.svn.core.wc.SVNLogClient.doLog(SVNLogClient.java:968)

at org.tmatesoft.svn.core.wc.SVNLogClient.doLog(SVNLogClient.java:873)

at 
hudson.scm.SubversionChangeLogBuilder.buildModule(SubversionChangeLogBuilder.java:194)

Caused: hudson.util.IOException2: revision check failed on 
/GlobalRegs.tcl

at 
hudson.scm.SubversionChangeLogBuilder.buildModule(SubversionChangeLogBuilder.java:208)

at 
hudson.scm.SubversionChangeLogBuilder.run(SubversionChangeLogBuilder.java:138)

at hudson.scm.SubversionSCM.calcChangeLog(SubversionSCM.java:725)

at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:860)

at hudson.scm.SCM.checkout(SCM.java:496)

at hudson.model.AbstractProject.checkout(AbstractProject.java:1280)

at 
hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)

at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)

at 
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)

at hudson.model.Run.execute(Run.java:1733)

at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)

at hudson.model.ResourceController.execute(ResourceController.java:97)

at hudson.model.Executor.run(Executor.java:405)

The credentials for the job are correct - they worked fine before the upgrade.

The exception occurs following a svn commit.  If I then run the job manually it 
succeeds.

Any advice please?

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


Re: Always run specific build/postbuild step

2017-04-11 Thread Richard Ginga
your Step 1 returns 1 which is a failure and Jenkins is always going to
stop build execution at that point. no other "build steps" will be
executed.

You can install the flexible publish plugin (this lets you can run many
build steps in the Post-build phase). the condition can be set to test the
"Current build status" where you can set Worst as Failed and best as
Success, then I think it will always run.


On Mon, Apr 10, 2017 at 5:29 PM, Alex Domoradov  wrote:

> Hello,
>
> is it possible at all? I have tried to use Conditional BuildStep with
> condition "Always" but without success. I have two build step each of them
> is shell script.
>
> Build step1 - Execute shell
> #!/bin/bash -ex
>
> echo "*** STEP1 ***"
> exit 1
>
> Build step2 - Execute shell
> #!/bin/bash -ex
>
> echo "*** STEP2 ***"
> exit 0
>
> Conditional step (single)
> Run?: Always
> Builder: Execute shell
> #!/bin/bash
>
> echo "%%% CLEAN %%%"
>
> With such settings I get the following result
>
> Started by user Alex
> [EnvInject] - Loading node environment variables.
> Building on master in workspace /usr/share/tomcat8/.jenkins/workspace/temp
> Run condition [Always] enabling prebuild for step [Execute shell]
> [temp] $ /bin/bash -ex /var/cache/tomcat8/temp/hudson8076614436373471043.sh
> + echo '*** STEP1 ***'
> *** STEP1 ***
> + exit 1
> Build step 'Execute shell' marked build as failure
> Finished: FAILURE
>
> P.S.
> Jenkins ver. 1.652
>
> --
> 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/0c5b0978-570f-4871-b2cc-4ca806774dbb%40googlegroups.
> com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Dick Ginga
Build Engineer
rgi...@disruptorbeam.com

-- 
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/CAL3PpaXQpOg_PCwKJ-KAgbQDYNHqumnqa5w7s4yrkgw%3DgnsFow%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


jenkins-job-builder user converting to dsl (maybe pipeline)

2017-04-11 Thread dpreilan
Have a lot of jobs created with jenkins-jobs-builder that it is proving 
difficult to maintain.

Looking to move to dsl and possibly pipeline-dsl.

Most of jobs have the following logic: 
 - ability to build debug and/or release builds
 - manually invoked or scm triggered
 - ability to select whether to promote or not, which I use to store 
artifacts to package repository or a ssh-server depending on job
- users want build artifacts for each build
- users may not want those artifacts to be used by dependent jobs 
OR promoted to package repository.

 For every job, there are 2 sub-jobs to handle the release and debug builds
- actual builds are performed in a docker container
- there is a shared id (patch number) between the release and debug 
builds, but again user can disable one or both via build parameter.
 
I can't quite figure out how to do everything in dsl yet and pipeline-dsl 
even less.

First, thing. I have a set of parameters for each job, 1 that is using 
PersistentParameter plugin. This is needed for manually triggered usage 
where user can set a value and it is remembered the next time. Looking at 
the dsl-plugin api viewer, I can see the plugin, but can not make it work.

import com.gem.persistentparameter.*

job('ci') {
description 'Build and test the app.'
parameters {
stringParam('p1','master','my des')
persistentStringParameterDefinition('p2','t123',false, 'help')
}
scm {
github 'sheehan/job-dsl-playground'
}
steps {
gradle 'test'
}
publishers {
archiveJunit 'build/test-results/**/*.xml'
}
}

javaposse.jobdsl.dsl.DslScriptException: (script, line 7) No signature of 
method: 
javaposse.jobdsl.dsl.helpers.BuildParametersContext.persistentStringParameterDefinition()
 
is applicable for argument types: (java.lang.String, java.lang.String, 
java.lang.Boolean, java.lang.String) values: [p2, t123, false, help]

How can I achieve this? 
However, I can port my yaml/logic to dsl and clean things up and hopefully 
simplified, and I can use gradle to load jobs into jenkins.
For pipeline-dsl, I am less sure. Loading Jenkinsfile from scm doesn't fit 
my situation, but possibly a dsl seedjob to handle it can work. The 
pipeline-dsl has less features so I will probably be face with similar 
issues as above. How would I handle? To really clean my jobs up, ideally, 
would want my parameters moved up to pipeline parameters.

Thanks in advance,
Doug

-- 
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/922678bd-84b2-4a31-8dc4-476a55922b7a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Xcode plug-in alternatives?

2017-04-11 Thread Richard Ginga
We've updated to Xcode 8 and using the plugin we do this:

add "-archivePath "${WORKSPACE}/build/x.xcarchive" to the Custom Xcode
Build Arguments

then in a shell step following the xocde step NOTE: this uses the ad-hoc
cert, you would want your "distribution" there (I think):

#
# warning: PackageApplication is deprecated, use `xcodebuild
-exportArchive` instead.
#
# for this command we need a very simple Plist file. created here
#
#!/bin/bash

cat < ./build/export.plist

http://www.apple.com/DTDs/PropertyList-1.0.dtd;>


method
ad-hoc


EOF

xcodebuild -exportArchive -archivePath build/x.xcarchive
-exportOptionsPlist build/export.plist -exportPath .



On Mon, Apr 10, 2017 at 5:17 PM,  wrote:

> The Xcode plugin seems to have been struggling with support for a while
> now, and with the latest version of Xcode the plugin can no longer build
> IPAs for distribution.
>
> Any hope of the Xcode plugin being resurrected? Anyone have any good
> alternatives?
>
> I guess I'll need to go the shell script route, but replacing all the
> functionality of the Xcode plugin will take a while. Anyone have any good
> scripts they can share?
>
> Thanks
>
> --
> 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/b7073138-55a2-4ea6-a4fd-d1a6022ade81%40googlegroups.
> com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Dick Ginga
Build Engineer
rgi...@disruptorbeam.com

-- 
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/CAL3PpaU6aPNn4Rr2ai_4e3V2CGup6bspXMb%3D4hAFOOykwTwMyg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANNOUNCE] Jenkins Upgrades to Java 8

2017-04-11 Thread Pieter-Jan Busschaert
Hello,


We use the debian packages from https://pkg.jenkins.io/debian/ and upgraded 
to 2.54 today. I assumed (wrongly) that these packages would contain the 
necessary dependency information so everything would "just work". This is 
not the case, as the .deb file contains only a data section (with the 
installation files), but no config section (which has the dependency 
information). Would it be possible to have these .deb packages mention the 
need for Java 8? In that case a normal update should just pull in the new 
required Java version (at least on the master).


Kind regards,

Pieter-Jan


 

-- 
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/3b2685b3-41a6-46a8-9047-3003b39ecb8b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.