git pull worked for me  by adding git has command and pull as argument
mkdir reports 2>nul
IF DEFINED APP_IR_GENERATOR (%APP_IR_GENERATOR%)
how about this if they have spaces,
how we have to handle them custom command
Thanks for your replies .


On Friday, November 10, 2023 at 11:03:59 AM UTC-6 [email protected] wrote:

> Btw, why exactly are you pulling a git repo? Have you considered adding it 
> as a material to the pipeline?
>
> — Sriram
>
> On Sat, 11 Nov 2023 at 12:24 AM, Sriram Narayanan <[email protected]> 
> wrote:
>
>> Move that “pull” into an <arg> like here : 
>>
>> https://docs.gocd.org/current/configuration/configuration_reference.html#exec
>>
>> If you edit this custom command in the UI, then keep only the git in the 
>> command, and move the pull into the arguments text area below.
>>
>> — Sriram
>>
>> On Fri, 10 Nov 2023 at 9:38 PM, Sri Sai Sruthi JAGANNADDAM <
>> [email protected]> wrote:
>>
>>> Here is the screenshot 
>>>
>>> git pull & mkdir reports 2&gt;nul & IF DEFINED APP_IR_GENERATOR 
>>> (%APP_IR_GENERATOR%)" are failing as they are not able to recognize git & 
>>> mkdir, its not a agent issue because the same agent when attached to the 
>>> gocd server running on 21.2 version it works fine but not working on 23.3 
>>> version, as you mentioned custom commands does not allow spaces in the new 
>>> gocd version, what is best way to handle this, thanks for your inputs
>>> backend code:
>>>
>>> <tasks>
>>>               <exec command="git pull">
>>>                 <runif status="passed" />
>>>               </exec>
>>>               <fetchartifact artifactOrigin="gocd" srcdir="test" 
>>> pipeline="" stage="Build" job="defaultJob">
>>>                 <runif status="passed" />
>>>               </fetchartifact>
>>>               <exec command="%DEPLOY_SCRIPT%">
>>>                 <runif status="passed" />
>>>               </exec>
>>>               <exec command="mkdir reports 2&gt;nul">
>>>                 <runif status="passed" />
>>>               </exec>
>>>               <exec command="IF DEFINED APP_IR_GENERATOR 
>>> (%APP_IR_GENERATOR%)">
>>>                 <runif status="passed" />
>>>               </exec>
>>>               <task>
>>>
>>> [image: image.png]
>>> On Friday, November 10, 2023 at 12:15:03 AM UTC-6 Chad Wilson wrote:
>>>
>>>> It's possibly a side effect of fixing issues with spaces in windows 
>>>> commands in GoCD 22.2.0:  https://www.gocd.org/releases.html#22-2-0
>>>>
>>>> It may be that some of your command tasks were *technically* 
>>>> incorrectly configured on earlier versions but worked as a side effect of 
>>>> these bugs in GoCD, and GoCD is now stricter. Or it may be that there is a 
>>>> regression in some circumstances.
>>>>
>>>> Can you please 
>>>> - share a screenshot of the UI pipeline task configuration for the 'git 
>>>> pull' example above?
>>>> - find that specific task's XML definition inside admin > config XML 
>>>> and share the XML fragment for the task or job (you can redact any 
>>>> sensitive text, I am mainly interested in the 'shape' of the XML)
>>>>
>>>> If my suspicion is correct, a workaround will certainly be possible to 
>>>> correct the task config, but as there are a couple of historical ways 
>>>> tasks 
>>>> could be configured, I'd like to understand what your config looked like 
>>>> before you workaround the problem so I can see if this is avoidable.
>>>>
>>>> -Chad
>>>>
>>>>
>>>> On Fri, 10 Nov 2023, 15:55 Sri Sai Sruthi JAGANNADDAM, <
>>>> [email protected]> wrote:
>>>>
>>>>>  Could any one please help with this - I am writing to report a 
>>>>> challenge we’ve encountered following our recent upgrade from GOCD 
>>>>> version 
>>>>> 21.2 to version 23.3. During our testing phase, we observed that certain 
>>>>> pipelines, which execute on Windows agents, are failing with the 
>>>>> following 
>>>>> error when run through "Custom Command"
>>>>>  
>>>>>  [go] Task: git pull
>>>>> Took: 0.179s
>>>>> Exited: 1
>>>>> '"git pull"' is not recognized as an internal or external command,
>>>>> operable program or batch file.
>>>>>
>>>>>
>>>>> This issue seems to be isolated to the Windows agents as the pipelines 
>>>>> running on Linux agents are performing without any issues. 
>>>>> The same pipelines were functioning correctly on the previous version 
>>>>> of the GOCD server, 
>>>>> which suggests a potential configuration or environment variable path 
>>>>> discrepancy in the new version.
>>>>>
>>>>>
>>>>> ------------------------------
>>>>> The information in this email and any attachments are intended solely 
>>>>> for the recipient(s) to whom it is addressed, and may be confidential 
>>>>> and/or privileged. Any unauthorized distribution or copying of this 
>>>>> transmittal or its attachments is prohibited. If you are not a named 
>>>>> recipient or have received this email in error: (i) you should not read, 
>>>>> disclose, or copy it, (ii) please notify the sender of your receipt by 
>>>>> reply email and delete this email and all attachments.
>>>>>
>>>>> -- 
>>>>> 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].
>>>>> To view this discussion on the web visit 
>>>>> https://groups.google.com/d/msgid/go-cd/08c6247d-e0c3-4d05-b449-e31c3b899e1dn%40googlegroups.com
>>>>>  
>>>>> <https://groups.google.com/d/msgid/go-cd/08c6247d-e0c3-4d05-b449-e31c3b899e1dn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>>
>>>
>>> ------------------------------
>>> The information in this email and any attachments are intended solely 
>>> for the recipient(s) to whom it is addressed, and may be confidential 
>>> and/or privileged. Any unauthorized distribution or copying of this 
>>> transmittal or its attachments is prohibited. If you are not a named 
>>> recipient or have received this email in error: (i) you should not read, 
>>> disclose, or copy it, (ii) please notify the sender of your receipt by 
>>> reply email and delete this email and all attachments.
>>>
>>> -- 
>>> 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].
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/go-cd/e0c53d2d-efa2-4460-ab2e-922e44ce8ecfn%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/go-cd/e0c53d2d-efa2-4460-ab2e-922e44ce8ecfn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
-- 


The information in this email and any attachments are intended solely for 
the recipient(s) to whom it is addressed, and may be confidential and/or 
privileged. Any unauthorized distribution or copying of this transmittal or 
its attachments is prohibited. If you are not a named recipient or have 
received this email in error: (i) you should not read, disclose, or copy 
it, (ii) please notify the sender of your receipt by reply email and delete 
this email and all attachments.

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/go-cd/c38ada02-62f1-4259-b490-978d19826b60n%40googlegroups.com.

Reply via email to