Created
May 23, 2017 11:59
-
-
Save g-dormoy/592777b0c9da7f73653f8bdb9596a495 to your computer and use it in GitHub Desktop.
This file contains 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
image: node:7.6.0 | |
cache: | |
paths: | |
- node_modules/ | |
stages: | |
- test | |
- style | |
- build | |
- deploy | |
unit_test: | |
stage: test | |
script: | |
- npm install | |
- npm run unit | |
e2e_test: | |
stage: test | |
script: | |
# Install Chrome | |
- set -xe | |
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - | |
- echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list | |
- apt-get update -yqqq | |
# Install java with the requiered version | |
- apt-get install -y software-properties-common | |
- add-apt-repository "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | |
- apt-get update | |
# Force Yes on java license prompt | |
- echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections | |
- echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections | |
# Install all the things | |
- apt-get install -y google-chrome-stable xvfb oracle-java8-installer | |
- xvfb-run -a npm run e2e | |
lint: | |
stage: style | |
script: | |
- npm run lint | |
build: | |
stage: build | |
image: node:latest | |
script: | |
- npm run build | |
artifacts: | |
paths: | |
- dist/ | |
deploy_staging: | |
environment: staging | |
stage: deploy | |
image: python:latest | |
dependencies: | |
- build | |
script: | |
- pip install awscli | |
- ls | |
- aws s3 cp ./dist s3://$S3_STAGING_BUCKET_NAME --recursive --region eu-west-2 | |
except: | |
- master | |
deploy: | |
environment: production | |
stage: deploy | |
image: python:latest | |
dependencies: | |
- build | |
script: | |
- pip install awscli | |
- ls | |
- aws s3 cp ./dist s3://$S3_BUCKET_NAME --recursive --region eu-west-2 | |
only: | |
- master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment