Setting Anthill property in a shell script

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Setting Anthill property in a shell script

rgebbie

I have a job to run a shell script that finds a value that I need in the
next job in the workflow.  They have to be separate jobs because they run
on different agents.  I though of setting a workflow property and changing
it in the shell script.  I tried the following:

${bsh:PropertyLookup.set("portal_server", "${portalserver}")}

where "portal_server" is the Anthill workflow property and "portalserver"
is the shell variable that has the value.

I get
                                                                                                                                     
                                                                                                                                     
                                                                                                                                     
                                                                                                                                     
 ERROR - BeanShell script error: Sourced file: inline evaluation of: ``import                                                        
 com.urbancode.anthill3.runtime.scripting.helpers.*;import com.urbancode.a . . . '' Token Parsing Error: Lexical error at line 1,    
 column 172. Encountered: <EOF> after : "\"${portalserver;": <at unknown location>                                                    
                                                                                                                                     
                                                                                                                                     

so there is something wrong with my syntax.  It also happens with setValue
or SetValueFor (not sure what the difference is between these)

Is this something that should work, or is there a better way to do this?

Thanks.
______________________________________________________
Ray Gebbie | Senior Release Engineer | macys.com
685 Market Str, 8th Floor | San Francisco, CA 94105 | (:415.422.1662  tie
line 8-118-002-1662

_______________________________________________
Anthill-pro mailing list
[hidden email]
http://lists.urbancode.com/mailman/listinfo/anthill-pro
Reply | Threaded
Open this post in threaded view
|

Re: Setting Anthill property in a shell script

Eric Minick-2
Ray,

I just got this email, were you able to figure it out?

The beanshell part runs server side before the shell script executes, so it
can't reference the shell variable. You need to either have a pure
beanshell step after the execution that parses the log and sets a property,
or use the ah3tool command line utility to set the property value as part
of your shell script.

Eric Minick

mobile: (303) 619-7785
blog: blogs.urbancode.com
twitter: @EricMinick / @Urbancode
[hidden email]

*UrbanCode's tools help Dev & Ops collaborate*



On Wed, Nov 28, 2012 at 4:13 PM, Ray Gebbie <[hidden email]> wrote:

>
> I have a job to run a shell script that finds a value that I need in the
> next job in the workflow.  They have to be separate jobs because they run
> on different agents.  I though of setting a workflow property and changing
> it in the shell script.  I tried the following:
>
> ${bsh:PropertyLookup.set("portal_server", "${portalserver}")}
>
> where "portal_server" is the Anthill workflow property and "portalserver"
> is the shell variable that has the value.
>
> I get
>
>
>
>
>  ERROR - BeanShell script error: Sourced file: inline evaluation of:
> ``import
>  com.urbancode.anthill3.runtime.scripting.helpers.*;import com.urbancode.a
> . . . '' Token Parsing Error: Lexical error at line 1,
>  column 172. Encountered: <EOF> after : "\"${portalserver;": <at unknown
> location>
>
>
>
> so there is something wrong with my syntax.  It also happens with setValue
> or SetValueFor (not sure what the difference is between these)
>
> Is this something that should work, or is there a better way to do this?
>
> Thanks.
> ______________________________________________________
> Ray Gebbie | Senior Release Engineer | macys.com
> 685 Market Str, 8th Floor | San Francisco, CA 94105 | (:415.422.1662  tie
> line 8-118-002-1662
>
> _______________________________________________
> Anthill-pro mailing list
> [hidden email]
> http://lists.urbancode.com/mailman/listinfo/anthill-pro
>
_______________________________________________
Anthill-pro mailing list
[hidden email]
http://lists.urbancode.com/mailman/listinfo/anthill-pro
Reply | Threaded
Open this post in threaded view
|

Re: Setting Anthill property in a shell script

Jon Neel
This issue was taken care of through Supportal.  The mailing list was
temporarily down, but the issue has been resolved.  Thanks to everyone who
reported the outage for being so patient!

Thanks,
Jon Neel
Support Developer
Urbancode, Inc.
Direct Line: (216) 539-0141
http://support.urbancode.com
http://www.urbancode.com



On Thu, Dec 6, 2012 at 9:25 AM, Eric Minick <[hidden email]> wrote:

> Ray,
>
> I just got this email, were you able to figure it out?
>
> The beanshell part runs server side before the shell script executes, so it
> can't reference the shell variable. You need to either have a pure
> beanshell step after the execution that parses the log and sets a property,
> or use the ah3tool command line utility to set the property value as part
> of your shell script.
>
> Eric Minick
>
> mobile: (303) 619-7785
> blog: blogs.urbancode.com
> twitter: @EricMinick / @Urbancode
> [hidden email]
>
> *UrbanCode's tools help Dev & Ops collaborate*
>
>
>
> On Wed, Nov 28, 2012 at 4:13 PM, Ray Gebbie <[hidden email]> wrote:
>
> >
> > I have a job to run a shell script that finds a value that I need in the
> > next job in the workflow.  They have to be separate jobs because they run
> > on different agents.  I though of setting a workflow property and
> changing
> > it in the shell script.  I tried the following:
> >
> > ${bsh:PropertyLookup.set("portal_server", "${portalserver}")}
> >
> > where "portal_server" is the Anthill workflow property and "portalserver"
> > is the shell variable that has the value.
> >
> > I get
> >
> >
> >
> >
> >  ERROR - BeanShell script error: Sourced file: inline evaluation of:
> > ``import
> >  com.urbancode.anthill3.runtime.scripting.helpers.*;import
> com.urbancode.a
> > . . . '' Token Parsing Error: Lexical error at line 1,
> >  column 172. Encountered: <EOF> after : "\"${portalserver;": <at unknown
> > location>
> >
> >
> >
> > so there is something wrong with my syntax.  It also happens with
> setValue
> > or SetValueFor (not sure what the difference is between these)
> >
> > Is this something that should work, or is there a better way to do this?
> >
> > Thanks.
> > ______________________________________________________
> > Ray Gebbie | Senior Release Engineer | macys.com
> > 685 Market Str, 8th Floor | San Francisco, CA 94105 | (:415.422.1662 tie
> > line 8-118-002-1662
> >
> > _______________________________________________
> > Anthill-pro mailing list
> > [hidden email]
> > http://lists.urbancode.com/mailman/listinfo/anthill-pro
> >
> _______________________________________________
> Anthill-pro mailing list
> [hidden email]
> http://lists.urbancode.com/mailman/listinfo/anthill-pro
>
_______________________________________________
Anthill-pro mailing list
[hidden email]
http://lists.urbancode.com/mailman/listinfo/anthill-pro