Skip to content

A little GoCD configuration analysis, sanity check and audit helper tool

License

Notifications You must be signed in to change notification settings

d-led/will_it_go_cd

Repository files navigation

Will it GoCD?

Build Status Build status FOSSA Status

This is a little GoCD configuration analysis, sanity check and audit helper tool

Motivation

GoCD is a very user friendly and sophisticated Continuous Integration / Continuous Delivery tool. GoCD allows gradual immersion in its features by means of sensible defaults and a very well documented concept language. When many features of GoCD are used, it is easy to overlook misconfigured pipelines, e.g. when there is no agent with the resource required by a job, or when a pipeline is not part of the environment, where the dedicated agent is configured. This tool should give a quick overview of certain aspects of the configuration

Current Queries

  • what agents are there and how are they configured? Summary, as it's already part of the GoCD UI.
  • misconfigured agents: which jobs can an agent potentially run?
  • capacity planning and misconfigured jobs: which agents can a job run on?
  • <<<OOPS>>> on lonely jobs or agents, or on no agents configured
  • the tool relies on GoCD having validated the XML beforehand, thus, it might crash on invalid / incompatible XML input

Guarantees

  • None
  • No guarantees of fitness for any kind of task, use at your own risk

Rough Plan

contributions with new analyses are welcome!

  • get the configuration from a URL (good first issue)
  • get pipeline config from remote pipeline-as-code repos

Usage

see

willitgocd --help

file analysis:

willitgocd xml -f <path_to>/server.xml

Example Output

Jobs Won't Run on any Agent

<<OOPS>>: the following jobs do not have an agent available to them!

Pipeline  Stage         Name        RequiredResources     Environments
----------------------------------------------------------------------
security  defaultStage  defaultJob  security_but_no_env
deploy    defaultStage  defaultJob  nonexistent_resource

Agent Won't Take Any Jobs

Jobs that can be built by d659ae9960ba: r:(gradle,java,lua,security_but_no_env) e:(unused_environment) (...):
<<OOPS>>: no jobs will run on this agent!

No Agents Configured

Agents:

<<<OOPS>>: no agents are configured

Building

GoCD Versions Known to Have Worked

  • 18.2.0
  • others may work too if the XML model is not too different from the current one

License

FOSSA Status

FOSSA OSS Notice