Skip to content

Instantly share code, notes, and snippets.

@driesdesmet
Created July 14, 2020 12:48
Show Gist options
  • Select an option

  • Save driesdesmet/5a19fd1fd88232ad0cd89662fc840bb5 to your computer and use it in GitHub Desktop.

Select an option

Save driesdesmet/5a19fd1fd88232ad0cd89662fc840bb5 to your computer and use it in GitHub Desktop.
stages:
- build
- test
- deploy
build:
stage: build
image: node:lts
script:
- npm install
- echo "==> Building on branch $CI_COMMIT_BRANCH"
- ./scripts/build -m $CI_COMMIT_BRANCH
artifacts:
paths:
- dist/
cache:
paths:
- node_modules/
test:
stage: test
image: node:lts
script:
- npm install
- echo "==> Running tests on branch $CI_COMMIT_BRANCH"
- ./scripts/test
cache:
paths:
- node_modules/
deploy:
stage: deploy
image: registry.gitlab.com/gitlab-org/cloud-deploy/aws-base:latest
script:
- echo "==> Deploying branch $CI_COMMIT_BRANCH"
- ./scripts/deploy -t $CI_COMMIT_BRANCH
only:
- development
- staging
- production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment