.gitlab-ci.yml 568 Bytes
Newer Older
Max Hartmann's avatar
Max Hartmann committed
1 2 3
# Node docker image on which our code would run
image: node:10.5.0

Max Hartmann's avatar
Max Hartmann committed
4 5 6 7 8 9
cache:
  key: ${CI_COMMIT_REF_SLUG}
  paths:
    - node_modules/
    - dist/

Max Hartmann's avatar
Max Hartmann committed
10 11 12 13 14 15
#This command is run before all the jobs
before_script:
  - npm install

stages:
  - test
Max Hartmann's avatar
Max Hartmann committed
16
  - build
Max Hartmann's avatar
Max Hartmann committed
17
  - deploy
Max Hartmann's avatar
Max Hartmann committed
18 19 20 21 22 23 24 25
lint:
  stage: test
  script:
    - npm run lint
test:
  stage: test
  script:
    - npm run test
Max Hartmann's avatar
Max Hartmann committed
26 27 28 29 30

build:
  stage: build
  script:
    - npm run build
Max Hartmann's avatar
Max Hartmann committed
31 32 33

deploy:
  stage: deploy
Max Hartmann's avatar
Max Hartmann committed
34
  image: python:2.7
Max Hartmann's avatar
Max Hartmann committed
35 36 37
  before_script:
    - pip install awsebcli --upgrade --user
  script:
Max Hartmann's avatar
Max Hartmann committed
38
    - /root/.local/bin/eb deploy mynode-dev