Skip to content

Commit a49d97c

Browse files
committed
[CI] Update gitlab ci
1 parent 8c1a699 commit a49d97c

File tree

2 files changed

+25
-40
lines changed

2 files changed

+25
-40
lines changed

.gitlab-ci.yml

Lines changed: 23 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ variables:
44
stages:
55
- lint
66
- test
7-
- version
87
- build
98
- deploy
109
- release
@@ -51,57 +50,44 @@ qgis-server:
5150
#
5251
# Packages
5352
#
53+
workflow:
5454

55-
56-
57-
version:
55+
build:
5856
image: $REGISTRY_URI/factory-ci-runner:qgis-plugin-ci
57+
stage: build
5958
tags:
6059
- factory-plain
6160
rules:
62-
- if: $RELEASE_BRANCH == "true"
63-
stage: version
61+
- if: '$CI_COMMIT_TAG =~ /^(?:release-|v)?\d+\.\d+\.\d+(?:-.*)?$/'
62+
variables:
63+
PRERELEASE: ""
64+
STATUS: stable
65+
- if: $RELEASE_BRANCH == "true"
66+
variables:
67+
PRERELEASE: "--pre"
68+
STATUS: unstable
6469
script:
65-
- version-helper > build.env
66-
- cat build.env
70+
- echo "Building plugin ${PRODUCT_NAME} STATUS=${STATUS}"
71+
- yapt-pkg package $PRERELEASE
72+
- echo "PACKAGE=`ls -1 *.zip`" > build.env
73+
- echo "STATUS=$STATUS" >> build.env
74+
- cat build.env
6775
artifacts:
6876
reports:
6977
dotenv: build.env
70-
71-
72-
build:
73-
image: $REGISTRY_URI/factory-ci-runner:qgis-plugin-ci
74-
tags:
75-
- factory-plain
76-
rules:
77-
- if: $RELEASE_BRANCH == "true"
78-
dependencies:
79-
- version
80-
stage: build
81-
script:
82-
- qgis-plugin-ci package ${VERSION}
83-
artifacts:
84-
untracked: true
85-
expose_as: 'QGIS package'
8678
paths:
87-
- ${PRODUCT_NAME}.${VERSION}.zip
88-
79+
- "*.zip"
8980

9081
deploy:
9182
image: $REGISTRY_URI/factory-ci-runner:fabric-ci
83+
stage: deploy
9284
tags:
9385
- fabric
94-
rules:
95-
- if: $RELEASE_BRANCH == "true"
96-
stage: deploy
9786
dependencies:
98-
- version
9987
- build
10088
script:
101-
- upload_plugins ${PRODUCT_NAME} ${PRODUCT_NAME}.${VERSION}.zip ${STATUS}
89+
- upload_plugins ${PRODUCT_NAME} ${PACKAGE} ${STATUS}
10290
- update-snap-qgis-plugins
103-
variables:
104-
PLUGIN_SERVER_URL: "https://qgis-plugins.3liz.org"
10591

10692
#
10793
# Release
@@ -115,8 +101,11 @@ release:
115101
tags:
116102
- factory-plain
117103
stage: release
104+
dependencies:
105+
- build
106+
- deploy
118107
rules:
119-
- if: '$CI_COMMIT_TAG =~ /^(?:release-)?\d+\.\d+\.\d+(?:-.*)?$/'
108+
- if: $STATUS == "stable"
120109
script:
121110
- create_ticket.py
122111
- gitlab_release

pyproject.toml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,9 @@ lint = [
4646
"bandit",
4747
"lxml-stubs",
4848
]
49-
packaging = [
50-
"qgis-plugin-package-ci; python_full_version >= '3.12'",
51-
]
52-
53-
[tool.uv.sources]
54-
qgis-plugin-package-ci = { git = "https://github.com/3liz/qgis-plugin-package-ci.git" }
5549

50+
[tool.yapt]
51+
plugin_source = "lizmap_server"
5652

5753
# Ruff configuration
5854
# See https://doc.astral.sh/ruff/configuration

0 commit comments

Comments
 (0)