Alma9 build v5 frozen release #13
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Alma9 Build frozen release | |
on: | |
workflow_dispatch: | |
inputs: | |
release: | |
description: 'targeted release (e.g. v4.1.0)' | |
required: true | |
build-number: | |
description: 'frozen release build number, e.g. 1' | |
required: true | |
jobs: | |
build_the_frozen_release_spack: | |
name: build_frozen_release_spack | |
runs-on: isc01 | |
container: | |
image: ghcr.io/dune-daq/alma9-slim-externals:v2.0 | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Checkout daq-release | |
uses: actions/checkout@v4 | |
with: | |
path: daq-release | |
- name: setup directories and install spack for the dunedaq release | |
run: | | |
export BASE_RELEASE_DIR=/cvmfs/dunedaq.opensciencegrid.org/spack/releases/dunedaq-${{ github.event.inputs.release }}-a9 | |
export DET_RELEASE_DIR=/cvmfs/dunedaq.opensciencegrid.org/spack/releases/fddaq-${{ github.event.inputs.release }}-a9 | |
export OS=almalinux9 | |
export BUILD_NUMBER=${{ github.event.inputs.build-number }} | |
source daq-release/.github/workflows/wf-setup-tools.sh | |
daq-release/scripts/spack/build-release.sh $BASE_RELEASE_DIR $DET_RELEASE_DIR dune $OS | |
cd $BASE_RELEASE_DIR/.. | |
tar_and_stage_release $BASE_RELEASE_TAG | |
- name: upload spack frozen release tarball for dunedaq | |
uses: actions/upload-artifact@v3 | |
with: | |
name: frozens_dunedaq | |
path: ${{ github.workspace }}/tarballs_for_upload/dunedaq-${{ github.event.inputs.release }}-a9.tar.gz | |
- name: setup directories and install spack for the fddaq release | |
run: | | |
export BASE_RELEASE_DIR=/cvmfs/dunedaq.opensciencegrid.org/spack/releases/dunedaq-${{ github.event.inputs.release }}-a9 | |
export DET_RELEASE_DIR=/cvmfs/dunedaq.opensciencegrid.org/spack/releases/fddaq-${{ github.event.inputs.release }}-a9 | |
export OS=almalinux9 | |
export BUILD_NUMBER=${{ github.event.inputs.build-number }} | |
source daq-release/.github/workflows/wf-setup-tools.sh | |
daq-release/scripts/spack/build-release.sh $BASE_RELEASE_DIR $DET_RELEASE_DIR fd $OS | |
cd $DET_RELEASE_DIR/.. | |
tar_and_stage_release $DET_RELEASE_TAG | |
- name: upload spack frozen release tarball for fddaq | |
uses: actions/upload-artifact@v3 | |
with: | |
name: frozens_fddaq | |
path: ${{ github.workspace }}/tarballs_for_upload/fddaq-${{ github.event.inputs.release }}-a9.tar.gz | |
update_image: | |
name: update_spack_image_rc | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- image: "ghcr.io/dune-daq/alma9-slim-externals" | |
os_name: "al9" | |
needs: build_the_frozen_release_spack | |
environment: dockerhub | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- name: clean docker-build | |
run: | | |
mkdir -p ${GITHUB_WORKSPACE}/docker-build | |
rm -rf ${GITHUB_WORKSPACE}/docker-build/* | |
- name: Download spack frozen release tarball artifact for dunedaq | |
uses: actions/download-artifact@v3 | |
with: | |
name: frozens_dunedaq | |
path: ${{ github.workspace }}/docker-build | |
- name: Download spack frozen release tarball artifact for fddaq | |
uses: actions/download-artifact@v3 | |
with: | |
name: frozens_fddaq | |
path: ${{ github.workspace }}/docker-build | |
- name: prepare cvmfs mirror spack-frozens | |
run: | | |
cd ${{ github.workspace }}/docker-build | |
mkdir -p releases | |
export EXT_VERSION=v2.0 | |
image_name="${{ matrix.image }}:${EXT_VERSION}" | |
cd releases | |
dunedaq_tag=dunedaq-${{ github.event.inputs.release }}-a9 | |
tar xvf ../${dunedaq_tag}.tar.gz | |
rm -rf ../${dunedaq_tag}.tar.gz | |
fddaq_tag=fddaq-${{ github.event.inputs.release }}-a9 | |
tar xvf ../${fddaq_tag}.tar.gz | |
rm -rf ../${fddaq_tag}.tar.gz | |
cd ${fddaq_tag}; ln -s spack-*-gcc-* default; cd .. | |
cd .. | |
echo "FROM ${image_name}"> Dockerfile | |
echo 'MAINTAINER John Freeman "[email protected]"' >> Dockerfile | |
echo "ENV REFRESHED_FOR ${fddaq_tag}" >> Dockerfile | |
echo "COPY --from=ghcr.io/dune-daq/pypi-repo:latest /cvmfs/dunedaq.opensciencegrid.org/pypi-repo /cvmfs/dunedaq.opensciencegrid.org/pypi-repo" >> Dockerfile | |
echo "ADD releases /cvmfs/dunedaq.opensciencegrid.org/spack/releases" >> Dockerfile | |
echo 'ENTRYPOINT ["/bin/bash"]' >> Dockerfile | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
${{ matrix.image }} | |
tags: | | |
type=raw,value=spack-dev-frozen-split | |
- name: Build and push Docker images | |
uses: docker/build-push-action@v5 | |
with: | |
context: ${{ github.workspace }}/docker-build | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
generate_dbt_setup_release_env: | |
name: generate_dbt_setup_release_env_${{ matrix.os_name }} | |
runs-on: ubuntu-latest | |
needs: update_image | |
container: | |
image: "ghcr.io/dune-daq/alma9-slim-externals:spack-dev-frozen-split-test" | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: create dbt-setup-release-env.sh and daq_app_rte.sh for fddaq | |
run: | | |
DET=fd | |
daq_tag=${DET}daq-${{ github.event.inputs.release }}-a9 | |
source /cvmfs/dunedaq.opensciencegrid.org/setup_dunedaq.sh | |
setup_dbt latest|| true | |
dbt-setup-release ${daq_tag} | |
declare -x > ${GITHUB_WORKSPACE}/${DET}daq-dbt-setup-release-env.sh | |
declare -f >> ${GITHUB_WORKSPACE}/${DET}daq-dbt-setup-release-env.sh | |
egrep "declare -x (PATH|.*_SHARE|CET_PLUGIN_PATH|DUNEDAQ_SHARE_PATH|LD_LIBRARY_PATH|LIBRARY_PATH|PYTHONPATH)=" ${GITHUB_WORKSPACE}/${DET}daq-dbt-setup-release-env.sh > ${GITHUB_WORKSPACE}/${DET}daq_app_rte.sh | |
- name: upload fddaq-dbt-setup-release-env.sh | |
uses: actions/upload-artifact@v3 | |
with: | |
name: fddaq-dbt_setup_release_env | |
path: ${{ github.workspace }}/fddaq-dbt-setup-release-env.sh | |
- name: upload fddaq_app_rte.sh | |
uses: actions/upload-artifact@v3 | |
with: | |
name: fddaq_app_rte | |
path: ${{ github.workspace }}/fddaq_app_rte.sh |