Hi, the screenshot didn't come through correctly, so it would be good if
you can include that.

>From looking at the XML, If I recall correctly, it might be that you were
using the "legacy"/historical syntax for handling exec commands, but need
to dig a bit more. With this syntax it is somewhat indeterminate how spaces
should be handled. However, I don't think it was intentionally broken by
the changes I mentioned in 22.2.0 - although it looks like it might be the
case for you. I'd have to validate separately whether you were just using
incorrect configuration that happened to work. It should look like this on
the UI if you want to do it this way without using a separate script.

[image: image.png]
You might want to try editing the command via the UI, and then editing it
back in case the syntax needs converting, which will look like:

              <exec command="git">
                <arg>pull</arg>
                <runif status="passed" />
              </exec>

-Chad

On Sat, Nov 11, 2023 at 2:38 AM Sri Sai Sruthi JAGANNADDAM <
sjagannad...@mdsol.com> 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, <
>> sjagan...@mdsol.com> 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 go-cd+un...@googlegroups.com.
>>> 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 go-cd+unsubscr...@googlegroups.com.
> 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>
> .
>

-- 
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/CAA1RwH8mGKcwHb5x6EP6tVKYGWiAtcD1PZWSV5v36xEhpyuSMQ%40mail.gmail.com.

Reply via email to