Hello Prakash,

What do you see in the console output beyond the error message? I believe 
the raw command should get printed to console which would make 
troubleshooting easier.

Here is an example from the raw output of one of our Pipelines that uses 
Custom Commands:

!!|10:43:38.980 [go] Task: cmd /c 
""C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" 
"tfs\path\to\project.proj" "/t:Release\""


I suspect that the issue you are having is that GoCD tries to expand the 
environment variables used in your command before they have been defined 
but, again, you should be able to see that from the console output.

If the console output looks right, including all of the environment 
variables, try running it from the command line on the agent to see what 
the error message is there.

Hope this helps,
Jason


On Monday, 10 August 2020 09:18:09 UTC-4, Prakash Tirumalareddy wrote:
>
> Hello Helge
>
> We tried using the curl command:
>
> 6-DeploySIT1: 
>     fetch_materials: no
>     clean_workspace: yes
>     approval: manual
>     environment_variables:
>         app_environment: nonprod
>         verify_repo: verify-repo
>     jobs:
>         deploy:
>         tasks: 
>         - exec:
>             command: /usr/bin/curl -L -k -v -u <username>:<password> -X 
> GET "
> https://artifactory.xys.com/service/rest/v1/search/assets/download?group=/<artefact_name>/master/${GO_PIPELINE_LABEL}&name=<artefact_name>/master/${GO_PIPELINE_LABEL}/${GO_REVISION_MYGIT}.zip"
>  
> -o "${GO_REVISION_MYGIT}.zip" && unzip -o "${GO_REVISION_MYGIT}.zip" -d .'
>         - exec: 
>             arguments:
>             - deploy
>             command: make
>
> Error is:
> Check your command whether it can be executed on your agent.
>
> Regards
> Prakash
>
> On Saturday, 8 August 2020 at 00:06:00 UTC+10 bewal...@gmail.com wrote:
>
>> Hello Prakash,
>>
>> for an example see here: 
>> https://github.com/tomzo/gocd-yaml-config-plugin#example
>>
>> tasks: # ordered list of tasks to execute
>> - exec: # indicates type of task
>> command: make
>> arguments:
>> - "VERBOSE=true"
>>
>> You can specify your curl command here instead of the "make" call. The 
>> curl call is specific to your artifactory and the repository type you use 
>> -- so it's difficult for me to give you a neaningfull example.
>>
>> Regards,
>> Helge
>>
>>

-- 
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 go-cd+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/go-cd/ba64b612-6caf-4276-aecf-e1b5cf97cd26o%40googlegroups.com.

Reply via email to