.gitlab-ci.yml 1.38 KB
Newer Older
1 2 3
stages:
- validate
- generate
4
- deploy
5

6 7 8 9 10 11 12 13 14 15
rubocop:
  stage: validate
  tags:
   - grid5000-docker
  image: debian:stretch
  script:
      - echo "deb http://deb.debian.org/debian/ stretch-backports main" >> /etc/apt/sources.list.d/stretch-backports.list
      - apt-get update && apt-get -y install rubocop/stretch-backports
      - rubocop --fail-level W

16 17 18
validate-data:
   stage: validate
   tags:
19
    - grid5000-docker
20 21
   image: debian:stretch
   script:
22
    - apt-get update && apt-get -y install ruby rake ruby-hashdiff ruby-ipaddress wget
23
    - gem install hash_validator
24 25 26
      # Add G5K CA certificate
    - wget --no-check-certificate -q https://www.grid5000.fr/certs/ca.grid5000.fr.crt -O /usr/local/share/ca-certificates/ca.grid5000.fr.crt
    - /usr/sbin/update-ca-certificates
27 28 29
    - rake valid:schema
    - rake valid:duplicates
    - rake valid:homogeneity
30

Lucas Nussbaum's avatar
Lucas Nussbaum committed
31
generate-reference-api:
32
   stage: generate
Lucas Nussbaum's avatar
Lucas Nussbaum committed
33
   tags:
34
    - grid5000-docker
Lucas Nussbaum's avatar
Lucas Nussbaum committed
35 36
   image: debian:stretch
   script:
37
    - apt-get update && apt-get -y install ruby rake ruby-hashdiff git ruby-ipaddress
Lucas Nussbaum's avatar
Lucas Nussbaum committed
38
    - gem install hash_validator
39
    - export TZ=Europe/Paris
Lucas Nussbaum's avatar
Lucas Nussbaum committed
40
    - rake reference-api
41
    - git status
42
    - echo "Checking that git status output is empty..."
Lucas Nussbaum's avatar
Lucas Nussbaum committed
43
    - sh -c '[ "`git status -s`" = "" ]'
44
    - git diff --exit-code
45 46 47 48 49 50 51

deploy:
   stage: deploy
   tags:
    - grid5000-shell
   script:
    - /srv/ci-runner-scripts/bin/update-api-servers