Skip to content

Commit

Permalink
Merge pull request #5 from trz42/update_pkg_ci
Browse files Browse the repository at this point in the history
fix CI for building config packages
  • Loading branch information
trz42 authored Dec 19, 2023
2 parents abdf14e + 7e03293 commit 4ba173a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 27 deletions.
41 changes: 15 additions & 26 deletions .github/workflows/build-test-release-client-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion prepare-client-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
hosts: localhost
vars:
package_vendor: NESSI
package_maintainer: NESSI <support@nessi.no>
package_maintainer: NESSI <thomas.roblitz@uib.no>
package_description: CVMFS configuration package for NESSI.
package_source_dir: "{{ lookup('env', 'GITHUB_WORKSPACE') | default('/tmp', True) }}/package"
tasks:
Expand Down

0 comments on commit 4ba173a

Please sign in to comment.