From 7e03293f577e9dc45aae5d5705e4b11632093fc8 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Tue, 19 Dec 2023 19:20:11 +0100 Subject: [PATCH] fix CI for building config packages --- .../build-test-release-client-packages.yml | 41 +++++++------------ prepare-client-packages.yml | 2 +- 2 files changed, 16 insertions(+), 27 deletions(-) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index 652ec395..b87530c2 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -18,13 +18,6 @@ jobs: build-linux-packages: runs-on: ubuntu-latest steps: - - name: Install Ansible - run: | - sudo apt update --yes - sudo apt install --yes software-properties-common - sudo add-apt-repository --yes --update ppa:ansible/ansible - sudo apt install --yes ansible - - name: Checkout uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 @@ -38,18 +31,10 @@ jobs: [[ $REF_NAME == refs/tags/v* ]] && VERSION=${REF_NAME/refs\/tags\/v/} echo ::set-output name=version::${VERSION} - # The next step uses a custom Ansible inventory, and due to that it cannot find - # the group_vars folder inside the inventory folder. This symlink fixes that. - - name: Make symlink to group_vars - run: ln -s inventory/group_vars - - # uses: roles-ansible/check-ansible-debian-stable-action@bc4b37806481d66df213c1a8d5c59495ed7801f0 - - name: Prepare package source - uses: dawidd6/action-ansible-playbook@5d970176ea4bfd99a3f5004d48e293fe0994eda1 # v2.6.1 - with: - playbook: "./prepare-client-packages.yml" - # options: | - # --inventory "localhost" + - name: Prepare package source by running the corresponding playbook locally + run: | + echo "localhost ansible_connection=local" > inventory/hosts + ansible-playbook ./prepare-client-packages.yml # We probably should loop over the set {rpm,deb,osxpkg} to create packages, but # it will make debugging more annoying. @@ -137,6 +122,9 @@ jobs: - name: Download and install CVMFS client run: wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest_all.deb && sudo dpkg -i cvmfs-release-latest_all.deb + - name: Download and install cvmfs-config-none package + run: wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-config/cvmfs-config-none_1.1-0_all.deb && sudo dpkg -i cvmfs-config-none_1.1-0_all.deb + - name: Install CVMFS client run: sudo apt-get update && sudo apt-get install cvmfs @@ -167,16 +155,16 @@ jobs: test-rpm-package: needs: build-linux-packages runs-on: ubuntu-latest - container: + container: image: centos:centos7 options: --device /dev/fuse --privileged steps: - name: Download and install CVMFS client - run: yum install -y https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest.noarch.rpm + run: yum install -y https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest.noarch.rpm && yum-config-manager --enable cernvm-config - name: Install CVMFS client - run: yum install -y cvmfs + run: yum install -y cvmfs cvmfs-config-none - name: Download cvmfs-config-nessi package uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # v3.0.1 @@ -213,6 +201,9 @@ jobs: - name: Download and install CVMFS client run: wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest_all.deb && sudo dpkg -i cvmfs-release-latest_all.deb + - name: Download and install cvmfs-config-none package + run: wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-config/cvmfs-config-none_1.1-0_all.deb && sudo dpkg -i cvmfs-config-none_1.1-0_all.deb + - name: Install CVMFS client run: sudo apt-get update && sudo apt-get install cvmfs @@ -269,14 +260,13 @@ jobs: # run: echo "CVMFS_CLIENT_PROFILE=single" | sudo tee /etc/cvmfs/default.local # # - name: Mount the repositories -# run: sudo mkdir -p /Users/Shared/cvmfs/pilot.eessi-hpc.org && sudo mount -t cvmfs pilot.eessi-hpc.org /Users/Shared/cvmfs/pilot.eessi-hpc.org +# run: sudo mkdir -p /Users/Shared/cvmfs/pilot.nessi.no && sudo mount -t cvmfs pilot.nessi.no /Users/Shared/cvmfs/pilot.nessi.no # # - name: Test repository access -# run: ls /Users/Shared/cvmfs/pilot.eessi-hpc.org/ +# run: ls /Users/Shared/cvmfs/pilot.nessi.no/ release: #needs: [build-linux-packages, build-macos-package, test-deb-package, test-rpm-package, test-macos-package, test-tar-package] - #needs: [build-linux-packages, test-deb-package, test-tar-package] needs: [build-linux-packages, test-deb-package, test-rpm-package, test-tar-package] if: startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest @@ -311,7 +301,6 @@ jobs: Filesystem Layer release ${{ steps.find_version.outputs.version }} files: ${{ steps.find_filenames.outputs.package_filenames }} gzip: false - allow_override: true release-latest: needs: [release] # only run when the previous step (the actual release) was successful diff --git a/prepare-client-packages.yml b/prepare-client-packages.yml index 3fede165..2fd75a4b 100644 --- a/prepare-client-packages.yml +++ b/prepare-client-packages.yml @@ -4,7 +4,7 @@ hosts: localhost vars: package_vendor: NESSI - package_maintainer: NESSI + package_maintainer: NESSI package_description: CVMFS configuration package for NESSI. package_source_dir: "{{ lookup('env', 'GITHUB_WORKSPACE') | default('/tmp', True) }}/package" tasks: