-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
68 lines (61 loc) · 1.53 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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
63
64
65
66
67
68
# yaml-language-server: $schema=https://gitlab.com/gitlab-org/gitlab/-/raw/master/app/assets/javascripts/editor/schema/ci.json
include:
- project: lksch-group/gitlab-ci-templates
ref: main
file: default-workflow-rules.yml
- project: lksch-group/gitlab-ci-templates
ref: main
file: python.yml
stages:
- test
- build
- watch
- publish
variables:
# Enable access to Gitlab package registry from Poetry
PROJECT_URL: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}
PACKAGE_REGISTRY_URL: ${PROJECT_URL}/packages
.release:
stage: publish
rules:
- if: $CI_COMMIT_TAG
pytest:
extends: .python-poetry-dind
stage: test
tags:
- dind
script:
- export USER=$(id -un)
- poetry run pytest
compose-spec:
stage: watch
script:
- ./create_compose_models.sh
- |-
CHANGES=$(git status --porcelain | wc -l)
if [ "$CHANGES" -gt "0" ]; then
echo "The Upstream docker-compose.yml jsonschema spec has changed"
git status --porcelain
exit 1
fi
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
#publish-wheels:
# extends:
# - .python-poetry
# - .release
# script:
# - poetry build
# - poetry config --local repositories.gitlab ${PACKAGE_REGISTRY_URL}/pypi
# - poetry publish --repository gitlab
create-gitlab-release:
extends: .release
image: registry.gitlab.com/gitlab-org/release-cli:v0.15.0
allow_failure: true
# needs:
# - publish-wheels
script:
- |
release-cli create \
--name $CI_COMMIT_TAG \
--tag-name $CI_COMMIT_TAG