Re: passing variable to bash script in a jenkins pipeline job

2021-09-01 Thread lawrence wang
It's super late but I run into this scenario yesterday.
So below code works, it's passing a boolean variable to shell script

steps {
script{
def variable = true
sh """
./command.sh ${variable}
"""
}
}


在2020年3月12日星期四 UTC-7 上午7:11:04 写道:

> There is an extra space between your (.) and your opt/setup.sh.
>
> If the variabel come from Jenkins pipeline script, you need double quote 
> (“) to get evaluate, single quote (‘) won’t. You should also pass the value 
> as a string and escape it for your argument something like this:
>
>  
>
> def lib_arch='linux-ubuntu-14.04-x86_64-gcc4.8.4'
>
> sh(script: "./opt/setup.sh \”${lib_arch}\”");
>
>  
>
> That should normally work just fine.
>
>  
>
>  
>
> *From:* jenkins...@googlegroups.com  *On 
> Behalf Of *Siddhesh Malpani
> *Sent:* March 12, 2020 9:42 AM
> *To:* Jenkins Users 
> *Subject:* Re: passing variable to bash script in a jenkins pipeline job
>
>  
>
> Nabil,
>
>  
>
> You may try this in your shell script:
>
>  
>
> #!/bin/bash
>
> export ARCH=$1
>
> echo "architecture = " $ARCH
>
>  
>
> Braces around the 'ARCH' variable is not required.
>
> Although it's too late to answer, it might help someone else.
>
>  
>
>
>
> On Sunday, 30 October 2016 02:42:18 UTC+5:30, Nabil Ghodbane wrote:
>
> dear experts,
>
>  
>
> I have a Jenkins pipeline job in which I configure my environment with a 
> bash script named setup.sh which looks like:
>
> #!/bin/bash
>
> export ARCH=$1
>
> echo "architecture = " ${ARCH}
>
>  
>
> In the Jenkins pipeline script, Icall the setup.sh script with:
>
>
> def lib_arch='linux-ubuntu-14.04-x86_64-gcc4.8.4'
>
> sh ". /opt/setup.sh ${lib_arch}"
>
>  
>
> unfortunately it seems that *NO* variable is passed to the setup.sh 
> script, and the echo ${ARCH} return an empty string! 
>
> In addition, I tried to instead do: 
>
> sh "source /opt/setup.sh ${lib_arch}" 
>
> but this fails as well with the "source not found" message. I also tried 
> changing the first line of my script to
>
> #!/bin/sh
>
> but it does not help. 
>
> So how can I pass a parameter to my bash script in a Jenkins pipeline 
> script? 
>
> thanks for your help.
>
> -- 
>
> 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/2f3a7f54-d7bf-42ac-bc3e-fc967bc76779%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/5186e408-042d-4b2b-8c9e-e23fb122ed21n%40googlegroups.com.


Re: SAML plugin 2.0.8

2021-09-01 Thread Ivan Fernandez Calvo
I just created the 3 new releases.

El martes, 31 de agosto de 2021 a las 19:39:54 UTC+2, alan.l...@gmail.com 
escribió:

> Sounds good, and the security warning did clear.  Thanks for the rapid 
> response!
> -Alan
>
> On Tuesday, August 31, 2021 at 10:53:27 AM UTC-6 db...@cloudbees.com 
> wrote:
>
>> On Tue, Aug 31, 2021 at 5:29 PM Alan Sparks  
>> wrote:
>>
>>> I went to upgrade this, and the after-installed one shows the same 
>>> security notice in my Jenkins 2.289.3 master.  The GitHub Releases shows 
>>> 2.0.7 as the current.  Was the 2.0.8 release pulled back?
>>>
>>> -Alan
>>>
>>
>> The release has not been pulled. Two separate issues here:
>>
>> - Release drafter / GH releases do not play well with how we prepare and 
>> publish security updates. A maintainer will need to manually create the 
>> release on GH.
>> - I published wrong security warnings at first and fixed them ~15 minutes 
>> ago. If 2.0.8 is installed, they should disappear once you refresh 
>> update center metadata.
>>
>>

-- 
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/d13b9a6e-faac-4462-907e-05a5c2048bd9n%40googlegroups.com.