-
Notifications
You must be signed in to change notification settings - Fork 9
/
.gitlab-ci.yml
42 lines (39 loc) · 1.23 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
stages:
- build_and_tag
variables:
GIT_STRATEGY: "clone"
GIT_SUBMODULE_STRATEGY: recursive
job-build:
stage: build_and_tag
image: docker:25.0.3-cli-alpine3.19
services:
- docker:dind
script:
- apk update && apk add python3 py3-pip
- python3 -m pip install -r requirement-uv.txt --break-system-packages
- uv sync --frozen --no-install-project
- export PYTHONPATH=$(pwd)
- uv run scripts/common/py/run_tests.py
- uv run scripts/multi_build.py
artifacts:
paths:
- "multi-build/zero-*.zip"
when: on_success
expire_in: never
rules:
- when: manual
job-tag:
stage: build_and_tag
script:
- USERNAME="$CUSTOM_CI_USERNAME"
- PASSWORD="$CUSTOM_CI_PASSWORD"
- EMAIL="$CUSTOM_CI_EMAIL"
- TAGNAME="v$(sh scripts/common/py/get_version.sh)"
- git config --global user.name "${USERNAME}"
- git config --global user.email "${EMAIL}"
- git remote remove origin
- git remote add origin https://${USERNAME}:${PASSWORD}@gitlab.com/${CI_PROJECT_PATH}
- if [ $(git tag | grep "$TAGNAME") ]; then echo "[ * ] Tag already exists, skipping.."; else git tag $TAGNAME && git push origin $TAGNAME; fi
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- when: manual