@Tsanko Stoev No, the semicolon simply produces a list of commands which 
are still executed in turn, see e.g `man sh` of `man bash` for the 
explanation of lists

E.g. from `man bash`: "Commands  separated  by  a  ; are executed 
sequentially".

In theory you could run shell tasks in parallel by ending their commands 
with an "&" and thus sending them immediately to the background but this 
has little practical usage because their execution will be completely 
detached from GoCD and you will bw unable to check their exit status, 
collect artifacts and so on.

GoCD pipeline model is that tasks always run sequentially and jobs (sets of 
tasks) always run in parallel. I would very much like to optionally control 
the order of execution of jobs within one stage (for cases one of which I 
e.g. decribed here 
https://groups.google.com/g/go-cd/c/39YZN8ejEig/m/AXLIC3-RBAAJ), but even 
in its current form the model makes reasonable sense.
 
@Vijayakumaran Your pipeline looks like your php74 runs are independent 
bits of work rather than consecutive steps relying on each other. Turn your 
php74 tasks into jobs and probably you will immediately get what you have 
in mind. Note, however, that the YAML format is little suitable for working 
with parallelism. Use the Groovy format where your parallel jobs can be 
implemented as simple as creating a list of your arguments and iterating 
over this list when declaring the job element.

As an illustration I attach my own case of running the same set of tests 
against multiple versions of PostgreSQL in parallel. This is done by using 
jobs.
[image: parallel-jobs.png]
пятница, 5 января 2024 г. в 03:26:45 UTC+7, Tsanko Stoev: 

> If you are executing a command you should be able to use ; to execute 
> multiple commands concurrently. For example : "command1 ; command2 ; 
> command3" .
> I believe this should work on Windows and Linux. 
> Thanks.
>
> Tsanko Stoev 
>  
>
> On Thu, Jan 4, 2024 at 7:25 AM Vijayakumaran A. <
> [email protected]> wrote:
>
>> Thanks.so we can't run multiple stage with one agent.but  Is there any 
>> possibilities to run the GOCD Task parallely? i have submit my pipeline 
>> code here i have one stage with one job 5 task(commands)..i wanted to run 
>> all my task(commands) parallel.Please find my attachment here. 
>>
>> On Thursday, January 4, 2024 at 3:25:20 PM UTC+5:30 Chad Wilson wrote:
>>
>>> Indeed, you need the ability to have multiple agents running in parallel 
>>> to be able to do multiple jobs in parallel. The best way to achieve this 
>>> depends on 1) your installation/deployment choice 2) your agent 
>>> requirements 3) whether you are experimenting or thinking about a 
>>> production deployment.
>>>
>>> If you want to use "static" agents directly as processes at OS level, 
>>> there is 
>>> https://docs.gocd.org/current/advanced_usage/admin_install_multiple_agents.html
>>>
>>> Otherwise you can use "elastic" (dynamically created) agents 
>>> <https://docs.gocd.org/current/configuration/elastic_agents.html> via a 
>>> plugin <https://www.gocd.org/plugins/#elastic-agents>, e.g to run 
>>> multiple agents on a single host within Docker (here 
>>> <https://github.com/gocd-contrib/docker-elastic-agents-plugin>), or if 
>>> you are familiar with Kubernetes running GoCD or its agents inside 
>>> Kubernetes (use either multiple static agents, or elastic agents - even for 
>>> experimenting locally).
>>>
>>> -Chad
>>>
>>> On Thu, Jan 4, 2024 at 5:40 PM Sriram Narayanan <[email protected]> 
>>> wrote:
>>>
>>>> No
>>>>
>>>> On Thu, 4 Jan 2024 at 3:02 PM, Vijay A <[email protected]> wrote:
>>>>
>>>>>
>>>>> I have installed GoCD server. And Installed one GoCD Agent.
>>>>>
>>>>> Now i created a new pipeline : Pipeline1
>>>>>
>>>>> Created one stage : Stage1
>>>>>
>>>>> Now two jobs: Job1 and Job2
>>>>>
>>>>> As i am having one GoAgent, does these two jobs will be executed 
>>>>> parallely.is there any way to achieve this ? 
>>>>>
>>>>> Yes, add a second good agent. Ensure that both the go agents and The 
>>>> job are marked as the same “resource”. 
>>>>
>>>>
>>>> -- 
>>>>> 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/b832fcba-6af7-4516-8420-3e97055bf486n%40googlegroups.com
>>>>>  
>>>>> <https://groups.google.com/d/msgid/go-cd/b832fcba-6af7-4516-8420-3e97055bf486n%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 [email protected].
>>>>
>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/go-cd/CANiY96aAwLpWERzOoeecEksG0NY1im3V4X6FQO9HReC%3DMXQYAA%40mail.gmail.com
>>>>  
>>>> <https://groups.google.com/d/msgid/go-cd/CANiY96aAwLpWERzOoeecEksG0NY1im3V4X6FQO9HReC%3DMXQYAA%40mail.gmail.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 [email protected].
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/go-cd/c89596c6-223a-48e9-be6a-dfcccf2c63dbn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/go-cd/c89596c6-223a-48e9-be6a-dfcccf2c63dbn%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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/go-cd/bcb65b53-ece1-41a6-95a9-96e883ad5914n%40googlegroups.com.

Reply via email to