Advanced Project Options -> Display Name with a variable in it ?!?

2019-05-27 Thread b o b i
Advanced Project Options -> Display Name

Is there a way to introduce a variable in the display name, so that is 
displayed depending on this variable ?


-- 
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/90031264-e0a5-4475-a303-b72cf5b5d1b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


editable parameters, dependent on previous parameter choices?

2019-05-27 Thread b o b i
We have the active choice plug-in to create dynamically parameter choices 
dependent on previous parameter choices. These choices are not editable.

We have the extensible choice plug-in to create editable parameter. But you 
cannot create depended choices on previous parameters.

So, how you do combine both worlds?

-- 
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/31229a90-7b72-43fe-8fdb-4a6a43a11a21%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Credentials "secret text" -> bash -> expect ?

2019-05-16 Thread b o b i
Please disregard the question, and sorry for bothering.

It truned out, it is not a jenkins problem, rather a problem with timing of 
the expect script

so putting sleep 2 before and after send solved the problem

On Thursday, May 16, 2019 at 7:19:02 AM UTC+2, b o b i wrote:
>
> Do you mean ?
> send \"${varSecretText}\n\" 
>
> -->  it has {}
>
> or do you mean
>
> puts "SECRET $varSecretText"
>
> --> it worked 
>
> SECRET 
>
> On Thursday, May 16, 2019 at 6:19:57 AM UTC+2, Mark Waite wrote:
>>
>> I'm accustomed to seeing variable references in groovy strings as 
>> "${variablename}", while it seemed in your example you were referencing it 
>> as "$variablename".  Is that an intentional difference, or accidental?
>>
>> On Wed, May 15, 2019 at 9:14 PM b o b i  wrote:
>>
>>> It is a single line secret, but it wont work :|
>>>
>>> On Wednesday, May 15, 2019 at 7:31:27 PM UTC+2, Ivan Fernandez Calvo 
>>> wrote:
>>>>
>>>> If your secret is multiline, the secret text does not work as expected, 
>>>> you could store the one line base64 value of your secret and decode it 
>>>> before send it, it could work
>>>
>>> -- 
>>> 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/85dc81a4-6206-4286-9578-42f1bec2fcfb%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/jenkinsci-users/85dc81a4-6206-4286-9578-42f1bec2fcfb%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> -- 
>> Thanks!
>> Mark Waite
>>
>

-- 
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/9648b63e-d51c-4459-ab10-c8c74e446339%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Credentials "secret text" -> bash -> expect ?

2019-05-15 Thread b o b i
Do you mean ?
send \"${varSecretText}\n\" 

-->  it has {}

or do you mean

puts "SECRET $varSecretText"

--> it worked 

SECRET 

On Thursday, May 16, 2019 at 6:19:57 AM UTC+2, Mark Waite wrote:
>
> I'm accustomed to seeing variable references in groovy strings as 
> "${variablename}", while it seemed in your example you were referencing it 
> as "$variablename".  Is that an intentional difference, or accidental?
>
> On Wed, May 15, 2019 at 9:14 PM b o b i > 
> wrote:
>
>> It is a single line secret, but it wont work :|
>>
>> On Wednesday, May 15, 2019 at 7:31:27 PM UTC+2, Ivan Fernandez Calvo 
>> wrote:
>>>
>>> If your secret is multiline, the secret text does not work as expected, 
>>> you could store the one line base64 value of your secret and decode it 
>>> before send it, it could work
>>
>> -- 
>> 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/85dc81a4-6206-4286-9578-42f1bec2fcfb%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/85dc81a4-6206-4286-9578-42f1bec2fcfb%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> -- 
> Thanks!
> Mark Waite
>

-- 
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/927f796d-71ea-421c-b4e0-d7f541b6eaed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Credentials "secret text" -> bash -> expect ?

2019-05-15 Thread b o b i
It is a single line secret, but it wont work :|

On Wednesday, May 15, 2019 at 7:31:27 PM UTC+2, Ivan Fernandez Calvo wrote:
>
> If your secret is multiline, the secret text does not work as expected, 
> you could store the one line base64 value of your secret and decode it 
> before send it, it could work

-- 
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/85dc81a4-6206-4286-9578-42f1bec2fcfb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Credentials "secret text" -> bash -> expect ?

2019-05-15 Thread b o b i
Im using expect to inject a password into an openssl command called from a 
make file (and spawned by expect).

However, Im not able to pass the secret. Any suggestions on why this is 
happening?

makeFileWith.mk contains an openssl command requiring a secret

stage ('Deploy') {
   withCredentials([string(credentialsId: 'secretText', variable: 
'varSecretText')]) {

sh """#!/usr/bin/expect

puts "SECRET $varSecretText"

exp_internal 1 
spawn make -f makeFileWith.mk
 
expect "Enter Password:" {
   send \"${varSecretText}\n\"
}
"""
   }
}

Output is

SECRET 
...

expect: does "" (spawn_id exp3) match glob pattern "Enter Password:"? no

Is this Jenkins Bug or do I need something more / another approach ?



-- 
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/12a74c78-9731-4980-b24d-ecd2c66b7b18%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Active Choices Reactive Reference Parameter -> use the parameter in a bash ?

2019-05-13 Thread b o b i
In 
Scenario 2: Pass a dynamically created value that is *hidden* (can't be 
edited by the user)

return ""


*ReactiveRefParam* is the Reactive Reference value that will be passed to 
the build


in my bash script the variable is *ReactiveRefParam* empty

How do I use it in a bash script?

-- 
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/7bceb08b-03d9-495c-bc0a-64fed19f431c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: scripted pipeline: bash: date -> MissingPropertyException: No such property: ... for class: groovy.lang.Binding

2019-05-02 Thread b o b i
On Thursday, May 2, 2019 at 2:35:58 PM UTC+2, b o b i wrote:
>
> Could you explain me why "\$" worked, i.e. where it is documented? (I lost 
> pretty much time with such "nonsense"). (a bash variable should be expanded 
> inside a bash script as $var or "${var}" etc., i.e. why in a bash, the vars 
> are not bashingly treated?)
>

The answer is probably the following:

Triple-double-quoted strings behave like double-quoted strings, with the 
> addition that they are multiline
>
> Double-quoted strings are plain java.lang.String if there’s no 
> interpolated expression, but are groovy.lang.GString instances if 
> interpolation is present.. If the GString is ever passed to a method taking 
> a String, the expression value inside the placeholder is evaluated to its 
> string representation (by calling toString() on that expression) and the 
> resulting String is passed to the method... If you need to escape the $ 
> or ${} placeholders in a GString so they appear as is without 
> interpolation, you just need to use a \ backslash character to escape the 
> dollar sign: 
>

> Because the template string itself will be parsed by Groovy before it is 
> passed to the templating framework 
>

-- 
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/246dda31-10a1-4a58-b31f-97f43a0f319f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: scripted pipeline: bash: date -> MissingPropertyException: No such property: ... for class: groovy.lang.Binding

2019-05-02 Thread b o b i
Thank you, that work.

Could you explain me why "\$" worked, i.e. where it is documented? (I lost 
pretty much time with such "nonsense"). (a bash variable should be expanded 
inside a bash script as $var or "${var}" etc., i.e. why in a bash, the vars 
are not bashingly treated?)

On Thursday, May 2, 2019 at 2:27:40 PM UTC+2, Daniel Butler wrote:
>
> Replace ${mytime} with \$mytime
>
> The mytime variable you've created is a bash one.
>
> Regards 
> Daniel 
>
>
> On Thu, 2 May 2019, 1:16 pm b o b i, > 
> wrote:
>
>> Jenkins 2.174, in a scripted pipeline the following
>>
>> sh """#!/bin/bash
>>echo "TTT"
>>mytime="`date '+%Y_%m_%d__%H_%M_%S'`"
>>echo ${mytime}
>> """
>>
>> produces
>>
>> groovy.lang.MissingPropertyException: No such property: mytime for class: 
>> groovy.lang.Binding
>>  at groovy.lang.Binding.getVariable(Binding.java:63)
>>  at 
>> org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onGetProperty(SandboxInterceptor.java:270)
>>  at org.kohsuke.groovy.sandbox.impl.Checker$6.call(Checker.java:289)
>>  at 
>> org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:293)
>> ...
>>
>> How can I have current time expanded as a string without the above error?
>>
>> -- 
>> 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/3b826017-27f1-45c9-925c-f396b13bcea9%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/3b826017-27f1-45c9-925c-f396b13bcea9%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/1c513de0-9269-44a3-8197-1a78d6eccf95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


scripted pipeline: bash: date -> MissingPropertyException: No such property: ... for class: groovy.lang.Binding

2019-05-02 Thread b o b i
Jenkins 2.174, in a scripted pipeline the following

sh """#!/bin/bash
   echo "TTT"
   mytime="`date '+%Y_%m_%d__%H_%M_%S'`"
   echo ${mytime}
"""

produces

groovy.lang.MissingPropertyException: No such property: mytime for class: 
groovy.lang.Binding
at groovy.lang.Binding.getVariable(Binding.java:63)
at 
org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onGetProperty(SandboxInterceptor.java:270)
at org.kohsuke.groovy.sandbox.impl.Checker$6.call(Checker.java:289)
at 
org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:293)
...

How can I have current time expanded as a string without the above error?

-- 
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/3b826017-27f1-45c9-925c-f396b13bcea9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Env variable in pipeline resolves to null

2019-04-25 Thread b o b i
PS 
  sh('printenv | sort')
is also not showing any env var set ... :|

-- 
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/daf69d41-066e-44c6-ab9e-5e26a0b0d3af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Env variable in pipeline resolves to null

2019-04-25 Thread b o b i
 environment {
   TEST_PATH = "path/to/any"
}

// scriptive pipeline
withEnv(["TEST_PATH1=path/to/any"]) {
  echo env.TEST_PATH1  // path/to/any
}

echo "OOO=${env.TEST_PATH}";  // null
echo "UUU=${env.TEST_PATH1}";  // null


How could I make an environment varialbe known to the pipeline (tha above 
didnt work)?

-- 
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/f373bc34-f02f-41b0-95c9-d058dcf1d50f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins hints for large git repos

2019-04-18 Thread b o b i

Jenkins scripted pipeline
Git repo 2.6G

Each job wants to git clone the latest commit

#Jobs x GitRepo = many GB disk space.

Do you have any hints of how to reduce the disk space usage, i.e. any hints 
how to deal with large git repors by many jobs ?

-- 
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/1043d9ff-586e-4fd0-8791-0d7dd2e401aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


shell inside a groovy script doesnt resolve variables ?

2019-04-16 Thread b o b i
I cannot make the executed shell to resolve a predefined variable in my 
jenkins script.. I tried various syntax approaches w/o succcess. ..

Anybody could give me a hand?


String workspace
String addOn = "Path/To/Cmake.cmake"

node ('slave01') {
workspace = pwd()
String addOnAbsPath = "${workspace}/$toolchainCmake"

stage ('Build') {
   
// for some reason is not recognize, thats why
sh "echo ${addOnAbsPath}"
sh '''
echo Path: '$addOnAbsPath'
   '''
sh '''#!/bin/bash 
   echo ${addOnAbsPath}
   cmake ... -DADD_ON=$addOnAbsPath ...
'''
}
}

-- 
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/01535995-02a9-46ce-8388-ca01695dbbb9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.