Skip to content
Snippets Groups Projects
Commit d909d48c authored by Rajmund Hruška's avatar Rajmund Hruška
Browse files

Update .gitlab-ci.yml file

parent 08115228
No related branches found
No related tags found
No related merge requests found
Pipeline #9142 passed
...@@ -46,11 +46,10 @@ check-deprecation-warnings: ...@@ -46,11 +46,10 @@ check-deprecation-warnings:
- "if [[ $(grep DeprecationWarning errors.log) ]]; then cat errors.log; exit 1; fi" - "if [[ $(grep DeprecationWarning errors.log) ]]; then cat errors.log; exit 1; fi"
allow_failure: true allow_failure: true
.build-job: build-job:
stage: build stage: build
script: script:
- make deps-build-whl - echo "build job"
- make build-whl
artifacts: artifacts:
paths: paths:
- dist - dist
...@@ -62,7 +61,7 @@ check-deprecation-warnings: ...@@ -62,7 +61,7 @@ check-deprecation-warnings:
changes: changes:
- lib/mentat/__init__.py - lib/mentat/__init__.py
.sphinx-metadata-job: sphinx-metadata-job:
stage: build stage: build
before_script: [] before_script: []
script: script:
...@@ -81,15 +80,10 @@ check-deprecation-warnings: ...@@ -81,15 +80,10 @@ check-deprecation-warnings:
- devel - devel
- release - release
.twine-job: twine-job:
stage: deploy stage: deploy
script: script:
- make deps-python-dev - echo "twine"
- printf "[pypi]\nusername = __token__\npassword = $TWINE_TOKEN\n" > .pypirc # Set credentials for pypi.org
- mkdir dist2
- cp dist/*.whl dist/*.tar.gz dist2/. # Get only .whl and .tar.gz files
- python -m twine upload 'dist2/*' --skip-existing --config-file .pypirc # Upload to pypi.org
- TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist2/* # Upload to GitLab's package registry
only: only:
refs: refs:
- master - master
...@@ -120,14 +114,10 @@ check-deprecation-warnings: ...@@ -120,14 +114,10 @@ check-deprecation-warnings:
- devel - devel
- release - release
.deb-job: deb-job:
stage: deploy stage: deploy
script: script:
- case "$CI_COMMIT_BRANCH" in "devel") SUITE="development" ;; "release") SUITE="release" ;; "master") SUITE="production" ;; esac - echo "deb job"
- make deps-build-deb
- make build-deb BUILD_NUMBER=$CI_PIPELINE_ID BUILD_SUITE=$SUITE
- DEB_VERSION=$(ls debdist | grep -v latest)
- curl --request PUT --user "gitlab-ci-token:$CI_JOB_TOKEN" "$CI_API_V4_URL/projects/$CI_PROJECT_ID/packages/debian/$DEB_VERSION?distribution=$SUITE&component=main" --upload-file "debdist/$DEB_VERSION"
only: only:
refs: refs:
- devel - devel
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment