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

jx pipeline lint -r ignores tasks folder #492

Open
joshuasimon-taulia opened this issue Aug 17, 2022 · 0 comments
Open

jx pipeline lint -r ignores tasks folder #492

joshuasimon-taulia opened this issue Aug 17, 2022 · 0 comments

Comments

@joshuasimon-taulia
Copy link

i have a pr job that lints all changes to my internal custom pipeline catalog. using jx pipeline lint --recursive ignores the 'tasks' folder

expected

jx pipeline lint --recursive should lint all pipelines in the tasks folder per the "-r, --recursive" help text

Recurisvely find all '.lighthouse' folders such as if linting a Pipeline Catalog

actual results

jx pipeline lint --r

.lighthouse/jenkins-x/lint-helm.yaml                                         OK
.lighthouse/jenkins-x/lint-pipelines.yaml                                    OK
.lighthouse/jenkins-x/pullrequest.yaml                                       OK
.lighthouse/jenkins-x/pullrequest.yaml                                       OK
.lighthouse/jenkins-x/pullrequest.yaml                                       OK
.lighthouse/jenkins-x/pullrequest.yaml                                       OK
.lighthouse/jenkins-x/pullrequest.yaml                                       OK
.lighthouse/jenkins-x/release.yaml                                           OK
.lighthouse/jenkins-x/triggers.yaml                                          OK
environment/.lighthouse/jenkins-x/pullrequest.yaml                           OK
environment/.lighthouse/jenkins-x/release.yaml                               OK
environment/.lighthouse/jenkins-x/triggers.yaml                              OK
packs/spring-boot-starters/.lighthouse/jenkins-x/candidate-image.yaml OK
packs/spring-boot-starters/.lighthouse/jenkins-x/pullrequest.yaml     OK
packs/spring-boot-starters/.lighthouse/jenkins-x/release.yaml         OK
packs/spring-boot-starters/.lighthouse/jenkins-x/triggers.yaml        OK

i currently have to resort to an ugly workaround that is dangerous to run locally since the --all flag errors out when there are other yaml files present in the target path

find . -type d -name 'charts' -exec rm -rf {} +
find . -type d -name 'preview' -exec rm -rf {} +

jx pipeline lint -a \
  --git-username="$GIT_USER" \
  --git-token="$GIT_TOKEN" \

results

.lighthouse/jenkins-x/lint-helm.yaml                                         OK
.lighthouse/jenkins-x/lint-pipelines.yaml                                    OK
.lighthouse/jenkins-x/pullrequest.yaml                                       OK
.lighthouse/jenkins-x/release.yaml                                           OK
environment/.lighthouse/jenkins-x/pullrequest.yaml                           OK
environment/.lighthouse/jenkins-x/release.yaml                               OK
packs/spring-boot-starters/.lighthouse/jenkins-x/candidate-image.yaml OK
packs/spring-boot-starters/.lighthouse/jenkins-x/pullrequest.yaml     OK
packs/spring-boot-starters/.lighthouse/jenkins-x/release.yaml         OK
tasks/spring-boot-starters/candidate-image.yaml                       OK
tasks/spring-boot-starters/pullrequest.yaml                           OK
tasks/spring-boot-starters/release.yaml                               OK
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

1 participant