En raison du déménagement des baies serveurs, les services gitlab.irstea.fr et mattermost.irstea.fr seront interrompus le samedi 2 octobre 2021 au matin. Ils devraient revenir à la normale dans la journée.

.gitlab-ci.yml 993 Bytes
Newer Older
1
2
3
include:
  - local: 'prezbuilder-ci.yml'

4
default:
5
6
7
8
  retry: 2
  interruptible: true

stages:
9
  - test
10
  - build
11
12
  - deploy

13
14
15
lint:
  stage: test
  tags: [docker]
16
  image: node:12-buster
Guillaume Perréal's avatar
Guillaume Perréal committed
17
18
  variables:
    NPM_CONFIG_CACHE: "$CI_PROJECT_DIR/.npm"
19
  script:
20
    - npm install
21
    - npm run lint
Guillaume Perréal's avatar
Guillaume Perréal committed
22
  cache:
23
    key: "$CI_COMMIT_REF_SLUG-$CI_JOB_NAME"
Guillaume Perréal's avatar
Guillaume Perréal committed
24
25
    paths:
      - "$NPM_CONFIG_CACHE"
26

27
docker-image:
28
29
30
  stage: build
  tags: [dind]
  variables:
31
32
33
    IMAGE: "${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME}"
    PREZBUILDER_IMAGE: "${CI_REGISTRY_IMAGE}"
    PREZBUILDER_TAG: "${CI_COMMIT_REF_NAME}"
34
  script:
35
    - set -x
36
    - docker pull "${IMAGE}" || exit 0
37
    - docker build --cache-from "${IMAGE}" --tag "${IMAGE}" .
38
    - bash -x bin/prezbuilder-docker build src public
39
    - "[ -e public/index.html ]"
40
    - docker push "${IMAGE}"
41

42
pages:
43
44
45
  extends: .prezbuilder
  variables:
    PREZBUILDER_IMAGE: "$CI_REGISTRY_IMAGE"
46
    PREZBUILDER_TAG: "$CI_COMMIT_REF_NAME"
Guillaume Perréal's avatar
Guillaume Perréal committed
47
  rules:
48
    - if: $CI_COMMIT_TAG