pipeline as code - stuck on waiting for agent

Skip to first unread message


May 3, 2024, 1:10:25 PMMay 3
to go-cd

I am trying to use the feature of pipeline as a code. In the config repository, I have configured an Allow rule for a specific environment. There are agents assigned to this environment. Having done this, I am now triggering the pipeline. The pipeline however just keeps waiting for an agent allocation. What step am I missing and where should this be configured.
Screenshot from 2024-05-03 22-38-39.png

Any help would be appreciated.

Warm regards,

Sriram Narayanan

May 3, 2024, 1:29:08 PMMay 3
to go...@googlegroups.com
Have you tagged the jobs to the resources "linux_build_machines" or to "documentation" as appropriate?

Also, are your pipelines and agents in the same environment? See: https://docs.gocd.org/current/configuration/managing_environments.html 

If you could share more about your environments, agents and pipelines, then we could help you better.

Warm regards,

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/a19f5206-b9e3-4321-9831-e3da5fdf4c92n%40googlegroups.com.

Pankaj Lal

May 3, 2024, 2:13:35 PMMay 3
to go...@googlegroups.com

I had not tagged as a resource on agent and referred the same in yaml. This is done now. However the situation is the same. Here are some more details.

This is in pipeline association with environment. mm-documentation-review is the relevant pipeline here.

Screenshot from 2024-05-03 23-39-04.png

This is the resource tag on the agent.
Screenshot from 2024-05-03 23-39-27.png

This is how I refer to the resource in the yaml.

Screenshot from 2024-05-03 23-40-22.png

You received this message because you are subscribed to a topic in the Google Groups "go-cd" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/go-cd/E4Q7ZXhH6Lk/unsubscribe.
To unsubscribe from this group and all its topics, 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/CANiY96YAaTLDPaLA%3DvKV2P2uneicgOx%2B%3D%3D_Yirqqh7RaMzksow%40mail.gmail.com.

Chad Wilson

May 5, 2024, 1:48:25 AMMay 5
to go...@googlegroups.com
Perhaps you can share the agent(s) you are expecting it to run on, and the job configuration of the jobs that aren't scheduling?

If the job isn't being assigned, it means there is no free agent[1] in the desired pipeline-scope environment[2] that offers the requested job-scope resources [3]. All three conditions need to be met, so either your agent or the pipeline/job may be configured in a different way to your agents (perhaps it is requesting a "resource")?

Keep in mind that you don't have to use job resource requirements or environments if you don't want to, and you can configure it such that some agents will be able to run jobs with no specific requested resource; or no specific environment.


On Sat, May 4, 2024 at 1:10 AM 'pan...@mammoth.io' via go-cd <go...@googlegroups.com> wrote:

Chad Wilson

May 5, 2024, 1:59:58 AMMay 5
to go...@googlegroups.com
Sorry, somehow I'd missed the replies - but largely my message is hopefully still useful.

Something is likely configured wrongly.

It's a bit difficult to spot what you are doing wrong as you're only including subsets of the configuration YAML and or config. Is `build` the first, or only stage in the pipeline? Are we looking at the same pipeline in the correct environment?

Does the agent correctly show up for the environment in the Environments listing alongside the Pipeline you are referring to, e.g:


Reply all
Reply to author
0 new messages