Skip to content

Commit

Permalink
Merge pull request #10 from clouddrove/CD-249
Browse files Browse the repository at this point in the history
updated and upgraded
  • Loading branch information
Nikita Dugar authored Nov 3, 2020
2 parents 7571065 + 2d42632 commit ec3924f
Show file tree
Hide file tree
Showing 10 changed files with 157 additions and 400 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: 'Create README.md file'
on:
push:
branches:
- master

jobs:
readme-create:
name: 'readme-create'
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@master

- name: Set up Python 3.7.
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: 'create readme'
uses: 'clouddrove/[email protected]'
with:
actions_subcommand: 'readme'
github_token: '${{ secrets.GITHUB}}'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}


- name: pre-commit check errors
uses: pre-commit/[email protected]
continue-on-error: true

- name: pre-commit fix erros
uses: pre-commit/[email protected]
continue-on-error: true

- name: 'push readme'
uses: 'clouddrove/[email protected]'
continue-on-error: true
with:
actions_subcommand: 'push'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}

- name: 'Slack Notification'
uses: clouddrove/action-slack@v2
with:
status: ${{ job.status }}
fields: repo,author
author_name: 'CloudDrove'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required
if: always()
81 changes: 46 additions & 35 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
@@ -1,79 +1,90 @@
name: 'Terraform GitHub Actions'
on:
- pull_request
pull_request:
branches:
- master

jobs:
terraform:
name: 'Terraform'
runs-on: ubuntu-latest
steps:

- name: 'Checkout'
uses: actions/checkout@master

- name: Configure AWS Credentials
uses: clouddrove/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.TEST_AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.TEST_AWS_ACCESS_SECRET_KEY }}
aws-region: us-east-2

- name: 'Terraform Format'
uses: clouddrove/github-actions@v2.0
uses: 'clouddrove/github-actions@v4.0'
with:
actions_subcommand: 'fmt'

- name: 'ALB Terraform Init'
uses: clouddrove/github-actions@v2.0
- name: 'Terraform init for alb'
uses: 'clouddrove/github-actions@v4.0'
with:
actions_subcommand: 'init'
tf_actions_working_dir: ./_example/alb

- name: Configure AWS Credentials
uses: clouddrove/configure-aws-credentials@v1
- name: 'Terraform validate for alb'
uses: 'clouddrove/[email protected]'
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2
actions_subcommand: 'validate'
tf_actions_working_dir: ./_example/alb

- name: 'ALB Terraform Plan'
uses: clouddrove/github-actions@v2.0
- name: 'Terraform plan for alb'
uses: 'clouddrove/github-actions@v4.0'
with:
actions_subcommand: 'plan'
tf_actions_working_dir: ./_example/alb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: 'ALB Terratest'
uses: clouddrove/github-actions@v2.0
- name: 'Terraform init for clb'
uses: 'clouddrove/github-actions@v4.0'
with:
actions_subcommand: 'terratest'
tf_actions_working_dir: ./_test/alb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
actions_subcommand: 'init'
tf_actions_working_dir: ./_example/clb

- name: 'CLB Terraform Init'
uses: clouddrove/github-actions@v2.0
- name: 'Terraform validate for clb'
uses: 'clouddrove/github-actions@v4.0'
with:
actions_subcommand: 'init'
actions_subcommand: 'validate'
tf_actions_working_dir: ./_example/clb

- name: 'CLB Terraform Plan'
uses: clouddrove/github-actions@v2.0
- name: 'Terraform plan for clb'
uses: 'clouddrove/github-actions@v4.0'
with:
actions_subcommand: 'plan'
tf_actions_working_dir: ./_example/clb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: 'CLB Terratest'
uses: clouddrove/github-actions@v2.0
- name: 'Terraform init for nlb'
uses: 'clouddrove/github-actions@v4.0'
with:
actions_subcommand: 'terratest'
tf_actions_working_dir: ./_test/clb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
actions_subcommand: 'init'
tf_actions_working_dir: ./_example/nlb

- name: 'Terraform validate for nlb'
uses: 'clouddrove/[email protected]'
with:
actions_subcommand: 'validate'
tf_actions_working_dir: ./_example/nlb

- name: 'Terraform plan for nlb'
uses: 'clouddrove/[email protected]'
with:
actions_subcommand: 'plan'
tf_actions_working_dir: ./_example/nlb

- name: 'Slack Notification'
uses: clouddrove/action-slack@v2
with:
status: ${{ job.status }}
fields: repo,author
author_name: 'Clouddrove'
author_name: 'CloudDrove'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} # required
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required
if: always()
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
repos:
- repo: git://github.com/antonbabenko/pre-commit-terraform
rev: v1.12.0
rev: v1.43.0
hooks:
- id: terraform_fmt

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.0.0
rev: v3.2.0
hooks:
- id: check-merge-conflict
- id: trailing-whitespace
- id: check-yaml
- id: check-added-large-files
- id: trailing-whitespace
Loading

0 comments on commit ec3924f

Please sign in to comment.