Re: Confused by declarative pipeline trigger specifications

2019-09-25 Thread Slide
The GUI portion is filled in by the pipeline once it has run once and the
triggers and so forth have been processed. You can't change the cron in the
GUI and have it work. It only works to change it in the pipeline itself.

On Wed, Sep 25, 2019 at 1:16 AM David Aldrich 
wrote:

> Hi
>
> We use declarative pipelines extensively, triggered by SCM change. We use
> a cron spec to specify a SCM polling interval.
>
> It seems that the trigger specification can be set in two places: in the
> GUI configuration for the job and in the pipeline itself.
>
> Do I need to set both  trigger specifications (to the same specification)?
>
> Do they have different purposes?
>
> 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/CAJK_iei2XpTWYKTSmpyGqv1WiL21FwjTOgn5XG4KNXTeJjUpRA%40mail.gmail.com
> 
> .
>


-- 
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/CAPiUgVdctGzSX%2B%3DUDKt9Dkm2uM1%2Bqtiha70Dm2ec9H0g9ntQUQ%40mail.gmail.com.


Re: About SMTPSendFailedException

2019-09-25 Thread Ajij Shaikh
Hey,

It worked for me when I use version 1.23 of mailer thanks for help!

Thanks,
Ajij

On Wed, Sep 25, 2019 at 1:42 PM Adrien Lecharpentier <
adrien.lecharpent...@gmail.com> wrote:

> Hello,
>
> I'm wondering which version of the Mailer plugin you are using on your
> instance.
> Is it possible that you are using a version between 1.25 and 1.27 (both
> included)?
> If so, please upgrade to 1.28 because you might be facing
> https://issues.jenkins-ci.org/browse/JENKINS-59430.
>
> BR,
> -- Adrien
>
> Le mer. 25 sept. 2019 à 09:25, Ajij Shaikh  a
> écrit :
>
>> Hey,
>>
>> I am trying Jenkins for email notification please check below
>> configuration and suggest the solution for it -
>>
>> 1. under manage Jenkins -> configure system I have set the configuration
>> PFB screenshot -
>>
>> 2. On the same page when I check below box and give email id there to
>> test connection then it sends mail successfully
>>
>> Test configuration by sending a test e-mail
>>
>> But this fails when we create the job and add mail id to post build
>> actions -> Email notification -> recipient
>> and check the box PFA screenshot for that
>> Send e-mail for every unstable build and Send separate e-mails to
>> individuals who broke the build
>>
>>
>> 3. and trigger to a failed build
>>
>> 4. Unable to send the email see the stack trace of the build ---
>>
>>
>> Started by user ajij 
>> Running as SYSTEM
>> Building in workspace /var/lib/jenkins/workspace/test1
>> [test1] $ /bin/sh -xe /tmp/jenkins2681186595655127592.sh
>> + [ -f  ]
>> + echo  not found.
>>  not found.
>> + exit 1
>> Build step 'Execute shell' marked build as failure
>> Sending e-mails to: ajijsha...@gofynd.com
>> ERROR: 530-5.5.1 Authentication Required. Learn more at
>> 530 5.5.1  https://support.google.com/mail/?p=WantAuthError 
>> m68sm4994696pfb.122 - gsmtp
>>
>> com.sun.mail.smtp.SMTPSendFailedException: 530-5.5.1 Authentication 
>> Required. Learn more at
>> 530 5.5.1  https://support.google.com/mail/?p=WantAuthError 
>> m68sm4994696pfb.122 - gsmtp
>>
>>  at 
>> com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2057)
>>  at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1580)
>>  at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1097)
>>  at javax.mail.Transport.send0(Transport.java:195)
>>  at javax.mail.Transport.send(Transport.java:124)
>>  at hudson.tasks.MailSender.run(MailSender.java:130)
>>  at hudson.tasks.Mailer.perform(Mailer.java:175)
>>  at hudson.tasks.Mailer.perform(Mailer.java:138)
>>  at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
>>  at 
>> hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
>>  at 
>> hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
>>  at hudson.model.Build$BuildExecution.post2(Build.java:186)
>>  at 
>> hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
>>  at hudson.model.Run.execute(Run.java:1843)
>>  at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
>>  at hudson.model.ResourceController.execute(ResourceController.java:97)
>>  at hudson.model.Executor.run(Executor.java:429)
>>
>> Finished: FAILURE
>>
>>
>> Quick help is appreciated
>>
>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to jenkinsci-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jenkinsci-users/b114ca5a-3251-4999-bbd4-7cc506c0941d%40googlegroups.com
>> 
>> .
>>
>
>
> --
> Adrien Lecharpentier
>
> --
> 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/CAKwJSvwneZdD-jSK_r9io81DFRAb1Zaqv_aEcBRPfnMp2%3DddwA%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/CADXRji3ePuEOcL7u5hDB7Dhu%2BZ6obqdGqY1UjiqHSMj72cxWYQ%40mail.gmail.com.


Re: Gradle Tool Failed Download

2019-09-25 Thread Sverre Moe
I thought about using "Extract *.zip/*.tar.gz instead, and pointing it to a 
custom Gradle distribution at an inhouse URL.

However the gradle distribution is unpackaged into a second subdirectory:
/jenkins/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.6/
gradle-5.6.1
While the tool gives me the directory:
/jenkins/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.6
And I expect gradle executable should be:
${gradleTool}/bin/gradle

Unpacking 
https://nexus.company.no:8443/repository/gradle-distributions/gradle-5.6.1-bin.zip
 

 to 
/home/build/jenkins/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.6 
on sles12.3-x86_64_4


+ 
/home/build/jenkins/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.6/bin/gradle
 -version
/home/build/jenkins/workspace/pipeline-tests/pipeline-gradle-tools@tmp/durable-81b2542a/script.sh:
 line 1: 
/home/build/jenkins/tools/hudson.plugins.gradle.GradleInstallation/gradle-5.6/bin/gradle:
 No such file or directory



I have been trying to use a "Shell command" instead, but am having 
difficulty scripting a quick no-op if the tool is already installed. 
Getting none of the Bash magic for checking empty directory to work.


onsdag 25. september 2019 11.38.23 UTC+2 skrev Sverre Moe følgende:
>
> There is no Exception thrown when running that in script console.
>
> Result: PK 
> A 
> gradle-5.6.2/ PK 
> AĘ|H !gradle-5.6.2/getting-start
>
> Same for Maven
> hudson.ProxyConfiguration.getInputStream(new URL("
> https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip;)).text.substring(0,
>  
> 100)
>
> Result: PK  
>  B� O apache-maven-3.6.2/PK  
>  =� O apache-maven-3.6.2/li
>
>
>
> onsdag 25. september 2019 11.13.13 UTC+2 skrev Daniel Beck følgende:
>>
>> Run the following in the Jenkins script console:
>>
>> hudson.ProxyConfiguration.getInputStream(new URL("
>> https://services.gradle.org/distributions/gradle-5.6.2-bin.zip;)).text.substring(0,
>>  
>> 100)
>>
>> Note that this loads the entire downloaded file, if successful, into 
>> memory, so not quite production quality code ;-)
>>
>> Replace the URL as needed to try whatever URLs are listed as being 
>> downloaded with the different installers. The expectation for zip files is 
>> that the output starts with "PK". If the same exception gets thrown for 
>> Groovy/Gradle, while Maven works, it's SSL after all. (Gradle Wrapper would 
>> run probably on a different machine, with different JRE, so that doesn't 
>> tell you much.)
>>
>>
>> On Wed, Sep 25, 2019 at 10:59 AM Sverre Moe  wrote:
>>
>>> Both the MavenInstaller and GradleInstaller are very similar
>>>
>>> public static class MavenInstaller extends DownloadFromUrlInstaller {
>>> public class GradleInstaller extends DownloadFromUrlInstaller {
>>>
>>> I thought perhaps they used different implementation, and that was the 
>>> reason for why GradleInstaller had problems.
>>>
>>> https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/tasks/Maven.java
>>>
>>> https://github.com/jenkinsci/gradle-plugin/blob/master/src/main/java/hudson/plugins/gradle/GradleInstaller.java
>>>
>>>
>>> Both Jenkins Server and Build agents are behind a firewall. The Jenkins 
>>> has proxy configured, but the build agents do not have any proxy configured.
>>> I have same problem using Gradle wrapper, but as mentioned earlier here 
>>> gradle wrapper works if I configure proxy properties.
>>>
>>>
>>> onsdag 25. september 2019 10.41.32 UTC+2 skrev Sverre Moe følgende:

 Which projects has the source code for the Maven, Gradle and Groovy 
 Tool installers? I want to have a check to see if there is something to be 
 done on the Gradle and Groovy tool installers.

 onsdag 25. september 2019 10.30.17 UTC+2 skrev Sverre Moe følgende:
>
> The Gradle tool installer is not the only tool having this problem. I 
> am getting the same SSL problem with Groovy tool installers.
>
> Makes me wonder, what does the maven tool installer do different than 
> the Gradle and Groovy tool installers.
>
> mandag 23. september 2019 22.26.10 UTC+2 skrev Sverre Moe følgende:
>>
>> I have gotten this problem both for Jenkins running Java 8u221 and 
>> Java 11.0.4+11. The latest for both 8 and 11.
>>
>> Maven tool download works just fine, using the same JDK, so why would 
>> the gradle installer have a problem?
>>
>> I do not like to check in the gradle wrapper files into version 
>> control, but considering it might ease new developers I am beginning to 
>> lean into it.
>>
>> mandag 23. september 2019 18.25.04 UTC+2 skrev Jan Monterrubio 
>> følgende:
>>>
>>> I’ve always relied on projects supplying the gradle wrapper 
>>> instead... that might be a good alternative if you can’t upgrade the JRE
>>>
>>> On Mon, Sep 

Re: Gradle Tool Failed Download

2019-09-25 Thread Sverre Moe
There is no Exception thrown when running that in script console.

Result: PK  
  A 
gradle-5.6.2/ PK  
  AĘ|H !gradle-5.6.2/getting-start

Same for Maven
hudson.ProxyConfiguration.getInputStream(new 
URL("https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip;)).text.substring(0,
 
100)

Result: PK  
 B� O apache-maven-3.6.2/PK  
 =� O apache-maven-3.6.2/li



onsdag 25. september 2019 11.13.13 UTC+2 skrev Daniel Beck følgende:
>
> Run the following in the Jenkins script console:
>
> hudson.ProxyConfiguration.getInputStream(new URL("
> https://services.gradle.org/distributions/gradle-5.6.2-bin.zip;)).text.substring(0,
>  
> 100)
>
> Note that this loads the entire downloaded file, if successful, into 
> memory, so not quite production quality code ;-)
>
> Replace the URL as needed to try whatever URLs are listed as being 
> downloaded with the different installers. The expectation for zip files is 
> that the output starts with "PK". If the same exception gets thrown for 
> Groovy/Gradle, while Maven works, it's SSL after all. (Gradle Wrapper would 
> run probably on a different machine, with different JRE, so that doesn't 
> tell you much.)
>
>
> On Wed, Sep 25, 2019 at 10:59 AM Sverre Moe  > wrote:
>
>> Both the MavenInstaller and GradleInstaller are very similar
>>
>> public static class MavenInstaller extends DownloadFromUrlInstaller {
>> public class GradleInstaller extends DownloadFromUrlInstaller {
>>
>> I thought perhaps they used different implementation, and that was the 
>> reason for why GradleInstaller had problems.
>>
>> https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/tasks/Maven.java
>>
>> https://github.com/jenkinsci/gradle-plugin/blob/master/src/main/java/hudson/plugins/gradle/GradleInstaller.java
>>
>>
>> Both Jenkins Server and Build agents are behind a firewall. The Jenkins 
>> has proxy configured, but the build agents do not have any proxy configured.
>> I have same problem using Gradle wrapper, but as mentioned earlier here 
>> gradle wrapper works if I configure proxy properties.
>>
>>
>> onsdag 25. september 2019 10.41.32 UTC+2 skrev Sverre Moe følgende:
>>>
>>> Which projects has the source code for the Maven, Gradle and Groovy Tool 
>>> installers? I want to have a check to see if there is something to be done 
>>> on the Gradle and Groovy tool installers.
>>>
>>> onsdag 25. september 2019 10.30.17 UTC+2 skrev Sverre Moe følgende:

 The Gradle tool installer is not the only tool having this problem. I 
 am getting the same SSL problem with Groovy tool installers.

 Makes me wonder, what does the maven tool installer do different than 
 the Gradle and Groovy tool installers.

 mandag 23. september 2019 22.26.10 UTC+2 skrev Sverre Moe følgende:
>
> I have gotten this problem both for Jenkins running Java 8u221 and 
> Java 11.0.4+11. The latest for both 8 and 11.
>
> Maven tool download works just fine, using the same JDK, so why would 
> the gradle installer have a problem?
>
> I do not like to check in the gradle wrapper files into version 
> control, but considering it might ease new developers I am beginning to 
> lean into it.
>
> mandag 23. september 2019 18.25.04 UTC+2 skrev Jan Monterrubio 
> følgende:
>>
>> I’ve always relied on projects supplying the gradle wrapper 
>> instead... that might be a good alternative if you can’t upgrade the JRE
>>
>> On Mon, Sep 23, 2019 at 05:37 Daniel Beck  
>> wrote:
>>
>>>
>>>
>>> On Mon, Sep 23, 2019 at 2:28 PM Sverre Moe  
>>> wrote:
>>>
 ERROR: Failed to download 
 https://services.gradle.org/distributions/gradle-5.6.2-bin.zip from 
 agent; will retry from master

 sun.security.provider.certpath.SunCertPathBuilderException: unable to 
 find valid certification path to requested target



 Which makes me believe that the Gradle tool does not use Jenkins 
 Proxy settings, while Maven tools does use it.

>>>
>>> The error means it's an SSL issue. If you're on an old JRE, update 
>>> it. 
>>>
>>> -- 
>>> 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 jenkins...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jenkinsci-users/CAMo7PtLJW%2BeMQ-509sB%2Bv%2BdAtz_%3DDudWMsiE-eCdZYfduAPcyA%40mail.gmail.com
>>>  
>>> 
>>> .
>>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Users" 

Re: Gradle Tool Failed Download

2019-09-25 Thread Daniel Beck
Run the following in the Jenkins script console:

hudson.ProxyConfiguration.getInputStream(new URL("
https://services.gradle.org/distributions/gradle-5.6.2-bin.zip;)).text.substring(0,
100)

Note that this loads the entire downloaded file, if successful, into
memory, so not quite production quality code ;-)

Replace the URL as needed to try whatever URLs are listed as being
downloaded with the different installers. The expectation for zip files is
that the output starts with "PK". If the same exception gets thrown for
Groovy/Gradle, while Maven works, it's SSL after all. (Gradle Wrapper would
run probably on a different machine, with different JRE, so that doesn't
tell you much.)


On Wed, Sep 25, 2019 at 10:59 AM Sverre Moe  wrote:

> Both the MavenInstaller and GradleInstaller are very similar
>
> public static class MavenInstaller extends DownloadFromUrlInstaller {
> public class GradleInstaller extends DownloadFromUrlInstaller {
>
> I thought perhaps they used different implementation, and that was the
> reason for why GradleInstaller had problems.
>
> https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/tasks/Maven.java
>
> https://github.com/jenkinsci/gradle-plugin/blob/master/src/main/java/hudson/plugins/gradle/GradleInstaller.java
>
>
> Both Jenkins Server and Build agents are behind a firewall. The Jenkins
> has proxy configured, but the build agents do not have any proxy configured.
> I have same problem using Gradle wrapper, but as mentioned earlier here
> gradle wrapper works if I configure proxy properties.
>
>
> onsdag 25. september 2019 10.41.32 UTC+2 skrev Sverre Moe følgende:
>>
>> Which projects has the source code for the Maven, Gradle and Groovy Tool
>> installers? I want to have a check to see if there is something to be done
>> on the Gradle and Groovy tool installers.
>>
>> onsdag 25. september 2019 10.30.17 UTC+2 skrev Sverre Moe følgende:
>>>
>>> The Gradle tool installer is not the only tool having this problem. I am
>>> getting the same SSL problem with Groovy tool installers.
>>>
>>> Makes me wonder, what does the maven tool installer do different than
>>> the Gradle and Groovy tool installers.
>>>
>>> mandag 23. september 2019 22.26.10 UTC+2 skrev Sverre Moe følgende:

 I have gotten this problem both for Jenkins running Java 8u221 and Java
 11.0.4+11. The latest for both 8 and 11.

 Maven tool download works just fine, using the same JDK, so why would
 the gradle installer have a problem?

 I do not like to check in the gradle wrapper files into version
 control, but considering it might ease new developers I am beginning to
 lean into it.

 mandag 23. september 2019 18.25.04 UTC+2 skrev Jan Monterrubio følgende:
>
> I’ve always relied on projects supplying the gradle wrapper instead...
> that might be a good alternative if you can’t upgrade the JRE
>
> On Mon, Sep 23, 2019 at 05:37 Daniel Beck  wrote:
>
>>
>>
>> On Mon, Sep 23, 2019 at 2:28 PM Sverre Moe  wrote:
>>
>>> ERROR: Failed to download 
>>> https://services.gradle.org/distributions/gradle-5.6.2-bin.zip from 
>>> agent; will retry from master
>>>
>>> sun.security.provider.certpath.SunCertPathBuilderException: unable to 
>>> find valid certification path to requested target
>>>
>>>
>>>
>>> Which makes me believe that the Gradle tool does not use Jenkins
>>> Proxy settings, while Maven tools does use it.
>>>
>>
>> The error means it's an SSL issue. If you're on an old JRE, update
>> it.
>>
>> --
>> 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 jenkins...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jenkinsci-users/CAMo7PtLJW%2BeMQ-509sB%2Bv%2BdAtz_%3DDudWMsiE-eCdZYfduAPcyA%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/a8ae71dc-3515-499c-a038-26a80eebc3a0%40googlegroups.com
> 
> .
>


-- 

Daniel Beck
Senior Software Engineer
CloudBees, Inc.

[image: CloudBees-Logo.png]

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop 

Re: How to check the actual assigned label of a queued build via REST API?

2019-09-25 Thread Rafael Rezende

>
> we use Go but you can use curl or any HTTP client, it is something like 
> this
>
> JENKINS_CRUMB=$(curl --silent 
> "$JENKINS_URL/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,\":\",//crumb)")
> curl --silent -X POST -H "${JENKINS_CRUMB}" -F "script= ${JENKINS_URL}/scriptText
>  
>

Interesting, thanks!
We use jenkins-cli, more or less like this:

cat script.groovy | java -jar ./jenkins-cli.jar -ssh -user userID -i 
key_rsa -s "${server}" groovy =  >> output.xml

Probably based on an old approach. I'll switch it with curl...
 

yep, this data should be in the API, probably it is a matter of adding an 
> annotation in the Class
>  
>

Indeed, the data is there, it seems that an *@Exported* annotation would do 
it:

https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/Queue.java#L2155

I'm not sure about the implications though.

Anyway, I would like to get the Label because I need to know in advance 
whether I should connect a node to that Master or not. But I forgot the 
fact that the Label can be a regular expression, and that kind of kills my 
purpose because I would then need to resolve the expression also in 
advance. And replicating the Jenkins mechanism for that wouldn't be so wise 
in the long term.

I tried to use the method 
*Jenkins.instance.queue.countBuildableItemsFor(Label)* to ask Jenkins 
itself to check that for me, but that didn't work for me as I expected...

For example, I triggered a build that requests the expression "myLabelA || 
myLabelB". Then I programmatically created a Label that would match that. 
Yet, Jenkins couldn't match it for some reason:

import hudson.model.labels.*

Jenkins.instance.queue.items.each {
  println ">> Label expression from the pending build:"
  def labelFromQueueJob = it.getAssignedLabel()
  println "Type: " + labelFromQueueJob.class
  println "Expression: " + labelFromQueueJob
  println ">> countBuildableItemsFor " + labelFromQueueJob + " : " + Jenkins
.instance.queue.countBuildableItemsFor(labelFromQueueJob)
}

println "\n>> Artificially created Label expression:"
LabelExpression artificialLabelExp = new LabelExpression.Or(new LabelAtom(
"myLabelA"),new LabelAtom("myLabelB"))
println "Type: " + artificialLabelExp.class
println "Expression: " + artificialLabelExp
println ">> countBuildableItemsFor " + artificialLabelExp + " : " + Jenkins.
instance.queue.countBuildableItemsFor(artificialLabelExp)

Output:

>> Label expression from the pending build:
Type: class hudson.model.labels.LabelExpression$Or
Expression: myLabelA||myLabelB
>> countBuildableItemsFor myLabelA||myLabelB : 1

>> Artificially created Label expression:
Type: class hudson.model.labels.LabelExpression$Or
Expression: myLabelA||myLabelB
>> countBuildableItemsFor myLabelA||myLabelB : 0


No questions left. I'm glad that you pointed out that curl solution. I've 
certainly overlook it!

-- 
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/64dc6461-704b-41a0-a7db-53d61657b444%40googlegroups.com.


Re: Gradle Tool Failed Download

2019-09-25 Thread Sverre Moe
Both the MavenInstaller and GradleInstaller are very similar

public static class MavenInstaller extends DownloadFromUrlInstaller {
public class GradleInstaller extends DownloadFromUrlInstaller {

I thought perhaps they used different implementation, and that was the 
reason for why GradleInstaller had problems.
https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/tasks/Maven.java
https://github.com/jenkinsci/gradle-plugin/blob/master/src/main/java/hudson/plugins/gradle/GradleInstaller.java


Both Jenkins Server and Build agents are behind a firewall. The Jenkins has 
proxy configured, but the build agents do not have any proxy configured.
I have same problem using Gradle wrapper, but as mentioned earlier here 
gradle wrapper works if I configure proxy properties.


onsdag 25. september 2019 10.41.32 UTC+2 skrev Sverre Moe følgende:
>
> Which projects has the source code for the Maven, Gradle and Groovy Tool 
> installers? I want to have a check to see if there is something to be done 
> on the Gradle and Groovy tool installers.
>
> onsdag 25. september 2019 10.30.17 UTC+2 skrev Sverre Moe følgende:
>>
>> The Gradle tool installer is not the only tool having this problem. I am 
>> getting the same SSL problem with Groovy tool installers.
>>
>> Makes me wonder, what does the maven tool installer do different than the 
>> Gradle and Groovy tool installers.
>>
>> mandag 23. september 2019 22.26.10 UTC+2 skrev Sverre Moe følgende:
>>>
>>> I have gotten this problem both for Jenkins running Java 8u221 and Java 
>>> 11.0.4+11. The latest for both 8 and 11.
>>>
>>> Maven tool download works just fine, using the same JDK, so why would 
>>> the gradle installer have a problem?
>>>
>>> I do not like to check in the gradle wrapper files into version control, 
>>> but considering it might ease new developers I am beginning to lean into it.
>>>
>>> mandag 23. september 2019 18.25.04 UTC+2 skrev Jan Monterrubio følgende:

 I’ve always relied on projects supplying the gradle wrapper instead... 
 that might be a good alternative if you can’t upgrade the JRE

 On Mon, Sep 23, 2019 at 05:37 Daniel Beck  wrote:

>
>
> On Mon, Sep 23, 2019 at 2:28 PM Sverre Moe  wrote:
>
>> ERROR: Failed to download 
>> https://services.gradle.org/distributions/gradle-5.6.2-bin.zip from 
>> agent; will retry from master
>>
>> sun.security.provider.certpath.SunCertPathBuilderException: unable to 
>> find valid certification path to requested target
>>
>>
>>
>> Which makes me believe that the Gradle tool does not use Jenkins 
>> Proxy settings, while Maven tools does use it.
>>
>
> The error means it's an SSL issue. If you're on an old JRE, update it. 
>
> -- 
> 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 jenkins...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/CAMo7PtLJW%2BeMQ-509sB%2Bv%2BdAtz_%3DDudWMsiE-eCdZYfduAPcyA%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/a8ae71dc-3515-499c-a038-26a80eebc3a0%40googlegroups.com.


Re: Gradle Tool Failed Download

2019-09-25 Thread Sverre Moe
Which projects has the source code for the Maven, Gradle and Groovy Tool 
installers? I want to have a check to see if there is something to be done 
on the Gradle and Groovy tool installers.

onsdag 25. september 2019 10.30.17 UTC+2 skrev Sverre Moe følgende:
>
> The Gradle tool installer is not the only tool having this problem. I am 
> getting the same SSL problem with Groovy tool installers.
>
> Makes me wonder, what does the maven tool installer do different than the 
> Gradle and Groovy tool installers.
>
> mandag 23. september 2019 22.26.10 UTC+2 skrev Sverre Moe følgende:
>>
>> I have gotten this problem both for Jenkins running Java 8u221 and Java 
>> 11.0.4+11. The latest for both 8 and 11.
>>
>> Maven tool download works just fine, using the same JDK, so why would the 
>> gradle installer have a problem?
>>
>> I do not like to check in the gradle wrapper files into version control, 
>> but considering it might ease new developers I am beginning to lean into it.
>>
>> mandag 23. september 2019 18.25.04 UTC+2 skrev Jan Monterrubio følgende:
>>>
>>> I’ve always relied on projects supplying the gradle wrapper instead... 
>>> that might be a good alternative if you can’t upgrade the JRE
>>>
>>> On Mon, Sep 23, 2019 at 05:37 Daniel Beck  wrote:
>>>


 On Mon, Sep 23, 2019 at 2:28 PM Sverre Moe  wrote:

> ERROR: Failed to download 
> https://services.gradle.org/distributions/gradle-5.6.2-bin.zip from 
> agent; will retry from master
>
> sun.security.provider.certpath.SunCertPathBuilderException: unable to 
> find valid certification path to requested target
>
>
>
> Which makes me believe that the Gradle tool does not use Jenkins Proxy 
> settings, while Maven tools does use it.
>

 The error means it's an SSL issue. If you're on an old JRE, update it. 

 -- 
 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 jenkins...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/jenkinsci-users/CAMo7PtLJW%2BeMQ-509sB%2Bv%2BdAtz_%3DDudWMsiE-eCdZYfduAPcyA%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/3372bae7-e425-4317-ae8c-170c8b673335%40googlegroups.com.


Re: Gradle Tool Failed Download

2019-09-25 Thread Sverre Moe
The Gradle tool installer is not the only tool having this problem. I am 
getting the same SSL problem with Groovy tool installers.

Makes me wonder, what does the maven tool installer do different than the 
Gradle and Groovy tool installers.

mandag 23. september 2019 22.26.10 UTC+2 skrev Sverre Moe følgende:
>
> I have gotten this problem both for Jenkins running Java 8u221 and Java 
> 11.0.4+11. The latest for both 8 and 11.
>
> Maven tool download works just fine, using the same JDK, so why would the 
> gradle installer have a problem?
>
> I do not like to check in the gradle wrapper files into version control, 
> but considering it might ease new developers I am beginning to lean into it.
>
> mandag 23. september 2019 18.25.04 UTC+2 skrev Jan Monterrubio følgende:
>>
>> I’ve always relied on projects supplying the gradle wrapper instead... 
>> that might be a good alternative if you can’t upgrade the JRE
>>
>> On Mon, Sep 23, 2019 at 05:37 Daniel Beck  wrote:
>>
>>>
>>>
>>> On Mon, Sep 23, 2019 at 2:28 PM Sverre Moe  wrote:
>>>
 ERROR: Failed to download 
 https://services.gradle.org/distributions/gradle-5.6.2-bin.zip from agent; 
 will retry from master

 sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
 valid certification path to requested target



 Which makes me believe that the Gradle tool does not use Jenkins Proxy 
 settings, while Maven tools does use it.

>>>
>>> The error means it's an SSL issue. If you're on an old JRE, update it. 
>>>
>>> -- 
>>> 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 jenkins...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jenkinsci-users/CAMo7PtLJW%2BeMQ-509sB%2Bv%2BdAtz_%3DDudWMsiE-eCdZYfduAPcyA%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/be305763-141f-438e-b16e-d00d4a010a30%40googlegroups.com.


Confused by declarative pipeline trigger specifications

2019-09-25 Thread David Aldrich
Hi

We use declarative pipelines extensively, triggered by SCM change. We use a
cron spec to specify a SCM polling interval.

It seems that the trigger specification can be set in two places: in the
GUI configuration for the job and in the pipeline itself.

Do I need to set both  trigger specifications (to the same specification)?

Do they have different purposes?

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


Re: About SMTPSendFailedException

2019-09-25 Thread Adrien Lecharpentier
Hello,

I'm wondering which version of the Mailer plugin you are using on your
instance.
Is it possible that you are using a version between 1.25 and 1.27 (both
included)?
If so, please upgrade to 1.28 because you might be facing
https://issues.jenkins-ci.org/browse/JENKINS-59430.

BR,
-- Adrien

Le mer. 25 sept. 2019 à 09:25, Ajij Shaikh  a écrit :

> Hey,
>
> I am trying Jenkins for email notification please check below
> configuration and suggest the solution for it -
>
> 1. under manage Jenkins -> configure system I have set the configuration
> PFB screenshot -
>
> 2. On the same page when I check below box and give email id there to test
> connection then it sends mail successfully
>
> Test configuration by sending a test e-mail
>
> But this fails when we create the job and add mail id to post build
> actions -> Email notification -> recipient
> and check the box PFA screenshot for that
> Send e-mail for every unstable build and Send separate e-mails to
> individuals who broke the build
>
>
> 3. and trigger to a failed build
>
> 4. Unable to send the email see the stack trace of the build ---
>
>
> Started by user ajij 
> Running as SYSTEM
> Building in workspace /var/lib/jenkins/workspace/test1
> [test1] $ /bin/sh -xe /tmp/jenkins2681186595655127592.sh
> + [ -f  ]
> + echo  not found.
>  not found.
> + exit 1
> Build step 'Execute shell' marked build as failure
> Sending e-mails to: ajijsha...@gofynd.com
> ERROR: 530-5.5.1 Authentication Required. Learn more at
> 530 5.5.1  https://support.google.com/mail/?p=WantAuthError 
> m68sm4994696pfb.122 - gsmtp
>
> com.sun.mail.smtp.SMTPSendFailedException: 530-5.5.1 Authentication Required. 
> Learn more at
> 530 5.5.1  https://support.google.com/mail/?p=WantAuthError 
> m68sm4994696pfb.122 - gsmtp
>
>   at 
> com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2057)
>   at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1580)
>   at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1097)
>   at javax.mail.Transport.send0(Transport.java:195)
>   at javax.mail.Transport.send(Transport.java:124)
>   at hudson.tasks.MailSender.run(MailSender.java:130)
>   at hudson.tasks.Mailer.perform(Mailer.java:175)
>   at hudson.tasks.Mailer.perform(Mailer.java:138)
>   at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
>   at 
> hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
>   at 
> hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
>   at hudson.model.Build$BuildExecution.post2(Build.java:186)
>   at 
> hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
>   at hudson.model.Run.execute(Run.java:1843)
>   at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
>   at hudson.model.ResourceController.execute(ResourceController.java:97)
>   at hudson.model.Executor.run(Executor.java:429)
>
> Finished: FAILURE
>
>
> Quick help is appreciated
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/b114ca5a-3251-4999-bbd4-7cc506c0941d%40googlegroups.com
> 
> .
>


-- 
Adrien Lecharpentier

-- 
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/CAKwJSvwneZdD-jSK_r9io81DFRAb1Zaqv_aEcBRPfnMp2%3DddwA%40mail.gmail.com.