Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sid
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
sid
Commits
93a98e17
Commit
93a98e17
authored
2 months ago
by
Corné Lukken
Browse files
Options
Downloads
Plain Diff
Merge branch 'publish-pypi-sid' into 'main'
Add publish job for sid See merge request
!7
parents
d055ce40
215fccfc
No related branches found
No related tags found
1 merge request
!7
Add publish job for sid
Pipeline
#110260
passed with warnings
2 months ago
Stage: prepare
Stage: lint
Stage: test
Stage: package
Stage: publish
Pipeline: sid
#110261
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+24
-17
24 additions, 17 deletions
.gitlab-ci.yml
setup.cfg
+3
-3
3 additions, 3 deletions
setup.cfg
with
27 additions
and
20 deletions
.gitlab-ci.yml
+
24
−
17
View file @
93a98e17
...
@@ -2,8 +2,6 @@ default:
...
@@ -2,8 +2,6 @@ default:
image
:
image
:
name
:
$CI_REGISTRY_IMAGE/ci-build-runner:$CI_COMMIT_REF_SLUG
name
:
$CI_REGISTRY_IMAGE/ci-build-runner:$CI_COMMIT_REF_SLUG
pull_policy
:
always
pull_policy
:
always
before_script
:
-
python --version
# For debugging
cache
:
cache
:
paths
:
paths
:
-
.cache/pip
-
.cache/pip
...
@@ -33,41 +31,37 @@ trigger_prepare:
...
@@ -33,41 +31,37 @@ trigger_prepare:
strategy
:
depend
strategy
:
depend
include
:
.prepare.gitlab-ci.yml
include
:
.prepare.gitlab-ci.yml
.python_before
:
before_script
:
-
python --version
# For debugging
run_black
:
run_black
:
stage
:
lint
stage
:
lint
extends
:
.python_before
script
:
script
:
-
tox -e black
-
tox -e black
allow_failure
:
true
allow_failure
:
true
run_flake8
:
run_flake8
:
stage
:
lint
stage
:
lint
extends
:
.python_before
script
:
script
:
-
tox -e pep8
-
tox -e pep8
allow_failure
:
true
allow_failure
:
true
run_pylint
:
run_pylint
:
stage
:
lint
stage
:
lint
extends
:
.python_before
script
:
script
:
-
tox -e pylint
-
tox -e pylint
allow_failure
:
true
allow_failure
:
true
sast
:
sast
:
variables
:
variables
:
SAST_EXCLUDED_ANALYZERS
:
brakeman, flawfinder, kubesec, nodejs-scan, phpcs-security-audit,
SAST_EXCLUDED_ANALYZERS
:
brakeman, flawfinder, kubesec, nodejs-scan, phpcs-security-audit,
pmd-apex, security-code-scan, sobelow, spotbugs
pmd-apex, security-code-scan, sobelow, spotbugs
stage
:
test
stage
:
test
dependency_scanning
:
# override default before_script, job won't have Python available
before_script
:
-
uname
secret_detection
:
# override default before_script, job won't have Python available
before_script
:
-
uname
# Basic setup for all Python versions for which we don't have a base image
# Basic setup for all Python versions for which we don't have a base image
.run_unit_test_version_base
:
.run_unit_test_version_base
:
before_script
:
before_script
:
...
@@ -89,6 +83,7 @@ run_unit_tests:
...
@@ -89,6 +83,7 @@ run_unit_tests:
# Run code coverage on the base image thus also performing unit tests
# Run code coverage on the base image thus also performing unit tests
run_unit_tests_coverage
:
run_unit_tests_coverage
:
stage
:
test
stage
:
test
extends
:
.python_before
script
:
script
:
-
tox -e coverage
-
tox -e coverage
coverage
:
'
/(?i)total.*?
(100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
coverage
:
'
/(?i)total.*?
(100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
...
@@ -102,6 +97,7 @@ run_unit_tests_coverage:
...
@@ -102,6 +97,7 @@ run_unit_tests_coverage:
package_files
:
package_files
:
stage
:
package
stage
:
package
extends
:
.python_before
artifacts
:
artifacts
:
expire_in
:
1w
expire_in
:
1w
paths
:
paths
:
...
@@ -111,6 +107,7 @@ package_files:
...
@@ -111,6 +107,7 @@ package_files:
package_docs
:
package_docs
:
stage
:
package
stage
:
package
extends
:
.python_before
artifacts
:
artifacts
:
expire_in
:
1w
expire_in
:
1w
paths
:
paths
:
...
@@ -118,9 +115,20 @@ package_docs:
...
@@ -118,9 +115,20 @@ package_docs:
script
:
script
:
-
tox -e docs
-
tox -e docs
publish_on_pypi
:
stage
:
publish
environment
:
pypi
needs
:
-
package_files
when
:
manual
rules
:
-
if
:
'
$CI_COMMIT_TAG
&&
$CI_COMMIT_REF_PROTECTED
==
"true"'
script
:
-
echo "run twine for pypi"
-
|
TWINE_PASSWORD="${PYPI_TOKEN}" \
TWINE_USERNAME="__token__" \
python -m twine upload dist/*
publish_on_gitlab
:
publish_on_gitlab
:
stage
:
publish
stage
:
publish
...
@@ -137,7 +145,6 @@ publish_on_gitlab:
...
@@ -137,7 +145,6 @@ publish_on_gitlab:
python -m twine upload \
python -m twine upload \
--repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/*
--repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/*
publish_to_readthedocs
:
publish_to_readthedocs
:
stage
:
publish
stage
:
publish
allow_failure
:
true
allow_failure
:
true
...
...
This diff is collapsed.
Click to expand it.
setup.cfg
+
3
−
3
View file @
93a98e17
...
@@ -7,7 +7,7 @@ url = https://git.astron.nl/lofar2.0/sid
...
@@ -7,7 +7,7 @@ url = https://git.astron.nl/lofar2.0/sid
license
=
Apache License 2.0
license
=
Apache License 2.0
classifiers
=
classifiers
=
Development
Status
::
3
-
Alpha
Development
Status
::
3
-
Alpha
Environment
::
Web
Environment
Environment
::
Plugins
Intended
Audience
::
Developers
Intended
Audience
::
Developers
Intended
Audience
::
Science/Research
Intended
Audience
::
Science/Research
License
::
OSI
Approved
::
Apache
Software
License
License
::
OSI
Approved
::
Apache
Software
License
...
@@ -20,10 +20,10 @@ classifiers =
...
@@ -20,10 +20,10 @@ classifiers =
Programming
Language
::
Python
::
3.10
Programming
Language
::
Python
::
3.10
Programming
Language
::
Python
::
3.11
Programming
Language
::
Python
::
3.11
Programming
Language
::
Python
::
3.12
Programming
Language
::
Python
::
3.12
Topic
::
Internet
::
WWW/HTTP
Topic
::
Software
Development
::
Libraries
Topic
::
Internet
::
WWW/HTTP
::
Dynamic
Content
Topic
::
Scientific/Engineering
Topic
::
Scientific/Engineering
Topic
::
Scientific/Engineering
::
Astronomy
Topic
::
Scientific/Engineering
::
Astronomy
Topic
::
Scientific/Engineering
::
Interface
Engine/Protocol
Translator
[options]
[options]
include_package_data
=
true
include_package_data
=
true
...
...
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