Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

ci: Introduce ChatOps #368

Merged
merged 21 commits into from
Sep 18, 2023
Merged

ci: Introduce ChatOps #368

merged 21 commits into from
Sep 18, 2023

Conversation

sebastianczech
Copy link
Contributor

@sebastianczech sebastianczech commented Sep 13, 2023

Description

PR delivers workflows for ChatOps (like for Azure PaloAltoNetworks/terraform-azurerm-vmseries-modules#304).

NOTICE: Before merging this PR administrator needs to define GitHub application and secrets CHATOPS_APP_ID, CHATOPS_APP_PRIVATE_KEY, CHATOPS_APP_INSTALLATION_ID. Permissions for GitHub application should be the same as for Azure.

Motivation and Context

The ChatOPS-like workflows provide a way of running on demand, Terratest based tests. They can become handy in situations where a particular test is not run in PR CI workflow (Apply/Idempotence), or the CI workflow is not triggered (PRs created by other workflows, like pre-commit dependencies update).

Currently there are 6 supported commands:

  • sca - runs pre-commit with all tests
  • help - displays comment with information how to use ChatOps
  • plan - runs plan action
  • apply - runs apply action
  • idempotence - runs idempotence test (apply following a plan)
  • validate - run terraform validate

The 1st and 2nd takes no parameters. The remaining can take two:

  • paths - space separated list of module paths to test
  • tf_version - (optional) space separated list of Terraform versions to use to run the test, when skipped, the latest Terraform version will be used.

Example:

/validate paths="examples/combined_design modules/vpc"

How Has This Been Tested?

Changes were tested on internal clone of terraform-aws-vmseries-modules.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes if appropriate.
  • All new and existing tests passed.

@sebastianczech sebastianczech requested a review from a team as a code owner September 13, 2023 06:53
Copy link
Contributor

@pimielowski pimielowski left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@sebastianczech sebastianczech requested a review from a team September 18, 2023 06:33
Base automatically changed from dependabot-pre-commit-update to main September 18, 2023 13:51
@sebastianczech sebastianczech merged commit 4c92bbc into main Sep 18, 2023
@sebastianczech sebastianczech deleted the chatops branch September 18, 2023 13:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants