.gitlab-ci.yml 3.54 KB
Newer Older
Noé Gaumont's avatar
Noé Gaumont committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
---
default:
  image: python:3.7

include:
  # uncomment and uses to customize/extend the configuration here if needed
  # (it needs to be at the same level than "- project")
  # - ".gitlab-ci-extended.yml"
  - project: "open-source/gitlab-ci-templates"
    ref: "branch/default"
    file:
      - "templates/no-duplicated-ci-pipelines.yml"  # use workflow to avoid duplicated pipelines
      - "templates/lint/flake8.yml"  # will do the equivalent of 'tox -e flake8'
      - "templates/lint/mypy.yml"  # will do the equivalent of 'tox -e mypy'
      - "templates/lint/check-manifest.yml"  # will do the equivalent of 'tox -e check-manifest'
      - "templates/lint/yamllint.yml"  # will do the equivalent of 'tox -e yamllint'
      - "templates/tests/py3.yml"  # will do the equivalent of 'tox -e py3'
      - "templates/build-debian-package.yml"  # will build a .deb and upload it to heptapod files
      - "templates/create-release-on-heptapod-including-debian-package.yml"  # this will create a release on heptapod AND uses uploaded .deb by build-debian-package
      - "templates/upload-to-pypi.yml"  # on a new mercurial tag (expected to be done with release-new), will push a release on pypi
21

22
stages:
23
  - lint
24
25
  - tests
  - after-tests
Noé Gaumont's avatar
Noé Gaumont committed
26
27
28
29
  - build-debian-package
  - upload-deb-to-heptapod
  - release
  - publish
30

31
trigger-cubicweb-pipeline:
32
  stage: after-tests
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
  except:
    variables:
      - $TRIGGERED_FROM_OTHER_PROJECT && $TRIGGERED_FROM_OTHER_PROJECT != "logilab-common"
  variables:
    TRIGGERED_FROM_OTHER_PROJECT: "logilab-common"
  trigger:
    project: cubicweb/cubicweb
    branch: branch/default
    strategy: depend

trigger-yams-pipeline:
  stage: after-tests
  except:
    variables:
      - $TRIGGERED_FROM_OTHER_PROJECT && $TRIGGERED_FROM_OTHER_PROJECT != "logilab-common"
  variables:
    TRIGGERED_FROM_OTHER_PROJECT: "logilab-common"
  trigger:
    project: open-source/yams
    branch: branch/default
    strategy: depend

trigger-rql-pipeline:
  stage: after-tests
  except:
    variables:
      - $TRIGGERED_FROM_OTHER_PROJECT && $TRIGGERED_FROM_OTHER_PROJECT != "logilab-common"
  variables:
    TRIGGERED_FROM_OTHER_PROJECT: "logilab-common"
  trigger:
Laurent Peuch's avatar
Laurent Peuch committed
63
    project: CubicWeb/RQL
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
    branch: branch/default
    strategy: depend

trigger-logilab-database-pipeline:
  stage: after-tests
  except:
    variables:
      - $TRIGGERED_FROM_OTHER_PROJECT && $TRIGGERED_FROM_OTHER_PROJECT != "logilab-common"
  variables:
    TRIGGERED_FROM_OTHER_PROJECT: "logilab-common"
  trigger:
    project: open-source/logilab-database
    branch: branch/default
    strategy: depend

trigger-logilab-constraint-pipeline:
  stage: after-tests
  except:
    variables:
      - $TRIGGERED_FROM_OTHER_PROJECT && $TRIGGERED_FROM_OTHER_PROJECT != "logilab-common"
  variables:
    TRIGGERED_FROM_OTHER_PROJECT: "logilab-common"
  trigger:
    project: open-source/logilab-constraint
    branch: branch/default
    strategy: depend

trigger-logilab-mtconverter-pipeline:
  stage: after-tests
  except:
    variables:
      - $TRIGGERED_FROM_OTHER_PROJECT && $TRIGGERED_FROM_OTHER_PROJECT != "logilab-common"
  variables:
    TRIGGERED_FROM_OTHER_PROJECT: "logilab-common"
  trigger:
    project: open-source/logilab-mtconverter
    branch: branch/default
    strategy: depend
102
103

trigger-readthedocs:
104
105
106
  only:
    refs:
      - branch/default
107
108
  stage: after-tests
  script:
109
110
    # regarding the " everywhere when there is a '%': yaml is extremly weird when % are involved
    - curl -X POST -d "token=${READTHEDOCS_TOKEN}" https://readthedocs.org/api/v2/webhook/logilab-common/89595/ -w "\nhttp code:"\ "%{http_code}\n" -f