RE: Jenkins Overwriting JobDSL Configured Job

2019-08-07 Thread Reinhold Füreder
Hi Chris,

just a very naive guess:

  *   there are certain pipeline options or also called pipeline job properties 
(e.g. build discarder policy or pipeline triggers or pipeline parameters) that 
lead to updates of the pipeline job config once the corresponding “properties” 
step (of scripted) pipeline is executed

HTH Reinhold


From: jenkinsci-users@googlegroups.com  On 
Behalf Of Chris McIntosh
Sent: Mittwoch, 7. August 2019 22:25
To: jenkinsci-users@googlegroups.com
Subject: Jenkins Overwriting JobDSL Configured Job

Hey All,

Hoping somebody can shed some light on this.

I am using the jobDsl plugin with a seed job to configure a job.
The job is using a configure {} block to configure some aspect of the job for a 
plugin that doesn't have a jobDsl extension (Office365Connector).

When I run the seed job, the config.xml file for the job is updated as expected 
with the plugin configuration.

When i go to open the job in the Jenkins UI the plugin is not configured.  When 
I open the config.xml file for the job on the Jenkins Master filesystem, the 
config has been reverted somehow to remove the config block my jobDsl job has 
defined.

I configured auditd to watch the config file and I see two log entries done by 
the jenkins user within a few seconds of each other indicating to me that 
something in Jenkins is causing the job config to get overwritten after my seed 
job has defined the job.

Anybody have any clue how I can go about debugging this?

Jenkins master is running on Ubuntu 18.04.  I can provide any other info needed.
Thanks,

Chris
--
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/CAJq9cAoMLWof5Y9nrQ5Ee0WxDVVqs8QP8NfKQ5r5c1WiuM2pdA%40mail.gmail.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/AM0PR01MB61478359E40DF5C9521DE825F7D70%40AM0PR01MB6147.eurprd01.prod.exchangelabs.com.


RE: emailext using groovy-html.template with environment variables issue

2019-08-07 Thread Reinhold Füreder
Hi Amit,

(a) in your code/screenshot example the problem:
to: '${GERRIT_CHANGE_OWNER_EMAIL}',
[…]

in the to: section i want to use the env variable "GERRIT_CHANGE_OWNER_EMAIL" 
but it not passing the value  ( i tried also with env.GERRIT_CHANGE_OWNER_EMAIL 
and also /${env.GERRIT_CHANGE_OWNER_EMAIL}
… the problem is a Groovy one:

  *   Please replace the single quotes with double quotes to allow string 
interpolation


(b) And in the groovy html template code there are IMHO only certain variables 
explicitly injected:

  *   Based upon http://stackoverflow.com/a/9983405 and 
https://github.com/jenkinsci/email-ext-plugin/blob/master/src/main/java/hudson/plugins/emailext/plugins/content/ScriptContent.java
 please note the “binding.put(...)” calls, e.g.:
 *   build ... 
org.jenkinsci.plugins.workflow.job.WorkflowRun
 for Pipeline jobs
 *   project == 
build.getParent()
 ... 
org.jenkinsci.plugins.workflow.job.WorkflowJob
 - the job/project instance for this build
 *   it ... 
ScriptContentBuildWrapper(build)
 (internal ExtEmail class)
 *   rootUrl … Jenkins URL as set in your Jenkins configuration

HTH Reinhold

-- 
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/AM0PR01MB6147232554C60333C07B17DDF7D70%40AM0PR01MB6147.eurprd01.prod.exchangelabs.com.


Re: Windows Docker Master

2019-08-07 Thread Slide
I'll take no responses as a hint that people aren't generally kean on this
idea. I learned a lot in the process, so we'll chalk it up to that :-)

On Fri, Aug 2, 2019, 17:14 Slide  wrote:

> I have been playing with bringing some of the Linux containers that are
> available over to the Windows container land. My end goal is to have better
> support on the Jenkins infra for building Windows stuff as necessary (e.g.
> winsw, the Windows Installer, and plugin builds). I have played with
> creating a Windows Docker Master image [1], but I am not sure if this is
> really useful. The only use case for this that I really see is for when you
> only have Windows docker available running Windows containers. Is this
> something that people would generally be interested in, or does the Windows
> docker master meet all needs?
>
> Thanks,
>
> Alex
>
> 1 -  https://github.com/jenkinsci/docker/pull/852
>
> --
> Website: http://earl-of-code.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/CAPiUgVccCyTP-Hf%3Dkke_%2BVVUPLpRBgL9VtwTAaHcrBdv6T85jg%40mail.gmail.com.


Re: Gradle Tool Failed Download

2019-08-07 Thread Sverre Moe
I am not very keen on checking in the gradle wrapper to git. Though I do 
see the appeal.

Now with Gradle 5.5 I am planning on creating a custom Gradle distribution 
and storing it with Nexus NXRM.
https://docs.gradle.org/5.5/userguide/organizing_gradle_projects.html#sec:custom_gradle_distribution

onsdag 7. august 2019 22.00.53 UTC+2 skrev Richard Bywater følgende:
>
> Personally with Gradle I've always found it easier to use Gradle Wrapper 
> instead of full installs.
>
> Don't know if that's an option for you or not. 
>
> Richard.
>
> On Thu, 8 Aug 2019, 7:38 AM Sverre Moe, > 
> wrote:
>
>> Got it working using the "Run Shell Command". Though I find it very 
>> cumbersome.
>>
>> wget --quiet https://
>> nexus.company.no:8443/repository/gradle-distributions/gradle-5.5.1-bin.zip
>> unzip -qq gradle-5.5.1-bin.zip
>> mv gradle-5.5.1/* .
>> rmdir gradle-5.5.1
>> rm gradle-5.5.1-bin.zip
>>
>>
>> onsdag 7. august 2019 21.10.59 UTC+2 skrev Sverre Moe følgende:
>>>
>>> Perhaps I could use instead the Installers "Run Shell Command", or "Run 
>>> Batch Command".
>>> Then unpack it myself, ensuring it gets unpacked within the tool name 
>>> directory.
>>> Would I need both in order for it to work on Linux and Windows?
>>>
>>> onsdag 7. august 2019 21.04.09 UTC+2 skrev Sverre Moe følgende:

 I thought of the same.
 I downloaded the Gradle distribution zip file. Placed it in our Nexus 
 Repository Manager, in a raw repository.

 Used the Installer "Extract *.zip/*.tar.gz". Did not go so well
 Tool: gradle-5.5
 File: gradle-5.5.1-bin.zip

 Get extracted in
 hudson.plugins.gradle.GradleInstallation/gradle-5.5/gradle-5.5.1

 My pipeline script suspects to find the gradle executable under 
 ${gradleTool}/bin/gradle.

 The GradleInstaller unpacks it under the tool name.

 onsdag 7. august 2019 20.51.09 UTC+2 skrev Mark Waite følgende:
>
> Maybe this is the time to reconfigure the tool installer to download 
> from a locally cached copy of the tool instead of pulling it from the 
> internet?
>
> I've had good results with that technique by placing zip files of the 
> tool installers inside my network and then configuring the tool installer 
> to use the copy from my network instead of the copy from the internet.
>
> On Wed, Aug 7, 2019 at 11:56 AM Sverre Moe  wrote:
>
>> I have no modifed cacerts.
>>
>> Using wget also fails on the agent, until I set a proxy.
>> The Jenkins server does have proxy configured, but not the agents.
>> When I add HTTP Proxy in Jenkins under the Update Center I get a 
>> totally different stacktrace when it tries to retrieve the gradle tool.
>>
>> Unpacking https://services.gradle.org/distributions/gradle-5.5.1-bin.zip 
>> to 
>> /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5
>>  on master-sles12.3-x86_64_2
>>
>> ERROR: Failed to download 
>> https://services.gradle.org/distributions/gradle-5.5.1-bin.zip from 
>> agent; will retry from master
>> sun.security.provider.certpath.SunCertPathBuilderException: unable to 
>> find valid certification path to requested target
>>  at 
>> sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
>>  at 
>> sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
>>  at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
>>  at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:392)
>> Caused: sun.security.validator.ValidatorException: PKIX path building 
>> failed
>>  at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:397)
>>  at 
>> sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:302)
>>  at sun.security.validator.Validator.validate(Validator.java:262)
>>  at 
>> sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:330)
>>  at 
>> sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:237)
>>  at 
>> sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132)
>>  at 
>> sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1621)
>> Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to 
>> master-sles12.3-x86_64_2
>>  at 
>> hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
>>  at 
>> hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
>>  at hudson.remoting.Channel.call(Channel.java:957)
>>  at hudson.FilePath.act(FilePath.java:1070)
>>  at hudson.FilePath.act(FilePath.java:1059)
>>  at hudson.FilePath.installIfNecessaryFrom(FilePath.java:913)
>>  at 

Jenkins Overwriting JobDSL Configured Job

2019-08-07 Thread Chris McIntosh
Hey All,

Hoping somebody can shed some light on this.

I am using the jobDsl plugin with a seed job to configure a job.
The job is using a configure {} block to configure some aspect of the job
for a plugin that doesn't have a jobDsl extension (Office365Connector).

When I run the seed job, the config.xml file for the job is updated as
expected with the plugin configuration.

When i go to open the job in the Jenkins UI the plugin is not configured.
When I open the config.xml file for the job on the Jenkins Master
filesystem, the config has been reverted somehow to remove the config block
my jobDsl job has defined.

I configured auditd to watch the config file and I see two log entries done
by the jenkins user within a few seconds of each other indicating to me
that something in Jenkins is causing the job config to get overwritten
after my seed job has defined the job.

Anybody have any clue how I can go about debugging this?

Jenkins master is running on Ubuntu 18.04.  I can provide any other info
needed.

Thanks,

Chris

-- 
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/CAJq9cAoMLWof5Y9nrQ5Ee0WxDVVqs8QP8NfKQ5r5c1WiuM2pdA%40mail.gmail.com.


Re: Gradle Tool Failed Download

2019-08-07 Thread Richard Bywater
Personally with Gradle I've always found it easier to use Gradle Wrapper
instead of full installs.

Don't know if that's an option for you or not.

Richard.

On Thu, 8 Aug 2019, 7:38 AM Sverre Moe,  wrote:

> Got it working using the "Run Shell Command". Though I find it very
> cumbersome.
>
> wget --quiet https://
> nexus.company.no:8443/repository/gradle-distributions/gradle-5.5.1-bin.zip
> unzip -qq gradle-5.5.1-bin.zip
> mv gradle-5.5.1/* .
> rmdir gradle-5.5.1
> rm gradle-5.5.1-bin.zip
>
>
> onsdag 7. august 2019 21.10.59 UTC+2 skrev Sverre Moe følgende:
>>
>> Perhaps I could use instead the Installers "Run Shell Command", or "Run
>> Batch Command".
>> Then unpack it myself, ensuring it gets unpacked within the tool name
>> directory.
>> Would I need both in order for it to work on Linux and Windows?
>>
>> onsdag 7. august 2019 21.04.09 UTC+2 skrev Sverre Moe følgende:
>>>
>>> I thought of the same.
>>> I downloaded the Gradle distribution zip file. Placed it in our Nexus
>>> Repository Manager, in a raw repository.
>>>
>>> Used the Installer "Extract *.zip/*.tar.gz". Did not go so well
>>> Tool: gradle-5.5
>>> File: gradle-5.5.1-bin.zip
>>>
>>> Get extracted in
>>> hudson.plugins.gradle.GradleInstallation/gradle-5.5/gradle-5.5.1
>>>
>>> My pipeline script suspects to find the gradle executable under
>>> ${gradleTool}/bin/gradle.
>>>
>>> The GradleInstaller unpacks it under the tool name.
>>>
>>> onsdag 7. august 2019 20.51.09 UTC+2 skrev Mark Waite følgende:

 Maybe this is the time to reconfigure the tool installer to download
 from a locally cached copy of the tool instead of pulling it from the
 internet?

 I've had good results with that technique by placing zip files of the
 tool installers inside my network and then configuring the tool installer
 to use the copy from my network instead of the copy from the internet.

 On Wed, Aug 7, 2019 at 11:56 AM Sverre Moe  wrote:

> I have no modifed cacerts.
>
> Using wget also fails on the agent, until I set a proxy.
> The Jenkins server does have proxy configured, but not the agents.
> When I add HTTP Proxy in Jenkins under the Update Center I get a
> totally different stacktrace when it tries to retrieve the gradle tool.
>
> Unpacking https://services.gradle.org/distributions/gradle-5.5.1-bin.zip 
> to 
> /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5
>  on master-sles12.3-x86_64_2
>
> ERROR: Failed to download 
> https://services.gradle.org/distributions/gradle-5.5.1-bin.zip from 
> agent; will retry from master
> sun.security.provider.certpath.SunCertPathBuilderException: unable to 
> find valid certification path to requested target
>   at 
> sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
>   at 
> sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
>   at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
>   at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:392)
> Caused: sun.security.validator.ValidatorException: PKIX path building 
> failed
>   at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:397)
>   at 
> sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:302)
>   at sun.security.validator.Validator.validate(Validator.java:262)
>   at 
> sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:330)
>   at 
> sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:237)
>   at 
> sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132)
>   at 
> sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1621)
> Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to 
> master-sles12.3-x86_64_2
>   at 
> hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
>   at 
> hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
>   at hudson.remoting.Channel.call(Channel.java:957)
>   at hudson.FilePath.act(FilePath.java:1070)
>   at hudson.FilePath.act(FilePath.java:1059)
>   at hudson.FilePath.installIfNecessaryFrom(FilePath.java:913)
>   at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
>   at 
> hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
>   at 
> hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
>   at 
> hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
>   at 
> hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
>   at 
> 

Re: Gradle Tool Failed Download

2019-08-07 Thread Sverre Moe
Got it working using the "Run Shell Command". Though I find it very 
cumbersome.

wget --quiet https:
//nexus.company.no:8443/repository/gradle-distributions/gradle-5.5.1-bin.zip
unzip -qq gradle-5.5.1-bin.zip
mv gradle-5.5.1/* .
rmdir gradle-5.5.1
rm gradle-5.5.1-bin.zip


onsdag 7. august 2019 21.10.59 UTC+2 skrev Sverre Moe følgende:
>
> Perhaps I could use instead the Installers "Run Shell Command", or "Run 
> Batch Command".
> Then unpack it myself, ensuring it gets unpacked within the tool name 
> directory.
> Would I need both in order for it to work on Linux and Windows?
>
> onsdag 7. august 2019 21.04.09 UTC+2 skrev Sverre Moe følgende:
>>
>> I thought of the same.
>> I downloaded the Gradle distribution zip file. Placed it in our Nexus 
>> Repository Manager, in a raw repository.
>>
>> Used the Installer "Extract *.zip/*.tar.gz". Did not go so well
>> Tool: gradle-5.5
>> File: gradle-5.5.1-bin.zip
>>
>> Get extracted in
>> hudson.plugins.gradle.GradleInstallation/gradle-5.5/gradle-5.5.1
>>
>> My pipeline script suspects to find the gradle executable under 
>> ${gradleTool}/bin/gradle.
>>
>> The GradleInstaller unpacks it under the tool name.
>>
>> onsdag 7. august 2019 20.51.09 UTC+2 skrev Mark Waite følgende:
>>>
>>> Maybe this is the time to reconfigure the tool installer to download 
>>> from a locally cached copy of the tool instead of pulling it from the 
>>> internet?
>>>
>>> I've had good results with that technique by placing zip files of the 
>>> tool installers inside my network and then configuring the tool installer 
>>> to use the copy from my network instead of the copy from the internet.
>>>
>>> On Wed, Aug 7, 2019 at 11:56 AM Sverre Moe  wrote:
>>>
 I have no modifed cacerts.

 Using wget also fails on the agent, until I set a proxy.
 The Jenkins server does have proxy configured, but not the agents.
 When I add HTTP Proxy in Jenkins under the Update Center I get a 
 totally different stacktrace when it tries to retrieve the gradle tool.

 Unpacking https://services.gradle.org/distributions/gradle-5.5.1-bin.zip 
 to 
 /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5
  on master-sles12.3-x86_64_2

 ERROR: Failed to download 
 https://services.gradle.org/distributions/gradle-5.5.1-bin.zip from agent; 
 will retry from master
 sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
 valid certification path to requested target
at 
 sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
at 
 sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:392)
 Caused: sun.security.validator.ValidatorException: PKIX path building 
 failed
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:397)
at 
 sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:302)
at sun.security.validator.Validator.validate(Validator.java:262)
at 
 sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:330)
at 
 sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:237)
at 
 sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132)
at 
 sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1621)
 Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to 
 master-sles12.3-x86_64_2
at 
 hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
at 
 hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
at hudson.remoting.Channel.call(Channel.java:957)
at hudson.FilePath.act(FilePath.java:1070)
at hudson.FilePath.act(FilePath.java:1059)
at hudson.FilePath.installIfNecessaryFrom(FilePath.java:913)
at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
at 
 hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
at 
 hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
at 
 hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
at 
 hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
at 
 hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
at 
 hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
at 
 org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
at 

Re: Gradle Tool Failed Download

2019-08-07 Thread Sverre Moe
Perhaps I could use instead the Installers "Run Shell Command", or "Run 
Batch Command".
Then unpack it myself, ensuring it gets unpacked within the tool name 
directory.
Would I need both in order for it to work on Linux and Windows?

onsdag 7. august 2019 21.04.09 UTC+2 skrev Sverre Moe følgende:
>
> I thought of the same.
> I downloaded the Gradle distribution zip file. Placed it in our Nexus 
> Repository Manager, in a raw repository.
>
> Used the Installer "Extract *.zip/*.tar.gz". Did not go so well
> Tool: gradle-5.5
> File: gradle-5.5.1-bin.zip
>
> Get extracted in
> hudson.plugins.gradle.GradleInstallation/gradle-5.5/gradle-5.5.1
>
> My pipeline script suspects to find the gradle executable under 
> ${gradleTool}/bin/gradle.
>
> The GradleInstaller unpacks it under the tool name.
>
> onsdag 7. august 2019 20.51.09 UTC+2 skrev Mark Waite følgende:
>>
>> Maybe this is the time to reconfigure the tool installer to download from 
>> a locally cached copy of the tool instead of pulling it from the internet?
>>
>> I've had good results with that technique by placing zip files of the 
>> tool installers inside my network and then configuring the tool installer 
>> to use the copy from my network instead of the copy from the internet.
>>
>> On Wed, Aug 7, 2019 at 11:56 AM Sverre Moe  wrote:
>>
>>> I have no modifed cacerts.
>>>
>>> Using wget also fails on the agent, until I set a proxy.
>>> The Jenkins server does have proxy configured, but not the agents.
>>> When I add HTTP Proxy in Jenkins under the Update Center I get a totally 
>>> different stacktrace when it tries to retrieve the gradle tool.
>>>
>>> Unpacking https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to 
>>> /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5
>>>  on master-sles12.3-x86_64_2
>>>
>>> ERROR: Failed to download 
>>> https://services.gradle.org/distributions/gradle-5.5.1-bin.zip from agent; 
>>> will retry from master
>>> sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
>>> valid certification path to requested target
>>> at 
>>> sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
>>> at 
>>> sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
>>> at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
>>> at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:392)
>>> Caused: sun.security.validator.ValidatorException: PKIX path building failed
>>> at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:397)
>>> at 
>>> sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:302)
>>> at sun.security.validator.Validator.validate(Validator.java:262)
>>> at 
>>> sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:330)
>>> at 
>>> sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:237)
>>> at 
>>> sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132)
>>> at 
>>> sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1621)
>>> Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to 
>>> master-sles12.3-x86_64_2
>>> at 
>>> hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
>>> at 
>>> hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
>>> at hudson.remoting.Channel.call(Channel.java:957)
>>> at hudson.FilePath.act(FilePath.java:1070)
>>> at hudson.FilePath.act(FilePath.java:1059)
>>> at hudson.FilePath.installIfNecessaryFrom(FilePath.java:913)
>>> at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
>>> at 
>>> hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
>>> at 
>>> hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
>>> at 
>>> hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
>>> at 
>>> hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
>>> at 
>>> hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
>>> at 
>>> hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
>>> at 
>>> org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
>>> at 
>>> org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
>>> at 
>>> org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
>>> at 
>>> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
>>> at 
>>> 

Re: Gradle Tool Failed Download

2019-08-07 Thread Sverre Moe
I thought of the same.
I downloaded the Gradle distribution zip file. Placed it in our Nexus 
Repository Manager, in a raw repository.

Used the Installer "Extract *.zip/*.tar.gz". Did not go so well
Tool: gradle-5.5
File: gradle-5.5.1-bin.zip

Get extracted in
hudson.plugins.gradle.GradleInstallation/gradle-5.5/gradle-5.5.1

My pipeline script suspects to find the gradle executable under 
${gradleTool}/bin/gradle.

The GradleInstaller unpacks it under the tool name.

onsdag 7. august 2019 20.51.09 UTC+2 skrev Mark Waite følgende:
>
> Maybe this is the time to reconfigure the tool installer to download from 
> a locally cached copy of the tool instead of pulling it from the internet?
>
> I've had good results with that technique by placing zip files of the tool 
> installers inside my network and then configuring the tool installer to use 
> the copy from my network instead of the copy from the internet.
>
> On Wed, Aug 7, 2019 at 11:56 AM Sverre Moe  > wrote:
>
>> I have no modifed cacerts.
>>
>> Using wget also fails on the agent, until I set a proxy.
>> The Jenkins server does have proxy configured, but not the agents.
>> When I add HTTP Proxy in Jenkins under the Update Center I get a totally 
>> different stacktrace when it tries to retrieve the gradle tool.
>>
>> Unpacking https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to 
>> /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5
>>  on master-sles12.3-x86_64_2
>>
>> ERROR: Failed to download 
>> https://services.gradle.org/distributions/gradle-5.5.1-bin.zip from agent; 
>> will retry from master
>> sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
>> valid certification path to requested target
>>  at 
>> sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
>>  at 
>> sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
>>  at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
>>  at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:392)
>> Caused: sun.security.validator.ValidatorException: PKIX path building failed
>>  at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:397)
>>  at 
>> sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:302)
>>  at sun.security.validator.Validator.validate(Validator.java:262)
>>  at 
>> sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:330)
>>  at 
>> sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:237)
>>  at 
>> sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132)
>>  at 
>> sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1621)
>> Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to 
>> master-sles12.3-x86_64_2
>>  at 
>> hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
>>  at 
>> hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
>>  at hudson.remoting.Channel.call(Channel.java:957)
>>  at hudson.FilePath.act(FilePath.java:1070)
>>  at hudson.FilePath.act(FilePath.java:1059)
>>  at hudson.FilePath.installIfNecessaryFrom(FilePath.java:913)
>>  at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
>>  at 
>> hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
>>  at 
>> hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
>>  at 
>> hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
>>  at 
>> hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
>>  at 
>> hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
>>  at 
>> hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
>>  at 
>> org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
>>  at 
>> org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
>>  at 
>> org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
>>  at 
>> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
>>  at 
>> java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
>>  at 
>> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
>>  at 
>> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
>>  at java.base/java.lang.Thread.run(Thread.java:834)
>> Caused: javax.net.ssl.SSLHandshakeException
>>  at 

Re: Gradle Tool Failed Download

2019-08-07 Thread Mark Waite
Maybe this is the time to reconfigure the tool installer to download from a
locally cached copy of the tool instead of pulling it from the internet?

I've had good results with that technique by placing zip files of the tool
installers inside my network and then configuring the tool installer to use
the copy from my network instead of the copy from the internet.

On Wed, Aug 7, 2019 at 11:56 AM Sverre Moe  wrote:

> I have no modifed cacerts.
>
> Using wget also fails on the agent, until I set a proxy.
> The Jenkins server does have proxy configured, but not the agents.
> When I add HTTP Proxy in Jenkins under the Update Center I get a totally
> different stacktrace when it tries to retrieve the gradle tool.
>
> Unpacking https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to 
> /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5
>  on master-sles12.3-x86_64_2
>
> ERROR: Failed to download 
> https://services.gradle.org/distributions/gradle-5.5.1-bin.zip from agent; 
> will retry from master
> sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
> valid certification path to requested target
>   at 
> sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
>   at 
> sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
>   at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
>   at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:392)
> Caused: sun.security.validator.ValidatorException: PKIX path building failed
>   at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:397)
>   at 
> sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:302)
>   at sun.security.validator.Validator.validate(Validator.java:262)
>   at 
> sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:330)
>   at 
> sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:237)
>   at 
> sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132)
>   at 
> sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1621)
> Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to 
> master-sles12.3-x86_64_2
>   at 
> hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
>   at 
> hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
>   at hudson.remoting.Channel.call(Channel.java:957)
>   at hudson.FilePath.act(FilePath.java:1070)
>   at hudson.FilePath.act(FilePath.java:1059)
>   at hudson.FilePath.installIfNecessaryFrom(FilePath.java:913)
>   at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
>   at 
> hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
>   at 
> hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
>   at 
> hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
>   at 
> hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
>   at 
> hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
>   at 
> hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
>   at 
> org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
>   at 
> org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
>   at 
> org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
>   at 
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
>   at 
> java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
>   at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
>   at java.base/java.lang.Thread.run(Thread.java:834)
> Caused: javax.net.ssl.SSLHandshakeException
>   at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
>   at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1946)
>   at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:316)
>   at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:310)
>   at 
> sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1639)
>   at 
> sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:223)
>   at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1037)
>   at sun.security.ssl.Handshaker.process_record(Handshaker.java:965)
>   at 

Re: Gradle Tool Failed Download

2019-08-07 Thread Sverre Moe
I have no modifed cacerts.

Using wget also fails on the agent, until I set a proxy.
The Jenkins server does have proxy configured, but not the agents.
When I add HTTP Proxy in Jenkins under the Update Center I get a totally 
different stacktrace when it tries to retrieve the gradle tool.

Unpacking https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to 
/home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5
 on master-sles12.3-x86_64_2

ERROR: Failed to download 
https://services.gradle.org/distributions/gradle-5.5.1-bin.zip from agent; will 
retry from master
sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
valid certification path to requested target
at 
sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
at 
sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:392)
Caused: sun.security.validator.ValidatorException: PKIX path building failed
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:397)
at 
sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:302)
at sun.security.validator.Validator.validate(Validator.java:262)
at 
sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:330)
at 
sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:237)
at 
sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132)
at 
sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1621)
Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to 
master-sles12.3-x86_64_2
at 
hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
at 
hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
at hudson.remoting.Channel.call(Channel.java:957)
at hudson.FilePath.act(FilePath.java:1070)
at hudson.FilePath.act(FilePath.java:1059)
at hudson.FilePath.installIfNecessaryFrom(FilePath.java:913)
at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
at 
hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
at 
hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
at 
hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
at 
hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
at 
hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:92)
at 
hudson.plugins.gradle.GradleInstallation.forNode(GradleInstallation.java:30)
at 
org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:152)
at 
org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
at 
org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at 
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused: javax.net.ssl.SSLHandshakeException
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1946)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:316)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:310)
at 
sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1639)
at 
sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:223)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1037)
at sun.security.ssl.Handshaker.process_record(Handshaker.java:965)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1064)
at 
sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
at 
sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1395)
at 
sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1379)
at 
sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
at 

Re: Gradle Tool Failed Download

2019-08-07 Thread Mark Waite
I would guess that you may already be using a modified cacerts file which
does not include the authority that is certifying the validity of the SSL
certificate on the gradle site.

When I download from that URL, my web browser reports no issues from Google
Chrome on Windows and no issues from wget on a FreeBSD computer.

On Wed, Aug 7, 2019 at 10:51 AM Sverre Moe  wrote:

> This has worked before. Now that we where to upgrade from Gradle 5.0 to
> 5.5 and added the tool gradle-5.5 it fails to retrieve the archive.
>
> Anyone have an idea what the problem might be?
>
> Running both Jenkins and Agents on Java 8 Update 221.
>
> Is there any way arround this without hacking the JRE cacerts with the
> gradle web site certificate?
>
> sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
> valid certification path to requested target
>   at 
> java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
>   at 
> java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
>   at 
> java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
>   at 
> java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380)
> Caused: sun.security.validator.ValidatorException: PKIX path building failed
>   at 
> java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:385)
>   at 
> java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:290)
>   at 
> java.base/sun.security.validator.Validator.validate(Validator.java:264)
>   at 
> java.base/sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:321)
>   at 
> java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:221)
>   at 
> java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:129)
>   at 
> java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:626)
> Caused: javax.net.ssl.SSLHandshakeException: PKIX path building failed: 
> sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
> valid certification path to requested target
>   at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
>   at 
> java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:321)
>   at 
> java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:264)
>   at 
> java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:259)
>   at 
> java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:642)
>   at 
> java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(CertificateMessage.java:461)
>   at 
> java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(CertificateMessage.java:361)
>   at 
> java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392)
>   at 
> java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:448)
>   at 
> java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:425)
>   at 
> java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:178)
>   at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
>   at 
> java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1152)
>   at 
> java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1063)
>   at 
> java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)
>   at 
> java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
>   at 
> java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
>   at 
> java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2768)
>   at 
> java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2680)
>   at 
> java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1843)
>   at 
> java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
>   at 
> java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527)
>   at 
> java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:329)
>   at hudson.FilePath.installIfNecessaryFrom(FilePath.java:874)
> Caused: java.io.IOException: Failed to install 
> https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to 
> /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5
>   at hudson.FilePath.installIfNecessaryFrom(FilePath.java:938)
>   at 

Re: Gradle Tool Failed Download

2019-08-07 Thread Sverre Moe
I don't think this is a problem with the Tool as I get the same problem 
trying manually on the agent

build@jbssles123x64:~/workspace/meos-dashboard> gradle wrapper 
--gradle-version=5.5.1 
build@jbssles123x64:~/workspace/project> ./gradlew --version 
Downloading https://services.gradle.org/distributions/gradle-5.5.1-bin.zip

Gives same Stacktrace.

onsdag 7. august 2019 18.51.37 UTC+2 skrev Sverre Moe følgende:
>
> This has worked before. Now that we where to upgrade from Gradle 5.0 to 
> 5.5 and added the tool gradle-5.5 it fails to retrieve the archive.
>
> Anyone have an idea what the problem might be?
>
> Running both Jenkins and Agents on Java 8 Update 221.
>
> Is there any way arround this without hacking the JRE cacerts with the 
> gradle web site certificate?
>
> sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
> valid certification path to requested target
>   at 
> java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
>   at 
> java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
>   at 
> java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
>   at 
> java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380)
> Caused: sun.security.validator.ValidatorException: PKIX path building failed
>   at 
> java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:385)
>   at 
> java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:290)
>   at 
> java.base/sun.security.validator.Validator.validate(Validator.java:264)
>   at 
> java.base/sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:321)
>   at 
> java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:221)
>   at 
> java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:129)
>   at 
> java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:626)
> Caused: javax.net.ssl.SSLHandshakeException: PKIX path building failed: 
> sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
> valid certification path to requested target
>   at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
>   at 
> java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:321)
>   at 
> java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:264)
>   at 
> java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:259)
>   at 
> java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:642)
>   at 
> java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(CertificateMessage.java:461)
>   at 
> java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(CertificateMessage.java:361)
>   at 
> java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392)
>   at 
> java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:448)
>   at 
> java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:425)
>   at 
> java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:178)
>   at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
>   at 
> java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1152)
>   at 
> java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1063)
>   at 
> java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)
>   at 
> java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
>   at 
> java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
>   at 
> java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2768)
>   at 
> java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2680)
>   at 
> java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1843)
>   at 
> java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
>   at 
> java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527)
>   at 
> java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:329)
>   at hudson.FilePath.installIfNecessaryFrom(FilePath.java:874)
> Caused: java.io.IOException: Failed to install 
> https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to 
> /home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5
>   at 

Gradle Tool Failed Download

2019-08-07 Thread Sverre Moe
This has worked before. Now that we where to upgrade from Gradle 5.0 to 5.5 
and added the tool gradle-5.5 it fails to retrieve the archive.

Anyone have an idea what the problem might be?

Running both Jenkins and Agents on Java 8 Update 221.

Is there any way arround this without hacking the JRE cacerts with the 
gradle web site certificate?

sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
valid certification path to requested target
at 
java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
at 
java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
at 
java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
at 
java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380)
Caused: sun.security.validator.ValidatorException: PKIX path building failed
at 
java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:385)
at 
java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:290)
at 
java.base/sun.security.validator.Validator.validate(Validator.java:264)
at 
java.base/sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:321)
at 
java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:221)
at 
java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:129)
at 
java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:626)
Caused: javax.net.ssl.SSLHandshakeException: PKIX path building failed: 
sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
valid certification path to requested target
at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
at 
java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:321)
at 
java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:264)
at 
java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:259)
at 
java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:642)
at 
java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(CertificateMessage.java:461)
at 
java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(CertificateMessage.java:361)
at 
java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392)
at 
java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:448)
at 
java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:425)
at 
java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:178)
at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
at 
java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1152)
at 
java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1063)
at 
java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)
at 
java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
at 
java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at 
java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2768)
at 
java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2680)
at 
java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1843)
at 
java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
at 
java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527)
at 
java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:329)
at hudson.FilePath.installIfNecessaryFrom(FilePath.java:874)
Caused: java.io.IOException: Failed to install 
https://services.gradle.org/distributions/gradle-5.5.1-bin.zip to 
/home/build/jenkins-test/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.5
at hudson.FilePath.installIfNecessaryFrom(FilePath.java:938)
at hudson.FilePath.installIfNecessaryFrom(FilePath.java:846)
at 
hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:77)
at 
hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
at 
hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
at 

Re: gerrit-code-review-plugin integrated with multibranch pipeline

2019-08-07 Thread Luca Milanesio


> On 7 Aug 2019, at 09:15, amit r  wrote:
> 
> 
> 
> בתאריך יום רביעי, 7 באוגוסט 2019 בשעה 10:49:42 UTC+3, מאת Luca Milanesio:
> Hi Amit,
> this message is more for the Jenkins mailing list. However, as I am watching 
> actively both, I'm happy to answer :-)
> thank you for this!! - pls see my answers inline 
> 
>> On 6 Aug 2019, at 06:57, amit r > wrote:
>> 
>> Hi All, 
>> 
>> 
>> i'm not sure who to send this so trying here to get some answer for my use 
>> case..
>> 
>> i'm trying to use the plugin gerrit-code-review-plugin  in my project using 
>> multi branch pipeline.
>> installed all the pre plugins in order to use it  but as mentioned in the 
>> wiki page:
>> 
>> https://wiki.jenkins.io/display/JENKINS/Gerrit+Code+Review+Plugin 
>>  
>> not clear enough how to use it from scratch.
>> i assumed that need the gerrit trigger section in my jenkinsFile  so did 
>> this one:
>> triggers {
>> gerrit(
>> serverName: 'Gerrit Server',
>> gerritProjects: [[
>>  compareType   : 
>> 'ANT',
>>  pattern   : 
>> 'env.GERRIT_PROJECT',
>>  branches  : 
>> [[
>>  
>>  compareType: 'REG_EXP',
>>  
>>  pattern: 'env.BRANCH_NAME'
>>  
>>  ]]
>>  ]],
>> triggerOnEvents: [
>> changeMerged(),
>> patchsetCreated()
>> ],
>> skipVote: [
>> onSuccessful: false,
>> onFailed: false,
>> onUnstable  : false,
>> onNotBuilt  : false
>> ]
>> )
>> }
> 
> The above example doesn't match any of the other examples mentioned in the 
> Gerrit Code Review plugin.
> 
> See the scripted and declarative pipelines examples at:
> https://github.com/jenkinsci/gerrit-code-review-plugin 
> 
> 
>  i did try as mentioned in this link but if i'm not putting any part for the 
> trigger section as you mentioned so the pipeline will not be trigger as it 
> doesnt recognize any event

The Gerrit Code Review plugin isn't a trigger at all, you can watch the 
presentation video at:
https://www.youtube.com/watch?v=pyPMeCW-Q5k 


The plugin is a branch source, whilst the triggering is left to the Gerrit 
webhook.

> the only time that it does recognize its when adding the section above but 
> only for patchsetCreated..

I believe you are using the Gerrit Trigger plugin, and NOT the Gerrit Code 
Review plugin then.

> 
>>  but now no matter what happens - i never get any event for the merged one - 
>> only for patchsetCreated
>> 
>> 1. is there something i'm missing here?
>> 2. does this plugin should support this cases?
> 
> Yes, it is designed for being used in a multi-branch pipeline.
>  
> do you have example that it works with patchset-created and also with 
> changeMerged events?

It doesn't listen for any event, it's a branch source.

>> 3. how can i still use the branch scanning that exist in multibranch 
>> pipeline in case i also have cases that my automation push code into gerrit 
>> so will have here endless loop...
> 
> Endless loop? Can you clarify the details?
>  
> in my code i have case that for some cases i'm pushing during my CI new 
> changes into gerrit.
> now  since i want to use the scanning period in the multibranch pipeline so 
> it will find the new commit that did during my build and trigger new ci for 
> it..
> in order to skip these specific ones so added in my jenkinsFile condition 
> that in case msg contains specific UC so it will be aborted - otherwise ,you 
> will get here the endless loop since everytime will get another commit in 
> gerrit that will trigger the next one...

You can configure what are the refs you want the multibranch pipeline to fetch 
and filter out the ones you don't need.

> 
>> 4. what about webhooks in gerrit it self? is it something different? 
> 
> Webhooks can be used to trigger the branch reindexing also.
> Just configure them in Gerrit to point to Jenkins's URL /gerrit-webhook
>  added in my project in gerrit the webhook config but doesnt look that works 
> for all events... - do i need also the hooks or not needed? 

It triggers for *ALL* events generated by Gerrit. What are the ones you are 
expecting?

HTH

Luca.

> 
> HTH
> 
> Luca.
> many thanks for your help here
>> 
>> any help with this will save my day! i'm trying to resolve these issues for 
>> long time with not 

emailext using groovy-html.template with environment variables issue

2019-08-07 Thread amit r
Hi All, 
i'm using jenkinsFile and for lone time using also the emailext plugin with 
some default params that were ok for now..

now i reached to some issues that i want to use in my groovy html template 
variables that were used in my jenkinsFile  - for example env variables.

its not clear to me how can i access them within the template..
the only thing i found online is the :
build.getEnvVars() but this one also give very limited info and not on my 
env variables that i used in my build..

in addition , see some examples online that use project.name or 
build.result ... how can i know which options i have to use in this 
template? 


on top of it:
in the jenkinsFile it self we have this section:

emailext(
from: 'Jenkins',
replyTo: 'none',
recipientProviders: [[$class: 'CulpritsRecipientProvider'], [$class: 
'DevelopersRecipientProvider'], [$class: 'RequesterRecipientProvider']],
subject: '[Jenkins] ${PROJECT_NAME} - build #${BUILD_NUMBER} - 
${BUILD_STATUS}',
mimeType: 'text/html',
to: '${GERRIT_CHANGE_OWNER_EMAIL}',
body: '${SCRIPT, template="managed:groovy-html.template"}'
)


in the to: section i want to use the env variable "GERRIT_CHANGE_OWNER_EMAIL" 
but it not passing the value  ( i tried also with env.GERRIT_CHANGE_OWNER_EMAIL 
and also /${env.GERRIT_CHANGE_OWNER_EMAIL}

what is your suggestion to handle these cases?


thanks in advance!

Amit

-- 
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/a788acb9-f1c2-4cc1-98b9-6437195c315d%40googlegroups.com.


Jenkins can not connect to Gitlab on Kubernetes

2019-08-07 Thread Đỗ Tuấn
I use Kubernetes deployment to deploy Gitlab and Jenkins images. On 
Kubernetes, I create ingress for gitlab serivce  and custom url for this 
ingress. 
But when create CICD, Jenkins project config source version control type 
Gitlab can not see Gitlab repository url. Also I add host alias for Gitlab 
url on jenkins /etc/hosts file.
It always show 
Failed to connect to repository : Command "git ls-remote -h xxx.git HEAD" 
returned status code 128:
stdout: 
stderr: fatal: unable to access 'xxx.git/': The requested URL returned 
error: 502

-- 
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/1f9bc3c1-f114-49ed-8413-7fd9e10621b7%40googlegroups.com.


Re: gerrit-code-review-plugin integrated with multibranch pipeline

2019-08-07 Thread amit r


בתאריך יום רביעי, 7 באוגוסט 2019 בשעה 10:49:42 UTC+3, מאת Luca Milanesio:

> Hi Amit,
> this message is more for the Jenkins mailing list. However, as I am 
> watching actively both, I'm happy to answer :-)
>
thank you for this!! - pls see my answers inline 

>
> On 6 Aug 2019, at 06:57, amit r > wrote:
>
> Hi All, 
>
>
> i'm not sure who to send this so trying here to get some answer for my use 
> case..
>
> i'm trying to use the plugin gerrit-code-review-plugin  in my project 
> using multi branch pipeline.
> installed all the pre plugins in order to use it  but as mentioned in the 
> wiki page:
>
> https://wiki.jenkins.io/display/JENKINS/Gerrit+Code+Review+Plugin 
> not clear enough how to use it from scratch.
> i assumed that need the gerrit trigger section in my jenkinsFile  so did 
> this one:
>
> triggers {
> gerrit(
> serverName: 'Gerrit Server',
> gerritProjects: [[
>  compareType   : 
> 'ANT',
>  pattern   : 
> 'env.GERRIT_PROJECT',
>  branches  : 
> [[
>   
> compareType: 'REG_EXP',
>   
> pattern: 'env.BRANCH_NAME'
>   
> ]]
>  ]],
> triggerOnEvents: [
> changeMerged(),
> patchsetCreated()
> ],
> skipVote: [
> onSuccessful: false,
> onFailed: false,
> onUnstable  : false,
> onNotBuilt  : false
> ]
> )
> }
>
>
> The above example doesn't match any of the other examples mentioned in the 
> Gerrit Code Review plugin.
>
> See the scripted and declarative pipelines examples at:
> https://github.com/jenkinsci/gerrit-code-review-plugin
>
>  i did try as mentioned in this link but if i'm not putting any part for 
the trigger section as you mentioned so the pipeline will not be trigger as 
it doesnt recognize any event
the only time that it does recognize its when adding the section above but 
only for patchsetCreated..

 but now no matter what happens - i never get any event for the merged one 
> - only for patchsetCreated
>
> 1. is there something i'm missing here?
> 2. does this plugin should support this cases?
>
>
> Yes, it is designed for being used in a multi-branch pipeline.
>
 

> do you have example that it works with patchset-created and also with 
> changeMerged events?
>
> 3. how can i still use the branch scanning that exist in multibranch 
> pipeline in case i also have cases that my automation push code into gerrit 
> so will have here endless loop...
>
>
> Endless loop? Can you clarify the details?
>
 

> in my code i have case that for some cases i'm pushing during my CI new 
> changes into gerrit.
>
now  since i want to use the scanning period in the multibranch pipeline so 
it will find the new commit that did during my build and trigger new ci for 
it..
in order to skip these specific ones so added in my jenkinsFile 
condition that in case msg contains specific UC so it will be aborted - 
otherwise ,you will get here the endless loop since everytime will get 
another commit in gerrit that will trigger the next one...

4. what about webhooks in gerrit it self? is it something different? 
>
>
> Webhooks can be used to trigger the branch reindexing also.
> Just configure them in Gerrit to point to Jenkins's URL /gerrit-webhook
>
 added in my project in gerrit the webhook config but doesnt look that 
works for all events... - do i need also the hooks or not needed? 

>
> HTH
>
> Luca.
> many thanks for your help here
>
>
> any help with this will save my day! i'm trying to resolve these issues 
> for long time with not much luck...
>
> many thanks in advance!!
> Amit Rintzler 
>
> -- 
> -- 
> To unsubscribe, email rep...@googlegroups.com 
> More info at http://groups.google.com/group/repo-discuss?hl=en
>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Repo and Gerrit Discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to repo-d...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/repo-discuss/12c7c061-8ffa-444f-a277-ec34b66c6dc3%40googlegroups.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 

Re: gerrit-code-review-plugin integrated with multibranch pipeline

2019-08-07 Thread Luca Milanesio
Hi Amit,
this message is more for the Jenkins mailing list. However, as I am watching 
actively both, I'm happy to answer :-)

> On 6 Aug 2019, at 06:57, amit r  wrote:
> 
> Hi All, 
> 
> 
> i'm not sure who to send this so trying here to get some answer for my use 
> case..
> 
> i'm trying to use the plugin gerrit-code-review-plugin  in my project using 
> multi branch pipeline.
> installed all the pre plugins in order to use it  but as mentioned in the 
> wiki page:
> 
> https://wiki.jenkins.io/display/JENKINS/Gerrit+Code+Review+Plugin 
>  
> not clear enough how to use it from scratch.
> i assumed that need the gerrit trigger section in my jenkinsFile  so did this 
> one:
> triggers {
> gerrit(
> serverName: 'Gerrit Server',
> gerritProjects: [[
>  compareType   : 
> 'ANT',
>  pattern   : 
> 'env.GERRIT_PROJECT',
>  branches  : 
> [[
>   
> compareType: 'REG_EXP',
>   
> pattern: 'env.BRANCH_NAME'
>   
> ]]
>  ]],
> triggerOnEvents: [
> changeMerged(),
> patchsetCreated()
> ],
> skipVote: [
> onSuccessful: false,
> onFailed: false,
> onUnstable  : false,
> onNotBuilt  : false
> ]
> )
> }

The above example doesn't match any of the other examples mentioned in the 
Gerrit Code Review plugin.

See the scripted and declarative pipelines examples at:
https://github.com/jenkinsci/gerrit-code-review-plugin 

>  but now no matter what happens - i never get any event for the merged one - 
> only for patchsetCreated
> 
> 1. is there something i'm missing here?
> 2. does this plugin should support this cases?

Yes, it is designed for being used in a multi-branch pipeline.

> 3. how can i still use the branch scanning that exist in multibranch pipeline 
> in case i also have cases that my automation push code into gerrit so will 
> have here endless loop...

Endless loop? Can you clarify the details?

> 4. what about webhooks in gerrit it self? is it something different? 

Webhooks can be used to trigger the branch reindexing also.
Just configure them in Gerrit to point to Jenkins's URL /gerrit-webhook

HTH

Luca.

> 
> any help with this will save my day! i'm trying to resolve these issues for 
> long time with not much luck...
> 
> many thanks in advance!!
> Amit Rintzler 
> 
> -- 
> -- 
> To unsubscribe, email repo-discuss+unsubscr...@googlegroups.com
> More info at http://groups.google.com/group/repo-discuss?hl=en 
> 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Repo and Gerrit Discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to repo-discuss+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/repo-discuss/12c7c061-8ffa-444f-a277-ec34b66c6dc3%40googlegroups.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/869C42B4-9DA0-4ACB-90D3-944E665A9070%40gmail.com.


How to Modify “Stage View” Color when “Abort” is selected

2019-08-07 Thread Reid Watson


When a user selects “Abort” the “Stage View” presents the colour green to 
the user.


The requirement is to change the colour to Amber / Yellow or anything 
except Green.


The pipeline script contains “try” / “Catch” block when selecting the 
server. The “return” allows the user to process to the next stage but the 
"Abort" option sets the stage to Green. 



 stage('DEV Build') {
steps {
script {
try {
env.release_server = input message: 'User input 
required', ok: 'Release!',
parameters: [choice(name: 'RELEASE_SERVER', 
choices: ‘server01\nserver02', description: ‘Select server')]
}
catch (Exception e) {
  return
}


Does any onehave a workaround for this issue ?


Cheers


Reid 




-- 
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/0e0c471f-a2c9-4d6f-85fc-1e841e2fe589%40googlegroups.com.