Skip to content

Instantly share code, notes, and snippets.

@chl03ks
Forked from marcelog/buildspec.yml
Created October 11, 2017 19:48
Show Gist options
  • Save chl03ks/1d746e29f6b4c8116340cc7577163117 to your computer and use it in GitHub Desktop.
Save chl03ks/1d746e29f6b4c8116340cc7577163117 to your computer and use it in GitHub Desktop.
Example for buildspec file for Amazon CodeBuild and Amazon CodePipeline to achieve Continuous Integration and Continuous Delivery for a ServerLess project
version: 0.1
phases:
install:
commands:
- printenv
- npm install
build:
commands:
- npm run build
post_build:
commands:
- mkdir -p build
- tar jcf build/myApp-$(date +%Y%m%d%H%m%S).tar.bz2 .eslintrc.js .gitignore README.md buildspec.yml package.json serverless.yml src test
- npm install -g serverless
- serverless -v -s $(echo ${CODEBUILD_INITIATOR} | cut -d'/' -f2 | cut -d'_' -f3) deploy
artifacts:
files:
- build*/**
discard-paths: yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment