Last active
March 29, 2020 17:21
-
-
Save soerenmartius/3eef5b91bd76457070e9a3281e00943e to your computer and use it in GitHub Desktop.
SemaphoreCI Terraform Deployment Pipeline.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: v1.0 | |
name: "Deploy to GitHub" | |
agent: | |
machine: | |
type: e1-standard-2 | |
os_image: ubuntu1804 | |
global_job_config: | |
env_vars: | |
- name: BUILD_TOOLS_VERSION | |
value: v0.1.1 | |
- name: TF_IN_AUTOMATION | |
value: "yes" | |
- name: TERRAFORM_PLANFILE | |
value: "out.tfplan" | |
secrets: | |
- name: github_access_token | |
- name: aws_access_credentials | |
prologue: | |
commands: | |
- checkout --use-cache | |
blocks: | |
- name: "Deploy" | |
task: | |
prologue: | |
commands: | |
- cache restore terraform-wd-$SEMAPHORE_GIT_BRANCH | |
- cache restore terraform-planfile-$SEMAPHORE_GIT_BRANCH | |
jobs: | |
- name: "Terraform Apply" | |
commands: | |
- make terraform-apply | |
- cache clear |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment