Skip to content

Add Baseline for Repository #1

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

Merged
merged 9 commits into from
Jun 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* PerfectThymeTech/csa-admins
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "Bug report 🐛"
description: Report errors or unexpected behavior
title: "Bug: "
labels:
- bug
- backlog
assignees: "marvinbuss"

body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this report!

- type: textarea
id: reproduce
attributes:
label: Steps to reproduce
placeholder: Please share with us the step(s) required to reproduce the bug.
validations:
required: true

- type: textarea
id: error
attributes:
label: Error Message
description: If possible, please share the error message that you received.
placeholder: Error Messages
render: json
validations:
required: false

- type: textarea
id: screenshots
attributes:
label: Screenshots
description: If possible, please include screenshots and paste them into the markdown editor below.
placeholder: Screenshots
validations:
required: false

- type: markdown
attributes:
value: "Thanks for completing this form!"
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/DOCUMENTATION_ISSUE.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "Documentation Issue 📚"
description: Report issues in our documentation
title: "Documentation: "
labels:
- documentation
- backlog

body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this report!

- type: textarea
id: description
attributes:
label: Documentation Issue
placeholder: Please share the name of the document along with supporting points on why it requires an amendment.
validations:
required: true

- type: markdown
attributes:
value: "Thanks for completing this form!"
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Feature Request & Ideas 🚀"
description: Suggest a new feature or improvement (this does not mean you have to implement it)
title: "Feature: "
labels:
- feature
- backlog
assignees: "marvinbuss"

body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this report!

- type: textarea
id: feature_description
attributes:
label: Feature or Idea - What?
placeholder: Briefly describe what the new feature, idea or enhancement entails.
validations:
required: true

- type: textarea
id: feature_reason
attributes:
label: Feature or Idea - Why?
placeholder: Briefly describe why the new feature, idea or enhancement is required and what outcome you are trying to achieve.
validations:
required: true

- type: markdown
attributes:
value: "Thanks for completing this form!"
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: true
2 changes: 2 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**Proposed changes**:
- ...
36 changes: 36 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: 2
# enable-beta-ecosystems: true
updates:

# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "sunday"
time: "10:00"
labels:
- "github-actions"
- "dependencies"

# Maintain dependencies for pip
- package-ecosystem: "pip"
directory: "code/function/"
schedule:
interval: "weekly"
day: "sunday"
time: "10:00"
labels:
- "pip"
- "dependencies"

# Maintain dependencies for Terraform
- package-ecosystem: "terraform"
directory: "/code/infra"
schedule:
interval: "weekly"
day: "sunday"
time: "10:00"
labels:
- "terraform"
- "dependencies"
82 changes: 82 additions & 0 deletions .github/workflows/_terraformApplyTemplate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Terraform Apply Template

on:
workflow_call:
inputs:
environment:
required: true
type: string
default: "dev"
description: "Specifies the environment of the deployment."
terraform_version:
required: true
type: string
description: "Specifies the terraform version."
working_directory:
required: true
type: string
description: "Specifies the working directory."
secrets:
TENANT_ID:
required: true
description: "Specifies the tenant id of the deployment."
CLIENT_ID:
required: true
description: "Specifies the client id."
CLIENT_SECRET:
required: true
description: "Specifies the client secret."
SUBSCRIPTION_ID:
required: true
description: "Specifies the client id."

permissions:
id-token: write
contents: read

jobs:
deployment:
name: Terraform Apply
runs-on: self-hosted
continue-on-error: false
environment: ${{ inputs.environment }}

env:
ARM_TENANT_ID: ${{ secrets.TENANT_ID }}
ARM_SUBSCRIPTION_ID: ${{ secrets.SUBSCRIPTION_ID }}
ARM_CLIENT_ID: ${{ secrets.CLIENT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
ARM_USE_OIDC: false

steps:
# Setup Node
- name: Setup Node
id: node_setup
uses: actions/setup-node@v3
with:
node-version: 16

# Setup Terraform
- name: Setup Terraform
id: terraform_setup
uses: hashicorp/setup-terraform@v2
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: true

# Check Out Repository
- name: Check Out Repository
id: checkout_repository
uses: actions/checkout@v3

# Terraform Init
- name: Terraform Init
working-directory: ${{ inputs.working_directory }}
run: |
terraform init

# Terraform Apply
- name: Terraform Apply
working-directory: ${{ inputs.working_directory }}
run: |
terraform apply -var-file vars.${{ inputs.environment }}.tfvars -auto-approve -input=false
63 changes: 63 additions & 0 deletions .github/workflows/_terraformLintTemplate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Terraform Lint Template

on:
workflow_call:
inputs:
terraform_version:
required: true
type: string
description: "Specifies the terraform version."
working_directory:
required: true
type: string
description: "Specifies the working directory."

permissions:
pull-requests: write

jobs:
deployment:
name: Terraform Lint
runs-on: ubuntu-latest
continue-on-error: false

steps:
# Setup Terraform
- name: Setup Terraform
id: terraform_setup
uses: hashicorp/setup-terraform@v2
with:
terraform_version: ${{ inputs.terraform_version }}
terraform_wrapper: true

# Check Out Repository
- name: Check Out Repository
id: checkout_repository
uses: actions/checkout@v3

# Terraform Format
- name: Terraform Format
id: terraform_format
working-directory: ${{ inputs.working_directory }}
run: |
terraform fmt -check -recursive

# Add Pull Request Comment
- name: Add Pull Request Comment
uses: actions/github-script@v6
id: pr_comment
if: github.event_name == 'pull_request'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const output = `#### Terraform Lint Results
* Terraform Version 📎\`${{ inputs.terraform_version }}\`
* Working Directory 📂\`${{ inputs.working_directory }}\`
* Terraform Format and Style 🖌\`${{ steps.terraform_format.outcome }}\``;

github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: output
})
Loading