diff --git a/.github/workflows/test_daq_buildtools.yml b/.github/workflows/test_daq_buildtools.yml index 2ae402b..6652e12 100644 --- a/.github/workflows/test_daq_buildtools.yml +++ b/.github/workflows/test_daq_buildtools.yml @@ -19,13 +19,18 @@ jobs: test_daq_buildtools: name: Test daq-buildtools runs-on: ubuntu-latest - container: - image: ghcr.io/dune-daq/nightly-release-alma9:development_v5 defaults: run: shell: bash steps: + - uses: cvmfs-contrib/github-action-cvmfs@v5 + with: + cvmfs_repositories: 'dunedaq-development.opensciencegrid.org' + + - name: Pull latest nightly build image + run: docker pull ghcr.io/dune-daq/nightly-release-alma9:development_v5 + - id: checkout_daq_buildtools uses: actions/checkout@v6 with: @@ -34,9 +39,16 @@ jobs: - name: Run test_daq-buildtools script run: | + BRANCH="${{ inputs.dbt-branch || github.head_ref || github.ref_name }}" cd daq-buildtools-test source env.sh cd scripts - ./test_daq-buildtools.sh --dbt-branch ${{ github.head_ref }} + docker run --rm \ + -v /cvmfs:/cvmfs:shared \ + -v "$PWD":/workspace \ + -w /workspace \ + ghcr.io/dune-daq/nightly-release-alma9:development_v5 \ + ./test_daq-buildtools.sh --dbt-branch $BRANCH + diff --git a/scripts/test_daq-buildtools.sh b/scripts/test_daq-buildtools.sh index a75b1d1..d844d6a 100755 --- a/scripts/test_daq-buildtools.sh +++ b/scripts/test_daq-buildtools.sh @@ -33,6 +33,13 @@ repo="ipm" pyrepo="daqpytools" dbt_branch="develop" +validate_arg() { + if [[ -z "$2" || "$2" == -* ]]; then + echo "ERROR: $1 requires an argument." + exit 2 + fi +} + while [[ $# -gt 0 ]]; do case "$1" in -h|--help|-?) @@ -40,14 +47,17 @@ while [[ $# -gt 0 ]]; do exit 1 ;; --release) + validate_arg $1 $2 release="$2" shift 2 ;; --repo) + validate_arg $1 $2 repo="$2" shift 2 ;; --dbt-branch) + validate_arg $1 $2 dbt_branch="$2" shift 2 ;; @@ -102,6 +112,7 @@ git clone https://github.com/DUNE-DAQ/$pyrepo || exit 16 cd .. . env.sh || exit 17 rm -f .venv/lib64/python*/site-packages/$pyrepo/__init__.py || exit 18 + echo "******************************TEST dbt-build (Python) *************************************" dbt-build || exit 19 find .venv/lib64/python*/site-packages/$pyrepo/__init__.py | read || exit 20