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

Integrate linters in kubeapps-general workflow #5606

Merged
merged 25 commits into from Nov 4, 2022

Conversation

beni0888
Copy link
Collaborator

@beni0888 beni0888 commented Nov 3, 2022

Signed-off-by: Jesús Benito Calzada bjesus@vmware.com

Description of the change

We have several GHA workflows doing several small tasks that would be better integrated into the Kubeapps general workflow. Some of those workflows/jobs are the linters: golangci-lint and check-license-headers. With that in mind, this PR comprises the following changes:

  • Add a reusable workflow that contains all the existent linter jobs: golang-lint, check-license-headers and CodeQL-analyze.
  • Remove the individual workflows for the linters mentioned above, except for CodeQL, for which we have created its own reusable workflow, so we can call it from the new linters reusable workflow and from a new codeql-scheduled.yml workflow that's executed on scheduled as has been doing so far.
  • Add a new linter for yaml files (yamllint) to the linters workflow.
  • Integrate the new linters reusable workflow into the kubeapps-general workflow, so the linters are part of the general pipeline.
  • Fix most of the issues detected by the new linter for yaml files.

Benefits

  • Reduce the number of workflows and jobs scattered through different GHA files.
  • Have a more consistent kubeapps-general workflow, that includes (almost) all the tasks that make sense for the SDLC process.
  • Keep the yaml files of the project consistent according to a defined set of rules.

Possible drawbacks

  • The kubeapps-general workflow gets bigger and takes even more responsibilities.
  • Maybe some undetected side effects could appear in the future as a result of the fixed yaml files??

Applicable issues

Additional information

Signed-off-by: Jesús Benito Calzada <bjesus@vmware.com>
@netlify
Copy link

netlify bot commented Nov 3, 2022

Deploy Preview for kubeapps-dev canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit 7503913
🔍 Latest deploy log https://app.netlify.com/sites/kubeapps-dev/deploys/63650606e1647600075212cb

@beni0888 beni0888 self-assigned this Nov 3, 2022
@beni0888 beni0888 added component/ci Issue related to kubeapps ci system kind/enhancement An issue that reports an enhancement for an implemented feature github_actions Pull requests that update GitHub Actions code labels Nov 3, 2022
@beni0888 beni0888 added this to the Migrate CI to GitHub Actions milestone Nov 3, 2022
Signed-off-by: Jesús Benito Calzada <bjesus@vmware.com>
Signed-off-by: Jesús Benito Calzada <bjesus@vmware.com>
Signed-off-by: Jesús Benito Calzada <bjesus@vmware.com>
Signed-off-by: Jesús Benito Calzada <bjesus@vmware.com>
@beni0888 beni0888 marked this pull request as ready for review November 3, 2022 11:53
Copy link
Contributor

@antgamdia antgamdia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, much simpler than having a workflow per linter!

Please, mind the EOF new line 😅

image

Signed-off-by: Jesús Benito Calzada <bjesus@vmware.com>
@beni0888
Copy link
Collaborator Author

beni0888 commented Nov 3, 2022

Awesome, much simpler than having a workflow per linter!

Please, mind the EOF new line 😅

image

ouch!! 😓 That dog always bites me... I think we need a linter for that 😉

Signed-off-by: Jesús Benito Calzada <bjesus@vmware.com>
Signed-off-by: Jesús Benito Calzada <bjesus@vmware.com>
Signed-off-by: Jesús Benito Calzada <bjesus@vmware.com>
Signed-off-by: Jesús Benito Calzada <bjesus@vmware.com>
Signed-off-by: Jesús Benito Calzada <bjesus@vmware.com>
Signed-off-by: Jesús Benito Calzada <bjesus@vmware.com>
Signed-off-by: Jesús Benito Calzada <bjesus@vmware.com>
Signed-off-by: Jesús Benito Calzada <bjesus@vmware.com>
Signed-off-by: Jesús Benito Calzada <bjesus@vmware.com>
Signed-off-by: Jesús Benito Calzada <bjesus@vmware.com>
Signed-off-by: Jesús Benito Calzada <bjesus@vmware.com>
Signed-off-by: Jesús Benito Calzada <bjesus@vmware.com>
Copy link
Contributor

@absoludity absoludity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks for the attention to detail :)

Signed-off-by: Jesús Benito Calzada <bjesus@vmware.com>
Signed-off-by: Jesús Benito Calzada <bjesus@vmware.com>
Signed-off-by: Jesús Benito Calzada <bjesus@vmware.com>
Signed-off-by: Jesús Benito Calzada <bjesus@vmware.com>
Signed-off-by: Jesús Benito Calzada <bjesus@vmware.com>
Signed-off-by: Jesús Benito Calzada <bjesus@vmware.com>
Signed-off-by: Jesús Benito Calzada <bjesus@vmware.com>
@beni0888 beni0888 merged commit 3deb413 into vmware-tanzu:main Nov 4, 2022
@beni0888 beni0888 deleted the integrate-golangci-lint branch November 4, 2022 14:40
@beni0888 beni0888 mentioned this pull request Nov 7, 2022
30 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-not-required component/ci Issue related to kubeapps ci system github_actions Pull requests that update GitHub Actions code kind/enhancement An issue that reports an enhancement for an implemented feature
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants