Skip to content

Commit b10b5d3

Browse files
authored
[GIDS] Implement Standard CI/CD Patterns (#1132)
* Add standard workflows * Add providers.tf * add environment tf variable
1 parent baf44c8 commit b10b5d3

File tree

6 files changed

+45
-0
lines changed

6 files changed

+45
-0
lines changed
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: "Build And Publish"
2+
run-name: "Build And Publish"
3+
4+
on: [push]
5+
6+
jobs:
7+
build:
8+
uses: department-of-veterans-affairs/prt-github-workflows/.github/workflows/build-and-publish.yaml@main
9+
secrets: inherit

.github/workflows/deploy.yaml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: "Deploy Environments"
2+
run-name: "Deploy Environments"
3+
4+
on:
5+
workflow_dispatch:
6+
repository_dispatch:
7+
types: [trigger-workflow]
8+
9+
push:
10+
tags:
11+
- 'v[0-9]+.[0-9]+.[0-9]+'
12+
- 'v**'
13+
# branches: # This is for testing only - This will trigger deploys in this repo on every push
14+
# - '**'
15+
16+
jobs:
17+
Deploy-Envs:
18+
uses: department-of-veterans-affairs/prt-github-workflows/.github/workflows/deploy-all.yaml@main
19+
secrets: inherit

.github/workflows/tf-plan.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: "Comment a Plan on a PR"
2+
run-name: "Comment a Plan on a PR"
3+
4+
on: [pull_request]
5+
6+
jobs:
7+
pr-tf-plan:
8+
uses: department-of-veterans-affairs/prt-github-workflows/.github/workflows/tf-plan.yaml@main
9+
secrets: inherit

cicd.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
environments:
2+
- rm-sbx

terraform/providers.tf

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
provider "aws" {
2+
region = "us-gov-west-1"
3+
}

terraform/variables.tf

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
variable "environment" {
2+
type = string
3+
}

0 commit comments

Comments
 (0)