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

ci(orc8r): Added Terraform Lint CI Check #12081

Merged
merged 6 commits into from Apr 22, 2022

Conversation

ShubhamTatvamasi
Copy link
Contributor

Signed-off-by: Shubham Tatvamasi shubhamtatvamasi@gmail.com

Summary

Test Plan

Additional Information

  • This change is backwards-breaking

@ShubhamTatvamasi ShubhamTatvamasi requested a review from a team as a code owner March 11, 2022 05:40
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines. label Mar 11, 2022
@github-actions
Copy link
Contributor

Thanks for opening a PR! 💯

A couple initial guidelines

Howto

  • Reviews. The "Reviewers" listed for this PR are the Magma maintainers who will shepherd it.
  • Checks. All required CI checks must pass before merge.
  • Merge. Once approved and passing CI checks, use the ready2merge label to indicate the maintainers can merge your PR.

More info

Please take a moment to read through the Magma project's

If this is your first Magma PR, also consider reading

@github-actions github-actions bot added the component: ci All updates on CI (Jenkins/CircleCi/Github Action) label Mar 11, 2022
@pull-request-size pull-request-size bot added size/M Denotes a PR that changes 30-99 lines. and removed size/S Denotes a PR that changes 10-29 lines. labels Mar 11, 2022
@ShubhamTatvamasi ShubhamTatvamasi self-assigned this Mar 11, 2022
@ShubhamTatvamasi ShubhamTatvamasi linked an issue Mar 11, 2022 that may be closed by this pull request
Copy link
Member

@themarwhal themarwhal left a comment

Choose a reason for hiding this comment

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

lgtm!

branches:
- master
- 'v1.*'

Copy link
Member

Choose a reason for hiding this comment

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

should we add some concurrency configs? @quentinDERORY

Copy link
Contributor

Choose a reason for hiding this comment

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

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number}}
  cancel-in-progress: true

Maybe something like this in alignment with the other linters.

@ShubhamTatvamasi
Copy link
Contributor Author

For common tasks such as lint check, should we start using actions from marketplace?
https://github.com/marketplace/actions/terraform-lint-action

@ShubhamTatvamasi
Copy link
Contributor Author

I have updated code, now using action from marketplace.

Signed-off-by: Shubham Tatvamasi <shubhamtatvamasi@gmail.com>
Signed-off-by: Shubham Tatvamasi <shubhamtatvamasi@gmail.com>
Signed-off-by: Shubham Tatvamasi <shubhamtatvamasi@gmail.com>
Signed-off-by: Shubham Tatvamasi <shubhamtatvamasi@gmail.com>
Signed-off-by: Shubham Tatvamasi <shubhamtatvamasi@gmail.com>
@ShubhamTatvamasi ShubhamTatvamasi enabled auto-merge (squash) March 23, 2022 13:21
Copy link
Contributor

@Neudrino Neudrino left a comment

Choose a reason for hiding this comment

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

For common tasks such as lint check, should we start using actions from marketplace? https://github.com/marketplace/actions/terraform-lint-action

I agree that using Actions from Marketplace might be a good idea.
However, on top of that we might want to stick to the standard ReviewDog provided linters where possible, as they provide excellent integration with Github out of the box, and avoid custom code here.

In particular for this case this would mean to us tflint.
This would also have the advantage that it could also easily be integrated with our existing set (and setup) of reviewdog.

.github/workflows/terraform-lint.yml Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

github-actions bot commented Mar 25, 2022

Oops! Looks like you failed the DCO check. Be sure to sign all your commits.

Howto

♻️ Updated: ✅ The check is passing the DCO check after the last commit.

Signed-off-by: Shubham Tatvamasi <shubhamtatvamasi@gmail.com>
Copy link
Contributor

@Neudrino Neudrino left a comment

Choose a reason for hiding this comment

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

More linters are always good and this PR LGTM in general.

We might consider to us tflint and integrate it with our our existing set (and setup) of reviewdog linters to benefit from the excellent Github integration of reviewdog 🐶.

@ShubhamTatvamasi ShubhamTatvamasi merged commit c0c5f90 into magma:master Apr 22, 2022
emakeev pushed a commit to emakeev/magma that referenced this pull request Aug 5, 2022
* ci(orc8r): Added Terraform Lint CI Check

Signed-off-by: Shubham Tatvamasi <shubhamtatvamasi@gmail.com>

* fixed yaml lint

Signed-off-by: Shubham Tatvamasi <shubhamtatvamasi@gmail.com>

* fixed yaml indentation

Signed-off-by: Shubham Tatvamasi <shubhamtatvamasi@gmail.com>

* Used lint action from marketplace

Signed-off-by: Shubham Tatvamasi <shubhamtatvamasi@gmail.com>

* indent bug fix

Signed-off-by: Shubham Tatvamasi <shubhamtatvamasi@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: ci All updates on CI (Jenkins/CircleCi/Github Action) size/M Denotes a PR that changes 30-99 lines.
Projects
Development

Successfully merging this pull request may close these issues.

Create CI job for checking terraform format checks
3 participants