Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation of files (tasks, stacks) without being logged in? #583

Open
diegoroccia opened this issue Sep 27, 2024 · 2 comments
Open

Validation of files (tasks, stacks) without being logged in? #583

diegoroccia opened this issue Sep 27, 2024 · 2 comments

Comments

@diegoroccia
Copy link

Subject of the issue

I want to integrate some pre-commit check in the pipeline, so I would like to ask how can I lint/validate the files also when I am not logged in to the accounts (from the CI/CD pipeline or from my local laptop)

also, do you have any jsonschema for tasks and annotated stacks?

What do you suggest ?

@OlafConijn
Copy link
Member

there is a print-tasks operation on the cli that can generate "native" cloudformation templates from orgformation tasks & templates. the output of this can verified by other tools like cfn-lint.

e.g:

  1. npx org-formation print-tasks my_tasks.yml --output yaml --max-concurrent-stacks 100 --max-concurrent-tasks 100
  2. if [ -d .printed-stacks ]; then cfn-lint ./.printed-stacks/**/*.yaml -i W2001,E3001,E1019,W1020,W2509,E3021,W8001; else echo skipping linting; fi"

print-tasks will require you to be logged in to aws in some circumstances (perhaps all?) but only to read/resolve parameter values needed to build the templates

@OlafConijn
Copy link
Member

the list of rules that are ignored might need a review within your context/org. typically these have to do with (benign) artefacts created by the generation process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants