Created
July 14, 2020 12:48
-
-
Save driesdesmet/5a19fd1fd88232ad0cd89662fc840bb5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| 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