Skip to content

Add renovate.json

Add renovate.json #29

Workflow file for this run

name: 'integration'
# This workflow intends to verify that the module provisions
# successfully for all software and infrastructure defined.
# https://learn.hashicorp.com/tutorials/terraform/automate-terraform
on:
push:
paths-ignore:
- 'LICENSE'
- '**.md'
jobs:
integrate:
name: Integration Tests
runs-on: ${{ matrix.os }}
# Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest
defaults:
run:
shell: bash
strategy:
matrix:
os: [ubuntu-latest]
tf: [0.14.7]
env:
TF_INPUT: 0
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
TF_IN_AUTOMATION: 1
TF_VERSION: ${{ matrix.tf }}
# Switch to t3.small when available
TF_VAR_metal_compute-x86_type: "c3.small.x86"
TF_VAR_metal_controller_type: "c3.small.x86"
TF_VAR_metal_dashboard_type: "c3.small.x86"
# Let the project and sweeper actions manage the project
TF_VAR_metal_create_project: "false"
TF_VAR_metal_organization_id: ${{ secrets.METAL_ORGANIZATION_ID }}
# TODO only provide this to terraform steps that need it
TF_VAR_metal_auth_token: ${{ secrets.METAL_AUTH_TOKEN }}
steps:
- name: Checkout from Github
uses: actions/checkout@v2
- name: Add SHORT_SHA env property with commit short sha
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- name: Install Terraform
uses: hashicorp/setup-terraform@v1
with:
terraform_version: ${{ env.TF_VERSION }}
# Initialize a new or existing Terraform working directory by creating initial files, loading any remote state, downloading modules, etc.
- name: Initialize Terraform, Modules, and Plugins
id: init
run: terraform init -input=false
- id: project
uses: displague/[email protected]
env:
METAL_AUTH_TOKEN: ${{ secrets.METAL_AUTH_TOKEN }}
# Configure an SSH Agent with a key that can access the project
- name: SSH Agent
run: |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add <(echo $METAL_SSH_PRIVATE_KEY_BASE64 | base64 -d)
# Arrays of strings are hard to define via TF env vars (in yaml)
- run: |
echo 'metal_facilities = ["da11"]' > terraform.tfvars
echo 'metal_project_id = "${{ steps.project.outputs.projectID }}"' >> terraform.tfvars
- name: Terraform Plan
id: plan
timeout-minutes: 45
run: terraform plan -out=tfplan -input=false
- name: Terraform Apply
id: apply
timeout-minutes: 45
run: terraform apply -input=false tfplan
- name: Terraform Destroy
id: destroy
if: ${{ always() }}
run: terraform destroy -input=false -auto-approve
- name: Project Delete
if: ${{ always() }}
uses: displague/[email protected]
env:
METAL_PROJECT_ID: ${{ steps.project.outputs.projectID }}
METAL_AUTH_TOKEN: ${{ secrets.METAL_AUTH_TOKEN }}