Thanks! You are a genius! Most helpful

On Thursday, July 14, 2016 at 6:50:47 PM UTC+1, Ashwanth Kumar wrote:
>
> GoCD's Custom task doesn't run inside a shell unfortunately. We also do 
> something like this in our pipelines
> <exec command="bash">
>   <arg>-c</arg>
>   <arg>docker commit 8d from/remote-animal:$(git rev-parse HEAD | cut 
> -c1-10)</arg>
>   <runif status="passed" />
> </exec>
>
>
>
> On Thu, Jul 14, 2016 at 11:13 PM, Hugh Acland <[email protected] 
> <javascript:>> wrote:
>
>> Hi
>>
>> I want to commit a running docker image as a task and use the git head 
>> hash for the tag name. In bash I would do this:
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> docker commit 8d from/remote-animal:$(git rev-parse HEAD | cut -c1-10)
>>
>> However when I use this command in Go-Cd task it does not like it. How 
>> can I achieve this? I guess one way is to have a script on the agent and 
>> the call this script, but then this kinda means having to have gotten the 
>> script onto the agent in the first place. I thought the whole point of 
>> agents is that they are ephemeral? 
>>
>> thanks
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "go-cd" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
>
> Ashwanth Kumar / ashwanthkumar.in
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to