Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Grib Processor
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Max Drexler
Grib Processor
Commits
8cff21a5
Commit
8cff21a5
authored
8 months ago
by
Max Drexler
Browse files
Options
Downloads
Patches
Plain Diff
fix deploy rules
parent
12ba4873
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+24
-7
24 additions, 7 deletions
.gitlab-ci.yml
with
24 additions
and
7 deletions
.gitlab-ci.yml
+
24
−
7
View file @
8cff21a5
...
...
@@ -45,19 +45,40 @@ build-req-image:
changes
:
-
.meta/Dockerfile
.on-file-change
:
rules
:
-
if
:
$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
changes
:
paths
:
-
grib_processor/**/*
-
if
:
$CI_PIPELINE_SOURCE == 'merge_request_event'
when
:
always
-
if
:
$CI_COMMIT_TAG
when
:
always
.on-new-version
:
rules
:
-
if
:
$CI_PIPELINE_SOURCE == 'merge_request_event'
when
:
never
-
if
:
$CI_COMMIT_TAG =~ /\d+\.\d+\.\d+$/
when
:
always
test::lint
:
stage
:
test
extends
:
.on-file-change
script
:
-
python -m ruff format --check --diff --target-version py38
-
python -m ruff check --diff --target-version py38
test::static-analysis
:
stage
:
test
extends
:
.on-file-change
script
:
-
python -m mypy grib_processor/
test::unit
:
stage
:
test
extends
:
.on-file-change
script
:
-
python -m coverage run -m pytest
-
python -m coverage report
...
...
@@ -74,9 +95,7 @@ test::unit:
deploy::build
:
stage
:
deploy
rules
:
-
if
:
$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
-
if
:
$CI_COMMIT_TAG =~ /\d+\.\d+\.\d+$/
extends
:
.on-new-version
before_script
:
pip install build
script
:
...
...
@@ -89,10 +108,8 @@ deploy::build:
deploy::package::release
:
stage
:
deploy
rules
:
-
if
:
$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
-
if
:
$CI_COMMIT_TAG =~ /\d+\.\d+\.\d+$/
extends
:
.on-new-version
before_script
:
pip install twine
script
:
-
TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url ${PACKAGE_REGISTRY_URL}
dist/*
-
TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url ${PACKAGE_REGISTRY_URL}
./
dist/*
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment