.gitlab-ci.yml 660 Bytes
Newer Older
1
stages:
2
  - test
3
  - build
Zac Wood's avatar
Zac Wood committed
4

Zac Wood's avatar
Zac Wood committed
5
test:
Zac Wood's avatar
Zac Wood committed
6
  image: starefossen/ruby-node:latest
7
  stage: test
8
  script:
Zac Wood's avatar
Zac Wood committed
9
    - cd schedules
Zac Wood's avatar
Zac Wood committed
10
    - bundle install
Zac Wood's avatar
Zac Wood committed
11
    - yarn install
Zac Wood's avatar
Zac Wood committed
12 13
    - rails db:migrate
    - rails test
Zac Wood's avatar
Zac Wood committed
14
    - rubocop
15

Zac Wood's avatar
Zac Wood committed
16
build:
17 18 19 20 21 22
  stage: build
  retry: 2
  image:
    name: gcr.io/kaniko-project/executor:debug
    entrypoint: [""]
  script:
23
    - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
Zac Wood's avatar
Zac Wood committed
24
    - /kaniko/executor --context $CI_PROJECT_DIR/schedules --dockerfile $CI_PROJECT_DIR/schedules/Dockerfile --destination $CI_REGISTRY_IMAGE/api:$CI_COMMIT_TAG
25 26
  only:
    - tags