resolve merge conflicts

This commit is contained in:
Benjamin Labrecque
2026-08-28 17:05:21 +02:00
4 changed files with 65 additions and 41 deletions
+44
View File
@@ -0,0 +1,44 @@
#!/bin/bash
# Deploys the whole qt/ ui directory to /sls/bd/hla/<env>/qt.
#
# Run from the repo root (the qt/ source path is relative), e.g.
# Usage: ./.gitea/scripts/deploy-qt.sh <dev|prod>
set -euo pipefail
source "$(dirname "$0")/common.sh"
AGEBD_ENV=${1:-}
if [ -z "${AGEBD_ENV}" ]; then
echo "Usage: $0 <dev|prod>" >&2
exit 1
fi
set_env_suffix "${AGEBD_ENV}"
DEST_DIR=${HLA_ROOT}/${AGEBD_ENV}/qt
echo "=========================================="
echo "Deploying qt/ (${AGEBD_ENV}) to ${DEST_DIR}"
echo "=========================================="
# TODO: see https://gitea.psi.ch/sls/hla_framework_bd/issues/50
# rm -rf "${DEST_DIR}"
# mkdir -p "${DEST_DIR}"
# cp -r ./qt/* "${DEST_DIR}/"
mkdir -p "${DEST_DIR}"
rsync -avz --delete \
--exclude='.nfs*' \
--exclude='.git/' \
--exclude='.venv/' \
--exclude='__pycache__/' \
--exclude='*.pyc' \
--exclude='.pytest_cache/' \
./qt/* "${DEST_DIR}/"
### SUBSTITUTIONS
sed -i "s/{{ *agebd_env_suffix_upper* }}/${AGEBD_ENV_SUFFIX_UPPER}/g" "${DEST_DIR}/"*
sed -i "s/{{ *agebd_env_suffix_lower* }}/${AGEBD_ENV_SUFFIX_LOWER}/g" "${DEST_DIR}/"*
sed -i "s/{{ *agebd_env_suffix_paren* }}/${AGEBD_ENV_SUFFIX_PAREN}/g" "${DEST_DIR}/"*
+1 -19
View File
@@ -32,26 +32,8 @@ jobs:
echo "service_name_lower=$SERVICE_NAME" >> $GITHUB_OUTPUT
- name: Qt - deploy
env:
DEST_DIR: /sls/bd/hla/dev/qt
run: |
mkdir -p "${DEST_DIR}"
rsync -avz --delete \
--exclude='.nfs*' \
--exclude='.git/' \
--exclude='.venv/' \
--exclude='__pycache__/' \
--exclude='*.pyc' \
--exclude='.pytest_cache/' \
./qt/* "${DEST_DIR}/"
### SUBSTITUTIONS
source "${{ github.workspace }}/.gitea/scripts/common.sh"
set_env_suffix "dev"
sed -i "s/{{ *agebd_env_suffix_upper* }}/${AGEBD_ENV_SUFFIX_UPPER}/g" "${DEST_DIR}/"*
sed -i "s/{{ *agebd_env_suffix_lower* }}/${AGEBD_ENV_SUFFIX_LOWER}/g" "${DEST_DIR}/"*
sed -i "s/{{ *agebd_env_suffix_paren* }}/${AGEBD_ENV_SUFFIX_PAREN}/g" "${DEST_DIR}/"*
./.gitea/scripts/deploy-qt.sh "dev"
# The ioc steps read the deployed ioc files on /sls, so the service
# has to be deployed before its ioc is installed.
+1 -22
View File
@@ -99,29 +99,8 @@ jobs:
- name: Qt - deploy
if: steps.filter.outputs.qt == 'true'
env:
DEST_DIR: /sls/bd/hla/${{ env.AGEBD_ENV }}/qt
run: |
# TODO: see https://gitea.psi.ch/sls/hla_framework_bd/issues/50
# rm -rf "${DEST_DIR}"
# mkdir -p "${DEST_DIR}"
# cp -r ./qt/* "${DEST_DIR}/"
rsync -avz --delete \
--exclude='.nfs*' \
--exclude='.git/' \
--exclude='.venv/' \
--exclude='__pycache__/' \
--exclude='*.pyc' \
--exclude='.pytest_cache/' \
./qt/* "${DEST_DIR}/"
### SUBSTITUTIONS
source "${{ github.workspace }}/.gitea/scripts/common.sh"
set_env_suffix "${AGEBD_ENV}"
sed -i "s/{{ *agebd_env_suffix_upper* }}/${AGEBD_ENV_SUFFIX_UPPER}/g" "${DEST_DIR}/"*
sed -i "s/{{ *agebd_env_suffix_lower* }}/${AGEBD_ENV_SUFFIX_LOWER}/g" "${DEST_DIR}/"*
sed -i "s/{{ *agebd_env_suffix_paren* }}/${AGEBD_ENV_SUFFIX_PAREN}/g" "${DEST_DIR}/"*
./.gitea/scripts/deploy-qt.sh "${AGEBD_ENV}"
# -----------------------------------------------------------------
# Services Detection, Testing, and Deployment
+19
View File
@@ -0,0 +1,19 @@
name: Qt
# Manually re-deploy the whole qt/ ui directory in dev, from any branch.
# Handy to try out panel changes on a feature branch without pushing to main.
# There is deliberately no prod option here - prod deploys go through the
# normal push-to-main flow (see the 'Deploy' workflow), which requires review.
on:
workflow_dispatch:
jobs:
deploy-dev:
runs-on: hla-dev
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Deploy qt from ${{ github.ref_name }}
run: |
./.gitea/scripts/deploy-qt.sh "dev"