Re: Login Problems with issues.jenkins-ci.org - who to contact?

2020-11-26 Thread Yannick Lacaute
I have reset my password with https://beta.accounts.jenkins.io/
I am able to connect on https://beta.accounts.jenkins.io/ 
 but I still 
cannot log in issues.jenkins-ci.org.

any idea ?

Le jeudi 26 novembre 2020 à 01:29:55 UTC+1, Mark Waite a écrit :

> Try resetting your password through https://beta.accounts.jenkins.io/ and 
> then attempt to login to https://issues.jenkins.io/ 
>
> If that does not work, reply to this email and we'll try more diagnostics.
>
>
> On Wed, Nov 25, 2020 at 1:15 PM Ross Bender  wrote:
>
>> I am having the same issue. I have an account and can log into 
>> https://accounts.jenkins.io/, but when I try logging into 
>> https://issues.jenkins.io/ I receive the error "Sorry, your username and 
>> password are incorrect - please try again."
>>
>> My username is l3ender. Can someone advise or assist? Thanks!
>>
>> On Friday, June 29, 2018 at 3:43:45 AM UTC-5 mark.ot...@gmail.com wrote:
>>
>>> I have a co-worker that's been unable to get his issues.jenkins-ci.org 
>>> Jira account working correctly.  Tried multiple browsers and still have the 
>>> same issue.  He's able to login to https://accounts.jenkins.io/ just 
>>> fine, but the same account doesn't work on issues.jenkins-ci.org
>>>
>>> Is there anyone he can contact for assistance?  I was unable to find any 
>>> contacts on the websites themselves.
>>>
>>> Thanks!
>>> Mark
>>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jenkinsci-use...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/38e55859-b849-415d-9120-f5c622d631b2n%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/b815ee90-74ea-4d6c-aad0-6959fc6b1789n%40googlegroups.com.


Need To change Email Receive display name in Email Notification

2020-11-26 Thread sanjay naik
Hi All.

I need to change Email Receiver display name in Jenkins. I want to set 
display name as different name like "DEV OPS." Currently mail is coming 
through my  email ID which I configured  in manage jenkins E-mail 
Notification. Please let me know the configuration to do this changes.

Thanks
Sanjay naik

-- 
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/7ffb8f61-89bd-466d-99bc-a5284db90e51n%40googlegroups.com.


RE: Java install for Windows agent?

2020-11-26 Thread Jérôme Godbout
You can inject the wanted java folder into the Node configuration into Jenkins 
master configuration panels:

Add environments variable into your node and set:

Name: JAVA_HOME
value: C:\Java\jdk1.8.0_261\

[cid:image001.png@01D6C410.D2280FD0]

Take Care the Windows version doesn’t like Java path with a space in it, a 
patch have been made put you might end up into a version that doesn’t support 
it, for ease, just install java into a path without space.
This prevent having to define the JAVA_HOME for the whole machine and ease the 
multiple java version on that machine. Jenkins will change it and can will use 
it to load the slave properly.



[cid:image002.jpg@01D6C410.D2280FD0]
une compagnie  [cid:image003.jpg@01D6C410.D2280FD0]
RAPPROCHEZ LA DISTANCE
Jérôme Godbout
Software / Firmware Lead
p: +1 (418) 800-1073 ext.:109
amotus.ca
statum-iot.com
[cid:image004.png@01D6C410.D2280FD0]
 [cid:image005.png@01D6C410.D2280FD0] 
  
[cid:image006.png@01D6C410.D2280FD0]   
[cid:image007.jpg@01D6C410.D2280FD0] 

COVID-19 : we are glad to inform you that 
Amotus are up and running with limited 
impact on our performance. We will keep you informed of any changes as they 
occur.
COVID-19 : nous sommes fiers d’informer nos collaborateurs que 
Amotus
 opèrent adéquatement et que l’impact sur notre productivité est minimisé. Nous 
vous tiendrons au courant de tout changement.

From: jenkinsci-users@googlegroups.com  On 
Behalf Of David Aldrich
Sent: November 26, 2020 2:03 PM
To: jenkinsci-users@googlegroups.com
Subject: Java install for Windows agent?

Hi

I have now partially succeeded in connecting to a Windows 10 agent from Jenkins 
via ssh.  The ssh part succeeds but the connection then fails with:

"Couldn't figure out the Java version of E:\jenkins/jdk/bin/java"

I don't know why it's choosing that path as I have not specified a Java path.

I know this is basic, but please suggest which JRE/JDK I should use and where I 
should install it.

Thanks
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_iehj-zYoqEKTFPH58CHT_dvwcDagxU6s3ERd4HnpcQKdgA%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/QB1PR01MB38449876E713D2B6766892DACDF90%40QB1PR01MB3844.CANPRD01.PROD.OUTLOOK.COM.


Java install for Windows agent?

2020-11-26 Thread David Aldrich
Hi

I have now partially succeeded in connecting to a Windows 10 agent from
Jenkins via ssh.  The ssh part succeeds but the connection then fails with:

"Couldn't figure out the Java version of E:\jenkins/jdk/bin/java"

I don't know why it's choosing that path as I have not specified a Java
path.

I know this is basic, but please suggest which JRE/JDK I should use and
where I should install it.

Thanks
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_iehj-zYoqEKTFPH58CHT_dvwcDagxU6s3ERd4HnpcQKdgA%40mail.gmail.com.


RE: Recommended way to setup a windows agent nowadays ?

2020-11-26 Thread Jérôme Godbout
You might need to manually connect for a first time to the host to add it or 
here is the script command line I do when I want to add a host to the known 
host file:

"ssh-keygen -R ${domain} -f \"${know_host_path}\""
"ssh-keygen -t rsa ${domain} >> \"${know_host_path}\""

know_host_path is normally ~/.ssh/ known_hosts


[cid:image001.jpg@01D6C3FB.FA99CF40]
une compagnie  [cid:image002.jpg@01D6C3FB.FA99CF40]
RAPPROCHEZ LA DISTANCE
Jérôme Godbout
Software / Firmware Lead
p: +1 (418) 800-1073 ext.:109
amotus.ca
statum-iot.com
[cid:image003.png@01D6C3FB.FA99CF40]
 [cid:image004.png@01D6C3FB.FA99CF40] 
  
[cid:image005.png@01D6C3FB.FA99CF40]   
[cid:image006.jpg@01D6C3FB.FA99CF40] 

COVID-19 : we are glad to inform you that 
Amotus are up and running with limited 
impact on our performance. We will keep you informed of any changes as they 
occur.
COVID-19 : nous sommes fiers d’informer nos collaborateurs que 
Amotus
 opèrent adéquatement et que l’impact sur notre productivité est minimisé. Nous 
vous tiendrons au courant de tout changement.

From: jenkinsci-users@googlegroups.com  On 
Behalf Of David Aldrich
Sent: November 26, 2020 12:51 PM
To: jenkinsci-users@googlegroups.com
Subject: Re: Recommended way to setup a windows agent nowadays ?

I would like to connect to Windows agents via SSH (currently using JNLP). I've 
installed OpenSSH client and server on the Windows machine, but not sure what 
to do next. In the agent configuration I've selected:

'Launch agents via ssh'

but when I launch I get:



[11/26/20 17:49:12] [SSH] Opening SSH connection to jenkins-win02:22.

Searching for jenkins-win02 in /var/lib/jenkins/.ssh/known_hosts

Searching for jenkins-win02:22 in /var/lib/jenkins/.ssh/known_hosts

[11/26/20 17:49:18] [SSH] WARNING: No entry currently exists in the Known Hosts 
file for this host. Connections will be denied until this new host and its 
associated key is added to the Known Hosts file.

Key exchange was not finished, connection is closed.



What should I do now? (Don't know how to add the host to 
/var/lib/jenkins/.ssh/known_hosts).



Best regards

David



On Mon, Nov 23, 2020 at 10:01 PM Francois Marot 
mailto:francois.ma...@gmail.com>> wrote:
Thanks Jerome and Slide. Seems like SSH on Windows is the new way to go (it 
feels so strange to say these words, "ssh on Windows"...) !
Thanks

Le lundi 23 novembre 2020 à 18:22:19 UTC+1, slide a écrit :
I would highly recommend switching to using SSH for Windows agents. The 
Win32-OpenSSH implementation from MS is supported from Windows 7 on (though 
Windows 7 is EOL). This makes it easier to maintain your agents because both 
the Windows and Linux agents are using the same mechanism. I've been meaning to 
write a blog post about this, but haven't had the time to. I switched all of my 
agents over to SSH last year and it has been working very well for me.

Regards,

Alex

On Mon, Nov 23, 2020 at 7:12 AM Jérôme Godbout 
mailto:godb...@amotus.ca>> wrote:
Hi,

if you are using Windows 10 for your slave, just enable the Windows Features 
for OpenSSH client and server. This would make it just like a Linux node. Make 
sure to put your Java install into a path without spaces (I think the fix is in 
the pipeline depending of the Jenkins version you have).
That make it easier as it do just like linux to log in and seem more safe to 
me, you just put the credentials into the Jenkins master for the ssh key.



[https://groups.google.com/group/jenkinsci-users/attach/591524a4b6d57/image001.jpg?part=0.1=1]
une compagnie  
[https://groups.google.com/group/jenkinsci-users/attach/591524a4b6d57/image002.jpg?part=0.2=1]
RAPPROCHEZ LA DISTANCE
Jérôme Godbout
Développeur Logiciel Sénior /
Senior Software Developer
p: +1 (418) 800-1073 ext.:109
amotus.ca
statum-iot.com
[https://groups.google.com/group/jenkinsci-users/attach/591524a4b6d57/image003.png?part=0.3=1]
 
[https://groups.google.com/group/jenkinsci-users/attach/591524a4b6d57/image004.png?part=0.4=1]
   
[https://groups.google.com/group/jenkinsci-users/attach/591524a4b6d57/image005.png?part=0.5=1]
   
[https://groups.google.com/group/jenkinsci-users/attach/591524a4b6d57/image006.jpg?part=0.6=1]
 
COVID-19 : we are glad to inform you that 
Amotus are up and running with limited 
impact on our performance. We will keep you informed of any changes as they 
occur.
COVID-19 : nous sommes fiers d’informer nos collaborateurs que Amotus opèrent 

Re: Recommended way to setup a windows agent nowadays ?

2020-11-26 Thread David Aldrich
I would like to connect to Windows agents via SSH (currently using JNLP).
I've installed OpenSSH client and server on the Windows machine, but not
sure what to do next. In the agent configuration I've selected:

'Launch agents via ssh'

but when I launch I get:

[11/26/20 17:49:12] [SSH] Opening SSH connection to jenkins-win02:22.

Searching for jenkins-win02 in /var/lib/jenkins/.ssh/known_hosts
Searching for jenkins-win02:22 in /var/lib/jenkins/.ssh/known_hosts
[11/26/20 17:49:18] [SSH] WARNING: No entry currently exists in the
Known Hosts file for this host. Connections will be denied until this
new host and its associated key is added to the Known Hosts file.
Key exchange was not finished, connection is closed.


What should I do now? (Don't know how to add the host to
/var/lib/jenkins/.ssh/known_hosts).

Best regards
David


On Mon, Nov 23, 2020 at 10:01 PM Francois Marot 
wrote:

> Thanks Jerome and Slide. Seems like SSH on Windows is the new way to go
> (it feels so strange to say these words, "ssh on Windows"...) !
> Thanks
>
> Le lundi 23 novembre 2020 à 18:22:19 UTC+1, slide a écrit :
>
>> I would highly recommend switching to using SSH for Windows agents. The
>> Win32-OpenSSH implementation from MS is supported from Windows 7 on (though
>> Windows 7 is EOL). This makes it easier to maintain your agents because
>> both the Windows and Linux agents are using the same mechanism. I've been
>> meaning to write a blog post about this, but haven't had the time to. I
>> switched all of my agents over to SSH last year and it has been working
>> very well for me.
>>
>> Regards,
>>
>> Alex
>>
>> On Mon, Nov 23, 2020 at 7:12 AM Jérôme Godbout  wrote:
>>
>>> Hi,
>>>
>>>
>>>
>>> if you are using Windows 10 for your slave, just enable the Windows
>>> Features for OpenSSH client and server. This would make it just like a
>>> Linux node. Make sure to put your Java install into a path without spaces
>>> (I think the fix is in the pipeline depending of the Jenkins version you
>>> have).
>>>
>>> That make it easier as it do just like linux to log in and seem more
>>> safe to me, you just put the credentials into the Jenkins master for the
>>> ssh key.
>>>
>>>
>>>
>>>
>>>
>>>
>>> une compagnie
>>>
>>> RAPPROCHEZ LA DISTANCE
>>>
>>> *Jérôme Godbout*
>>> Développeur Logiciel Sénior /
>>> Senior Software Developer
>>>
>>> *p:* +1 (418) 800-1073 ext.:109
>>>
>>> amotus.ca 
>>> statum-iot.com
>>>
>>> 
>>> 
>>> 
>>> 
>>>
>>> *COVID-19 : we are glad to inform you that Amotus
>>>  are up and running with limited impact
>>> on our performance. We will keep you informed of any changes as they occur.*
>>>
>>> *COVID-19 : nous sommes fiers d’informer nos collaborateurs que Amotus
>>> opèrent adéquatement et que l’impact sur notre productivité est minimisé.
>>> Nous vous tiendrons au courant de tout changement.*
>>>
>>>
>>>
>>> *From:* jenkins...@googlegroups.com  *On
>>> Behalf Of *Francois Marot
>>> *Sent:* November 23, 2020 6:24 AM
>>> *To:* Jenkins Users 
>>> *Subject:* Recommended way to setup a windows agent nowadays ?
>>>
>>>
>>>
>>>
>>>
>>> Hello Jenkins users,
>>>
>>>
>>>
>>> I'm in the process of upgrading my Jenkins installation. My Jenkins
>>> Linux master has been updated with the latest LTS but not the agents for
>>> the moment.
>>>
>>> I'm wondering how to update the Windows agents.
>>>
>>> For exemple: one outputs the following logs:
>>> > "WARNING: Remoting version is older than a minimum required one
>>> (3.14). Connection will not be rejected, but the compatibility is NOT
>>> guaranteed"
>>>
>>>
>>>
>>> I think it was configured with JavaWebStart and runs as a service but I
>>> also think that Java Web Start is more or less deprecated in Java 8+.
>>>
>>> On the other hand, configuring with the other way (WMI I think) leads to
>>> the following help message in Jenkins master:
>>> > " This launch method relies on DCOM and is often associated with subtle
>>> problems
>>> .
>>> Consider using *Launch agents using Java Web Start* instead "
>>>
>>>
>>>
>>> So my question is: what is the preffered way to setup a *windows* agent
>>> connected to a Linux master nowadays ? Isn't JNLP deprecated ? Is there an
>>> up to date definitive doc ?
>>>
>>>
>>>
>>> Thanks
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Jenkins Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to jenkinsci-use...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/jenkinsci-users/6dd94526-10df-4c77-b734-dda9d7308e54n%40googlegroups.com
>>> 

Re: Script to get Jenkins CentOS versions?

2020-11-26 Thread zil...@gmail.com
I read the page you linked, and the part regarding tags pagination. I infer 
from the page that I should be able to get a list of tags with the 
following.

https://hub.docker.com/v2/repositories/library/jenkins/tags/list

But if I paste the URL on my browser, I get

"txnid": "REPOSREQ-29168001-2818-486d-9af5-45c455b6155e",
  "message": "tag 'list' not found",
  "errinfo": {
"api_call_docker_id": "",
"api_call_name": "GetRepositoryTag",
"api_call_start": "2020-11-26T16:03:21.274810611Z",
"api_call_txnid": "REPOSREQ-29168001-2818-486d-9af5-45c455b6155e",
"namespace": "library",
"repository": "jenkins",
"tag": "list"
  }
}
On Thursday, November 26, 2020 at 10:10:01 AM UTC-5 zil...@gmail.com wrote:

> Yeah that makes sense. Thanks.
>
> Chris
>
> On Thursday, November 26, 2020 at 2:50:04 AM UTC-5 ice...@googlemail.com 
> wrote:
>
>> The problem  probably is that the centos image is not in the first  30 
>> results . You would need to get the next page(s) until you find a centos 
>> image.
>> See https://docs.docker.com/registry/spec/api/#tags for details. And 
>> remember that this endpoint has a limit on the numbe rof requests in a 
>> certain timeframe, so be sure to cache the result.
>> zil...@gmail.com schrieb am Mittwoch, 25. November 2020 um 16:35:57 
>> UTC+1:
>>
>>> That's what I essentially have already. Just need the correct 
>>> docker_image_tags_url value, and that post didn't tell me.
>>>
>>> On Wednesday, November 25, 2020 at 10:22:41 AM UTC-5 slide wrote:
>>>
 This might get you started: 
 https://gist.github.com/kizbitz/e59f95f7557b4bbb8bf2



 On Wed, Nov 25, 2020 at 7:58 AM zil...@gmail.com  
 wrote:

> I essentially want to get this list, but in a JSON format in an HTTP 
> response. But using this link as my docker_image_tags_url value for 
> my script doesn't work of course, that is, it gives a blank list.
>
>
> https://hub.docker.com/r/jenkins/jenkins/tags?page_size=20=1=last_updated
> .
>
> On Wednesday, November 25, 2020 at 9:40:16 AM UTC-5 zil...@gmail.com 
> wrote:
>
>> I want to use the Groovy script in this post 
>> 
>>  
>> to get Jenkins versions. So I do this, where I change the 
>> docker_image_tags_url to point to a Jenkins end point.
>>
>> // Import the JsonSlurper class to parse Dockerhub API response
>> import groovy.json.JsonSlurper
>> // Set the URL we want to read from, it is MySQL from official 
>> Library for this example, limited to 20 results only.
>> docker_image_tags_url = "
>> https://hub.docker.com/v2/repositories/library/jenkins/tags?page_size=30
>> "
>> try {
>> // Set requirements for the HTTP GET request, you can add 
>> Content-Type headers and so on...
>> def http_client = new URL(docker_image_tags_url).openConnection() 
>> as HttpURLConnection
>> http_client.setRequestMethod('GET')
>> // Run the HTTP request
>> http_client.connect()
>> // Prepare a variable where we save parsed JSON as a HashMap, 
>> it's good for our use case, as we just need the 'name' of each tag.
>> def dockerhub_response = [:]
>> // Check if we got HTTP 200, otherwise exit
>> if (http_client.responseCode == 200) {
>> dockerhub_response = new 
>> JsonSlurper().parseText(http_client.inputStream.getText('UTF-8'))
>> } else {
>> println("HTTP response error")
>> System.exit(0)
>> }
>> // Prepare a List to collect the tag names into
>> def image_tag_list = []
>> // Iterate the HashMap of all Tags and grab only their "names" 
>> into our List
>> dockerhub_response.results.each { tag_metadata ->
>> image_tag_list.add(tag_metadata.name)
>> }
>> // The returned value MUST be a Groovy type of List or a related 
>> type (inherited from List)
>> // It is necessary for the Active Choice plugin to display 
>> results in a combo-box
>> return image_tag_list.sort()
>> } catch (Exception e) {
>>  // handle exceptions like timeout, connection errors, etc.
>>  println(e)
>> }
>>
>> However, it just returns Alpine versions. How can I get the CentOS 
>> versions?
>>
>> 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-use...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/365c1f68-145b-499d-a808-bb8b96351386n%40googlegroups.com
>  
> 

Re: Script to get Jenkins CentOS versions?

2020-11-26 Thread zil...@gmail.com
Yeah that makes sense. Thanks.

Chris

On Thursday, November 26, 2020 at 2:50:04 AM UTC-5 ice...@googlemail.com 
wrote:

> The problem  probably is that the centos image is not in the first  30 
> results . You would need to get the next page(s) until you find a centos 
> image.
> See https://docs.docker.com/registry/spec/api/#tags for details. And 
> remember that this endpoint has a limit on the numbe rof requests in a 
> certain timeframe, so be sure to cache the result.
> zil...@gmail.com schrieb am Mittwoch, 25. November 2020 um 16:35:57 UTC+1:
>
>> That's what I essentially have already. Just need the correct 
>> docker_image_tags_url value, and that post didn't tell me.
>>
>> On Wednesday, November 25, 2020 at 10:22:41 AM UTC-5 slide wrote:
>>
>>> This might get you started: 
>>> https://gist.github.com/kizbitz/e59f95f7557b4bbb8bf2
>>>
>>>
>>>
>>> On Wed, Nov 25, 2020 at 7:58 AM zil...@gmail.com  
>>> wrote:
>>>
 I essentially want to get this list, but in a JSON format in an HTTP 
 response. But using this link as my docker_image_tags_url value for my 
 script doesn't work of course, that is, it gives a blank list.


 https://hub.docker.com/r/jenkins/jenkins/tags?page_size=20=1=last_updated
 .

 On Wednesday, November 25, 2020 at 9:40:16 AM UTC-5 zil...@gmail.com 
 wrote:

> I want to use the Groovy script in this post 
> 
>  
> to get Jenkins versions. So I do this, where I change the 
> docker_image_tags_url to point to a Jenkins end point.
>
> // Import the JsonSlurper class to parse Dockerhub API response
> import groovy.json.JsonSlurper
> // Set the URL we want to read from, it is MySQL from official Library 
> for this example, limited to 20 results only.
> docker_image_tags_url = "
> https://hub.docker.com/v2/repositories/library/jenkins/tags?page_size=30
> "
> try {
> // Set requirements for the HTTP GET request, you can add 
> Content-Type headers and so on...
> def http_client = new URL(docker_image_tags_url).openConnection() 
> as HttpURLConnection
> http_client.setRequestMethod('GET')
> // Run the HTTP request
> http_client.connect()
> // Prepare a variable where we save parsed JSON as a HashMap, it's 
> good for our use case, as we just need the 'name' of each tag.
> def dockerhub_response = [:]
> // Check if we got HTTP 200, otherwise exit
> if (http_client.responseCode == 200) {
> dockerhub_response = new 
> JsonSlurper().parseText(http_client.inputStream.getText('UTF-8'))
> } else {
> println("HTTP response error")
> System.exit(0)
> }
> // Prepare a List to collect the tag names into
> def image_tag_list = []
> // Iterate the HashMap of all Tags and grab only their "names" 
> into our List
> dockerhub_response.results.each { tag_metadata ->
> image_tag_list.add(tag_metadata.name)
> }
> // The returned value MUST be a Groovy type of List or a related 
> type (inherited from List)
> // It is necessary for the Active Choice plugin to display results 
> in a combo-box
> return image_tag_list.sort()
> } catch (Exception e) {
>  // handle exceptions like timeout, connection errors, etc.
>  println(e)
> }
>
> However, it just returns Alpine versions. How can I get the CentOS 
> versions?
>
> 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-use...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/jenkinsci-users/365c1f68-145b-499d-a808-bb8b96351386n%40googlegroups.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/9b0c3b3c-0fc1-4da4-99ca-5ab657d4d9d4n%40googlegroups.com.


Re: How to change defaultValue of input in case of declarative pipeline script?

2020-11-26 Thread Victor Martinez
You can try with environment variables or the Field annotation as shown 
below

import groovy.transform.Field
@Field def value1 = 'initial value'


On Wednesday, 25 November 2020 at 19:00:24 UTC Kiyoshi Ohgishi wrote:

> I want to change from scripted pipeline script to declarative pipeline 
> script.
> But I have one problem defaultValue of input cannot change value in case 
> of declarative pipeline script.
>
> Below is the scripted pipeline script I want to change from.
> 
> def value1 = 'initial value'
> node {
> label 'master'
> stage('prediction') {
> value1 = sh(script: 'echo predicted value', returnStdout: 
> true).trim()
> }
> }
> def setting
> stage('setting') {
> setting = input(parameters: [string(name: 'value2', defaultValue: 
> value1)])
> }
> stage('execution') {
> build(job: 'job', parameters: [string(name: 'value2', value: setting)])
> }
> 
> The prompted value in input step is "predicted value" as I exected.
>
> Below is the failing declarative pipeline script I tried.
> 
> def value1 = 'initial value'
> pipeline {
> agent none
> stages {
> stage('prediction') {
> agent {
> label 'master'
> }
> steps {
> script {
> value1 = sh(script: 'echo predicted value', 
> returnStdout: true).trim()
> }
> }
> }
> stage('execution') {
> input {
> message 'setting'
> parameters {
> string(name: 'value2', defaultValue: value1)
> }
> }
> steps {
> build(job: 'job', parameters: [string(name: 'value2', 
> value: value2)])
> }
> }
> }
> }
> 
> The prompted value is "initial value" as I don't expect.
>
> What I want to make with a script is the following three steps.
> 1. get "predicted value" using shell script in the git repository.
> 2. prompt "predicted value" and decide value.
> 3. run the job with decided value.
>
> How to change defaultValue of input in case of declarative pipeline script?
>
> Kiyoshi Ohgishi
>

-- 
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/fde53fb1-ebf7-46a0-acc2-aafa0b11cf70n%40googlegroups.com.