Skip to content

Commit

Permalink
[GIDS] Implement Standard CI/CD Patterns (#1132)
Browse files Browse the repository at this point in the history
* Add standard workflows

* Add providers.tf

* add environment tf variable
  • Loading branch information
ryan-mcneil authored May 29, 2024
1 parent baf44c8 commit b10b5d3
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/build-and-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: "Build And Publish"
run-name: "Build And Publish"

on: [push]

jobs:
build:
uses: department-of-veterans-affairs/prt-github-workflows/.github/workflows/build-and-publish.yaml@main
secrets: inherit
19 changes: 19 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "Deploy Environments"
run-name: "Deploy Environments"

on:
workflow_dispatch:
repository_dispatch:
types: [trigger-workflow]

push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v**'
# branches: # This is for testing only - This will trigger deploys in this repo on every push
# - '**'

jobs:
Deploy-Envs:
uses: department-of-veterans-affairs/prt-github-workflows/.github/workflows/deploy-all.yaml@main
secrets: inherit
9 changes: 9 additions & 0 deletions .github/workflows/tf-plan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: "Comment a Plan on a PR"
run-name: "Comment a Plan on a PR"

on: [pull_request]

jobs:
pr-tf-plan:
uses: department-of-veterans-affairs/prt-github-workflows/.github/workflows/tf-plan.yaml@main
secrets: inherit
2 changes: 2 additions & 0 deletions cicd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
environments:
- rm-sbx
3 changes: 3 additions & 0 deletions terraform/providers.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
provider "aws" {
region = "us-gov-west-1"
}
3 changes: 3 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
variable "environment" {
type = string
}

0 comments on commit b10b5d3

Please sign in to comment.