aleksac / circleci-cli-py Goto Github PK
View Code? Open in Web Editor NEWpip installable CircleCI CLI binary
License: MIT License
pip installable CircleCI CLI binary
License: MIT License
The pre-commit entrypoint uses the -c
CLI flag, expecting that all following args are filepaths. If any args
are passed, these are injected directly after the -c
flag and are not correctly processed. For example:
- repo: https://github.com/AleksaC/circleci-cli-py
rev: v0.1.30549
hooks:
- id: circle-ci-validator
args: [--org-slug, github/Agreena-ApS]
I would expect this to result in one of the following formats:
circleci config validate -c .circleci/config.yml --org-slug github/Agreena-ApS
OR
circleci config validate --org-slug github/Agreena-ApS -c .circleci/config.yml
however, it results in a command like the following:
circleci config validate -c --org-slug github/Agreena-ApS .circleci/config.yml
which gives the error Error: accepts at most 1 arg(s), received 2
.
Changing the format to e.g. args: [--org-slug=github/Agreena-ApS]
allows the hook to run, but the arg is never actually used, and my checks fail: Error: config compilation contains errors
The following "workaround" format is possible:
args: ['', --org-slug, github/Agreena-ApS]
as this injects an empty string in the command, resulting in the following:
circleci config validate -c '' --org-slug github/Agreena-ApS .circleci/config.yml
which processes the empty arg (ignoring the fact it does not exist) and uses the positional method arg to get the filepath.
Given that the pre-commit format only allows files
to be a single pattern, and the -c
flag is not documented in the CircleCI CLI, a solution here would be to drop the -c
from the command entry
.
Hello ๐
I'm having a weird issue using pre-commit
and this validator, and I' not sure if it's a mis-config or something else.
CircleCI Config Validation..................................................Failed
- hook id: circle-ci-validator
- exit code: 126
env: circleci: Bad CPU type in executable
Looking into the exit code: 126
it looks like the executable does not have execution permissions.
But I'm not sure what have changed.
Does anyone have an idea of what could be the root cause?
Thanks.
Here's my config of .pre-commit-config.yaml
:
- repo: https://github.com/AleksaC/circleci-cli-py
rev: b6ca7f04421b627192e232b22ffc0f33e9571700 # frozen: v0.1.30549
hooks:
- id: circle-ci-validator
I'm using the latest released tag v0.1.30549
The same happens with the latest commit
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.