Skip to content

jx pipeline lint -r ignores tasks folder #492

Description

@roulettedares

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions