.gitlab-ci.yml 991 Bytes
Newer Older
Sandro Lutz's avatar
Sandro Lutz committed
1
stages:
adietmue's avatar
adietmue committed
2
  - test
scmoritz's avatar
scmoritz committed
3
  - build
adietmue's avatar
adietmue committed
4
  - deploy
Sandro Lutz's avatar
Sandro Lutz committed
5
6

eslint:
adietmue's avatar
adietmue committed
7
8
9
10
  stage: test
  image: node:latest
  before_script:
   - npm install
Sandro Lutz's avatar
Sandro Lutz committed
11
  script:
Sandro Lutz's avatar
Sandro Lutz committed
12
13
14
15
16
17
18
19
20
    - npm run eslint

stylelint:
  stage: test
  image: node:latest
  before_script:
   - npm install
  script:
    - npm run stylelint
scmoritz's avatar
scmoritz committed
21

adietmue's avatar
adietmue committed
22
23
24
build_master:
  stage: build
  image: docker:latest
Sandro Lutz's avatar
Sandro Lutz committed
25
26
  variables:
    GIT_SUBMODULE_STRATEGY: normal
adietmue's avatar
adietmue committed
27
28
29
30
31
32
33
34
35
36
37
  services:
    - docker:dind
  before_script:
    - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
  script:
    - docker build --pull -t "$CI_REGISTRY_IMAGE" ./
    - docker push "$CI_REGISTRY_IMAGE"
  only:
    - master

# On branches except master: verify that build works, do not push to registry
scmoritz's avatar
scmoritz committed
38
39
build:
  stage: build
adietmue's avatar
adietmue committed
40
  image: docker:latest
Sandro Lutz's avatar
Sandro Lutz committed
41
42
  variables:
    GIT_SUBMODULE_STRATEGY: normal
adietmue's avatar
adietmue committed
43
44
45
46
47
48
49
50
51
52
  services:
    - docker:dind
  script:
    - docker build --pull ./
  except:
    - master

deploy:
  stage: deploy
  image: amiveth/service-update-helper
scmoritz's avatar
scmoritz committed
53
  script:
adietmue's avatar
adietmue committed
54
55
56
    - /update.py
  only:
    - master