split pipecleaner to its own repository
afeld opened this issue · 14 comments
https://github.com/alphagov/paas-cf/blob/master/concourse/scripts/pipecleaner.py
@jmcarp just pointed me to this script—seems super useful! Would you consider breaking it out to its own repository, so it can be installed/run more easily?
Heh, sorry, can see you're ahead of me: vmware-archive/fly#99
@afeld We agree this seems like a good idea, sorry we took a while to get back to you, but we have now scheduled this for our next iteration
FYI, next iteration starts Wednesday 19th October :)
Once I get this PR against fly in good shape, there will be a fly validate-pipeline
command that hopefully does much of what pipecleaner does now, although it obviously won't include shellcheck.
Ok, we've pushed it down in the priority list, since we'll likely want to use fly validate-pipeline
ourselves.
If it's useful to anyone that we go ahead and split out pipecleaner into its own repo, please say so.
The fly
cli learned validate-pipeline
in concourse 2.6. Does pipecleaner
do validation that concourse doesn't? If not, would be great to file issues / patches upstream!
@jmcarp just been reminded of this.
There's a description of what pipecleaner does - it's a bit more of a linter than a validator.
It runs shellcheck against the shell commands in the pipeline and checks for unused resources etc.
I think validate-pipeline
mostly checks that the YAML will parse ok and doesn't do these logical checks. That's probably OK in most cases as shellcheck
is relatively opinionated.
@bleach Pipecleaner also validates the dependency tree between steps/jobs, which I'm not sure validate-pipeline does either.
@Jonty agreed. I probably wasn't clear enough that the comment in pipecleaner I linked to is a better description of what it does :)
@bleach Pipecleaner also validates the dependency tree between steps/jobs, which I'm not sure validate-pipeline does either.
I think it does. Hi, btw!
@bleach: fly validate-pipeline
doesn't do everything that pipecleaner
does, but it looks like there's some overlap. A few things validate-pipeline
checks that also happen in pipecleaner
:
- A job uses a resource that isn't defined: https://github.com/concourse/atc/blob/master/validate.go#L414-L424
- A resource is defined but not used in any jobs: https://github.com/concourse/atc/blob/master/validate.go#L164-L176
@afeld we were wondering if you were still interested in this, or if fly validate-pipeline
meets your needs?
@bleach I haven't been using Concourse much recently (moved projects), but sounds like y'all are off and running with this. @jmcarp is still on that team, so he is a better judge than me. Will close this issue, since it sounds like the remaining work could be migrating more of the pipecleaner
functionality into fly validate-pipeline
. Thanks everyone!