Skip to content

Instantly share code, notes, and snippets.

@dorellango
Created September 26, 2019 13:01
Show Gist options
  • Select an option

  • Save dorellango/0df535c38ed742ad8c496f46cc43b3c4 to your computer and use it in GitHub Desktop.

Select an option

Save dorellango/0df535c38ed742ad8c496f46cc43b3c4 to your computer and use it in GitHub Desktop.
CodeBuild - Example
version: 0.2
#env:
#variables:
# key: "value"
# key: "value"
#parameter-store:
# key: "value"
# key: "value"
#git-credential-helper: yes
phases:
install:
#If you use the Ubuntu standard image 2.0 or later, you must specify runtime-versions.
#If you specify runtime-versions and use an image other than Ubuntu standard image 2.0, the build fails.
runtime-versions:
nodejs: 10
# name: version
#commands:
# - command
# - command
pre_build:
commands:
- npm i -g jest
# - command
build:
commands:
- node --version
- npm --version
- npm install
- npm run test
post_build:
commands:
- sls deploy --stage dev
# - command
#artifacts:
#files:
# - location
# - location
#name: $(date +%Y-%m-%d)
#discard-paths: yes
#base-directory: location
#cache:
#paths:
# - paths
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment