12 Commits

Author SHA1 Message Date
9e3ffd6230 Updating for version 0.7.10 2024-09-08 23:40:15 +02:00
bdc71f15c1 Build in separate folders for prod and test envs 2024-09-08 23:39:08 +02:00
c3398ef4e5 Fix anaconda upload 2024-09-08 22:32:51 +02:00
9b33f1152b Fix tagged prod deployments 2024-09-08 22:32:51 +02:00
dc1f2a92cc Utility style fix 2024-09-05 17:26:47 +02:00
e9ae52bb60 Use locally built package in deployment
[skip ci]
2024-09-05 15:00:04 +02:00
982887ab85 Split build-and-publish job
[skip ci]
2024-09-05 14:58:01 +02:00
19e934e873 Run pipeline only on default branch changes 2024-09-05 13:21:11 +02:00
8604d695c6 Extract conda activation into before_script
[skip ci]
2024-09-05 11:11:40 +02:00
a55295829f Add cleanup stage
[skip ci]
2024-09-05 11:05:13 +02:00
4181d597a8 Fix home link
[skip ci]
2024-07-12 11:34:53 +02:00
c4869fb0cd Delay deploy-prod job by 1 min
conda doesn't show a newly uploaded package after only 5 sec
2024-07-12 11:04:54 +02:00
5 changed files with 39 additions and 24 deletions

View File

@ -1,43 +1,58 @@
stages:
- build-and-publish
- build
- deploy
- publish
- cleanup
build-and-publish:
stage: build-and-publish
workflow:
rules:
- if: $CI_COMMIT_TAG
script:
variables:
BUILD_PATH: /home/pyzebra/build-prod
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
variables:
BUILD_PATH: /home/pyzebra/build-test
default:
before_script:
- source /opt/miniconda3/etc/profile.d/conda.sh
build-job:
stage: build
script:
- conda config --add channels conda-forge
- conda config --set solver libmamba
- conda config --set anaconda_upload yes
- conda build --token $ANACONDA_TOKEN /opt/pyzebra/conda-recipe
- conda build --no-anaconda-upload --output-folder $BUILD_PATH ./conda-recipe
deploy-test:
deploy-test-job:
stage: deploy
environment: testing
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script:
- cd /opt/pyzebra
- git pull origin main --tags
- source /opt/miniconda3/etc/profile.d/conda.sh
- conda activate test
- conda build ./conda-recipe
- conda install --use-local --only-deps pyzebra -y
- conda build purge-all
- conda install --channel $BUILD_PATH --force-reinstall pyzebra -y
- sudo systemctl restart pyzebra-test.service
deploy-prod:
deploy-prod-job:
stage: deploy
environment: production
needs: ["build-and-publish"]
rules:
- if: $CI_COMMIT_TAG
when: delayed
start_in: 5 seconds
script:
- source /opt/miniconda3/etc/profile.d/conda.sh
- conda activate prod
- conda update pyzebra -y
- conda install --channel $BUILD_PATH pyzebra -y
- sudo systemctl restart pyzebra-prod.service
publish-job:
stage: publish
rules:
- if: $CI_COMMIT_TAG
script:
- conda activate base
- anaconda --token $ANACONDA_TOKEN upload $(conda build --output-folder $BUILD_PATH ./conda-recipe --output)
cleanup-job:
stage: cleanup
script:
- conda build purge-all

View File

@ -28,7 +28,7 @@ requirements:
about:
home: https://github.com/paulscherrerinstitute/pyzebra
home: https://gitlab.psi.ch/zebra/pyzebra
summary: {{ data['description'] }}
license: GNU GPLv3
license_file: LICENSE

View File

@ -6,4 +6,4 @@ from pyzebra.sxtal_refgen import *
from pyzebra.utils import *
from pyzebra.xtal import *
__version__ = "0.7.9"
__version__ = "0.7.10"

View File

@ -364,7 +364,7 @@ def create():
_update_proj_plots()
proj_auto_checkbox = CheckboxGroup(
labels=["Projections Intensity Range"], active=[0], width=145, margin=[10, 5, 0, 5]
labels=["Projections Intensity Range:"], active=[0], width=145, margin=[10, 5, 0, 5]
)
proj_auto_checkbox.on_change("active", proj_auto_checkbox_callback)

View File

@ -689,7 +689,7 @@ def create():
_update_image()
main_auto_checkbox = CheckboxGroup(
labels=["Frame Intensity Range"], active=[0], width=145, margin=[10, 5, 0, 5]
labels=["Frame Intensity Range:"], active=[0], width=145, margin=[10, 5, 0, 5]
)
main_auto_checkbox.on_change("active", main_auto_checkbox_callback)
@ -721,7 +721,7 @@ def create():
_update_proj_plots()
proj_auto_checkbox = CheckboxGroup(
labels=["Projections Intensity Range"], active=[0], width=145, margin=[10, 5, 0, 5]
labels=["Projections Intensity Range:"], active=[0], width=145, margin=[10, 5, 0, 5]
)
proj_auto_checkbox.on_change("active", proj_auto_checkbox_callback)