Skip to content

Instantly share code, notes, and snippets.

@nandotorres
Created December 12, 2016 20:56
Show Gist options
  • Save nandotorres/e8c6b1f8631742daae346b6555dfa068 to your computer and use it in GitHub Desktop.
Save nandotorres/e8c6b1f8631742daae346b6555dfa068 to your computer and use it in GitHub Desktop.
Pipeline definition for CI/CD of infrastructure
stages:
- quality
- unitTests
- compliance
- build
- deploy
rubocop:
stage: quality
script:
- chef exec rubocop --format offenses
tags:
- techtalk
foodcritic:
stage: quality
script:
- chef exec foodcritic . -X test
tags:
- techtalk
chefspec:
stage: unitTests
script:
- chef exec rspec -f d --color --tty
tags:
- techtalk
kitchen+inspec:
stage: compliance
script:
- chef exec bundle install
- chef exec berks install
- chef exec kitchen create
- chef exec kitchen converge
- chef exec kitchen verify
- chef exec kitchen destroy
tags:
- techtalk
packer:
stage: build
before_script:
- chmod +x packer_build.sh
script:
- ./packer_build.sh
tags:
- techtalk
aws-cli:
stage: deploy
before_script:
- chmod +x run_instance.sh
script:
- ./run_instance.sh
when: manual
tags:
- techtalk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment