.gitlab-ci.yml 1.06 KB
Newer Older
1
2
3
4
5
image: python:3.7

before_script:
  - pip install tox

6
7
8
9
10
11
12

stages:
  - lint
  - tests
  - release


13
check-manifest:
14
  stage: lint
15
16
17
  script: tox -e check-manifest

flake8:
18
  stage: lint
19
20
21
  script: tox -e flake8

py3:
22
  stage: tests
23
  image: ${CI_REGISTRY}/cubicweb/dockerfiles/buster-slim-pg11-ldap
24
  script: tox -e py3
25
26
27
  artifacts:
    paths:
      - py3-deprecated-warnings.json
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42

image_build_latest:
  stage: release
  image:
    name: gcr.io/kaniko-project/executor:debug
    entrypoint: [""]
  script:
    - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
    - /kaniko/executor
      --context $CI_PROJECT_DIR
      --dockerfile $CI_PROJECT_DIR/Dockerfile
      --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_HG_SHORT_SHA
      --destination $CI_REGISTRY_IMAGE:latest
  rules:
    - if: '$CI_COMMIT_REF_NAME == "branch/default"'
43
44
45
46
47
48
49
50
51
52
53

yamllint:
  stage: lint
  rules:
    - changes:
        - "**/*.yaml"
        - "*.yaml"
        - "**/*.yml"
        - "*.yml"
  script:
    - tox -e yamllint