Compare commits

..

1 Commits

Author SHA1 Message Date
ce8483f9fa feat: initial setup
All checks were successful
Build / build (pull_request) Successful in 39s
- manage nomad jobs
- create makefile
- create gitignore
- manage terragrunt environments
- add build/deploy jobs
2024-12-28 22:37:54 +11:00
2 changed files with 41 additions and 6 deletions

View File

@ -22,16 +22,15 @@ jobs:
env:
VAULT_ROLEID: ${{ secrets.TERRAFORM_NOMAD_VAULT_ROLEID }}
run: |
env
make plan
- name: Show Plans
run: |
find /workspace -type f -name "*.plan"
#- name: Upload Artifacts
# uses: actions/upload-artifact@v3
# with:
# name: plans
# path: /workspace/unkin/rpmbuilder/dist/*/*.rpm
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: plans
path: /workspace/unkin/terraform-nomad/plans/*.plan

View File

@ -0,0 +1,36 @@
name: Deploy
on:
workflow_run:
workflows:
- Build
types:
- completed
jobs:
deploy:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: almalinux-8
container:
image: git.query.consul/unkin/almalinux8-runnerdnd:latest
options: --privileged
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Download Build Artifacts
uses: actions/download-artifact@v3
with:
name: plans
path: /workspace/unkin/terraform-nomad/plans
- name: Install Terraform/Terragrunt
run: |
dnf install terraform terragrunt vault jq -y
- name: Run Terraform Apply
env:
VAULT_ROLEID: ${{ secrets.TERRAFORM_NOMAD_VAULT_ROLEID }}
run: |
make apply