cincinnati icon indicating copy to clipboard operation
cincinnati copied to clipboard

NO-JIRA: Simplify dist/prow_yaml_lint.sh

Open hongkailiu opened this issue 7 months ago • 4 comments

Refer https://yamllint.readthedocs.io/en/stable/configuration.html

  • Replace the ignored folders identified by find with ignore in the inline config.
  • The default yaml files '.yaml', '.yml', and '.yamllint'
  • ~Add --list-files to show the files that yamllint processes.~

The job looks nice:

$ curl -s https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/openshift_cincinnati/1010/pull-ci-openshift-cincinnati-master-yaml-lint/1905401248773836800/artifacts/test/build-log.txt
+ yamllint -v
yamllint 1.35.1
+ yamllint --list-files -s -d '{extends: default, rules: {line-length: {max: 120}}, ignore: [cincinnati/src/plugins/internal/graph_builder/openshift_secondary_metadata_parser/test_fixtures/, vendor/, dist/grafana/dashboards/]}' .
./.github/dependabot.yml
./dist/openshift/cinci-with-mh-deployment.yaml
./dist/openshift/cincinnati-deployment.yaml
./dist/openshift/cincinnati-e2e.yaml
./dist/openshift/load-testing.yaml
./dist/openshift/observability.yaml

These are the same set of files as the original find cmd:

$ find . -path ./cincinnati/src/plugins/internal/graph_builder/openshift_secondary_metadata_parser/test_fixtures -prune -o -path ./vendor -prune -o -path ./dist/grafana/dashboards -prune -o -type f '(' -name '*.yaml' -o -name '*.yml' ')' -print0
| xargs -L 1 -0 echo
./dist/openshift/observability.yaml
./dist/openshift/cincinnati-e2e.yaml
./dist/openshift/load-testing.yaml
./dist/openshift/cincinnati-deployment.yaml
./dist/openshift/cinci-with-mh-deployment.yaml
./.github/dependabot.yml

hongkailiu avatar Mar 27 '25 23:03 hongkailiu

@hongkailiu: This pull request explicitly references no jira issue.

In response to this:

Refer https://yamllint.readthedocs.io/en/stable/configuration.html

  • Replace the ignored folders identified by find with ignore in the inline config.
  • The default yaml files '.yaml', '.yml', and '.yamllint'
  • Add --list-files to show the files that yamllint processes.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

openshift-ci-robot avatar Mar 27 '25 23:03 openshift-ci-robot

/test e2e

hongkailiu avatar Mar 28 '25 15:03 hongkailiu

@hongkailiu: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

openshift-ci[bot] avatar Mar 28 '25 20:03 openshift-ci[bot]

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hongkailiu, petr-muller

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

openshift-ci[bot] avatar Apr 15 '25 16:04 openshift-ci[bot]