Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
salcock committed Jul 4, 2023
2 parents 60b0847 + bf5fd8c commit a6a9c38
Show file tree
Hide file tree
Showing 95 changed files with 17,044 additions and 3,251 deletions.
101 changes: 91 additions & 10 deletions .github/workflows/deb-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
arch:
- amd64
target:
- "debian:stretch"
- "debian:bookworm"
- "debian:buster"
- "debian:bullseye"
- "ubuntu:bionic"
Expand All @@ -25,21 +25,102 @@ jobs:

steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install prereq packages
run: ./debpkg-setup.sh
- name: Build packages
run: ./debpkg-build.sh
- name: Store packages
- name: Set environment variables for upload
run: echo DIRNAME=${{ matrix.target }} | tr ':' '_' >> $GITHUB_ENV
- name: Copy packages to uploadable location
run: |
export DIRNAME=`echo ${{ matrix.target }} | tr ':' '_'`
mkdir -p packages/${DIRNAME}
cp ../*.deb packages/${DIRNAME}/
- name: Publish packages to cloudsmith
uses: wanduow/action-cloudsmith-upload-packages@v1
- name: Store packages
uses: actions/upload-artifact@v3
with:
path: packages/
repo: ${{ secrets.CLOUDSMITH_OWNER }}/openli
username: salcock
api_key: ${{ secrets.CLOUDSMITH_API_KEY }}
name: packages-${{ env.DIRNAME }}
path: packages/${{ env.DIRNAME }}/*.deb
retention-days: 1

test:
runs-on: ubuntu-latest
container:
image: ${{ matrix.target }}
strategy:
fail-fast: false
matrix:
arch:
- amd64
target:
- "debian:buster"
- "debian:bullseye"
- "ubuntu:bionic"
- "ubuntu:focal"
- "ubuntu:jammy"
- "debian:bookworm"
needs: build
steps:
- name: Set environment variables for download
run: echo DIRNAME=${{ matrix.target }} | tr ':' '_' >> $GITHUB_ENV
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: packages-${{ env.DIRNAME }}
- name: Add repositories
run: |
apt update -y
apt install -y apt-transport-https curl
curl -1sLf 'https://dl.cloudsmith.io/public/wand/libwandio/cfg/setup/bash.deb.sh' | bash
curl -1sLf 'https://dl.cloudsmith.io/public/wand/libwandder/cfg/setup/bash.deb.sh' | bash
curl -1sLf 'https://dl.cloudsmith.io/public/wand/libtrace/cfg/setup/bash.deb.sh' | bash
curl -1sLf 'https://dl.cloudsmith.io/public/wand/openli/cfg/setup/bash.deb.sh' | bash
- name: Test package install
env:
DEBIAN_FRONTEND: noninteractive
run: |
apt update -y
find . -name "*.deb" | xargs apt install -y
- name: Test package removal
env:
DEBIAN_FRONTEND: noninteractive
run: |
apt remove -y --purge openli-provisioner
apt remove -y --purge openli-collector
apt remove -y --purge openli-mediator
publish:
runs-on: ubuntu-latest
container:
image: ${{ matrix.target }}
strategy:
fail-fast: false
matrix:
arch:
- amd64
target:
- "debian:buster"
- "debian:bullseye"
- "debian:bookworm"
- "ubuntu:bionic"
- "ubuntu:focal"
- "ubuntu:jammy"
needs: test
steps:
- name: Set environment variables for download
run: echo DIRNAME=${{ matrix.target }} | tr ':' '_' >> $GITHUB_ENV
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: packages-${{ env.DIRNAME }}
- name: Copy packages
run: |
mkdir -p packages/${DIRNAME}
find . -name "*.deb" | xargs cp -t packages/${DIRNAME}/
- name: Publish package to cloudsmith
uses: wanduow/action-cloudsmith-upload-packages@v1
with:
path: packages/
repo: ${{ secrets.CLOUDSMITH_OWNER }}/openli
username: salcock
api_key: ${{ secrets.CLOUDSMITH_API_KEY }}
146 changes: 118 additions & 28 deletions .github/workflows/rpm-build.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Packaging for Centos and Fedora
name: Packaging for RPM

on:
push:
Expand All @@ -7,40 +7,130 @@ on:

jobs:
build:
runs-on: ubuntu-latest
container:
image: ${{ matrix.target }}
strategy:
fail-fast: false
matrix:
arch:
- amd64
target:
- "centos:7"
- "fedora:35"
- "fedora:36"
- "rockylinux:8.5"
- "almalinux:8.5"


steps:
runs-on: ubuntu-latest
container:
image: ${{ matrix.target }}
strategy:
fail-fast: false
matrix:
arch:
- amd64
target:
- "rockylinux:8"
- "rockylinux:9"
- "fedora:37"
- "fedora:38"
- "centos:7"

steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install prereq packages
run: ./rpmpkg-setup.sh ${{ matrix.target }}
- name: Build packages
run: ./rpmpkg-build.sh ${{ matrix.target }}
- name: Store packages
run: ./rpmpkg-build.sh
- name: Set environment variables for upload
run: echo DIRNAME=${{ matrix.target }} | tr ':' '_' >> $GITHUB_ENV
- name: Copy packages to uploadable location
run: |
export DIRNAME=`echo ${{ matrix.target }} | tr ':' '_'`
mkdir -p packages/${DIRNAME}
cp ~/rpmbuild/RPMS/x86_64/*.rpm packages/${DIRNAME}/
- name: Publish packages to cloudsmith
uses: salcock/action-cloudsmith-upload-[email protected]
- name: Store packages
uses: actions/upload-artifact@v3
with:
path: packages/
repo: ${{ secrets.CLOUDSMITH_OWNER }}/openli
username: salcock
api_key: ${{ secrets.CLOUDSMITH_API_KEY }}
name: packages-${{ env.DIRNAME }}
path: packages/${{ env.DIRNAME }}/*.rpm
retention-days: 1

test:
runs-on: ubuntu-latest
container:
image: ${{ matrix.target }}
strategy:
fail-fast: false
matrix:
arch:
- amd64
target:
- "rockylinux:8"
- "rockylinux:9"
- "fedora:37"
- "fedora:38"
- "centos:7"
needs: build
steps:
- name: Set environment variables for download
run: echo DIRNAME=${{ matrix.target }} | tr ':' '_' >> $GITHUB_ENV
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: packages-${{ env.DIRNAME }}
- name: Add repositories
env:
TARGET: ${{ matrix.target }}
run: |
curl -1sLf 'https://dl.cloudsmith.io/public/wand/libwandio/cfg/setup/bash.rpm.sh' | bash
curl -1sLf 'https://dl.cloudsmith.io/public/wand/libwandder/cfg/setup/bash.rpm.sh' | bash
curl -1sLf 'https://dl.cloudsmith.io/public/wand/libtrace/cfg/setup/bash.rpm.sh' | bash
curl -1sLf 'https://dl.cloudsmith.io/public/wand/openli/cfg/setup/bash.rpm.sh' | bash
curl -1sLf https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey -o packagecloud-rabbitmq-key.asc
gpg --import packagecloud-rabbitmq-key.asc
curl -s https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.rpm.sh | bash
curl -s https://packagecloud.io/install/repositories/rabbitmq/erlang/script.rpm.sh | bash
if [ "${TARGET}" == "centos:7" ]; then
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm || true
fi
if [[ "${TARGET}" =~ rocky* ]]; then
dnf install -y dnf-plugins-core epel-release || true
dnf config-manager --set-enabled powertools || true
/usr/bin/crb enable || true
fi
- name: Test package install
run: |
yum install -y findutils
find . -name "*.rpm" | xargs yum install -y
- name: Test package removal
run: |
rpm -e openli-provisioner
rpm -e openli-collector
rpm -e openli-mediator
publish:
runs-on: ubuntu-latest
container:
image: ${{ matrix.target }}
strategy:
fail-fast: false
matrix:
arch:
- amd64
target:
- "rockylinux:8"
- "rockylinux:9"
- "fedora:37"
- "fedora:38"
- "centos:7"
needs: test
steps:
- name: Set environment variables for download
run: echo DIRNAME=${{ matrix.target }} | tr ':' '_' >> $GITHUB_ENV
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: packages-${{ env.DIRNAME }}
- name: Copy packages
run: |
mkdir -p packages/${DIRNAME}
yum install -y findutils
find . -name "*.rpm" | xargs cp -t packages/${DIRNAME}/
- name: Publish package to cloudsmith
uses: wanduow/action-cloudsmith-upload-packages@v1
with:
path: packages/
repo: ${{ secrets.CLOUDSMITH_OWNER }}/openli
username: salcock
api_key: ${{ secrets.CLOUDSMITH_API_KEY }}



2 changes: 1 addition & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ The original OpenLI implementation was written by Shane Alcock, while
working for the WAND network research group at the University of Waikato.

The current lead developer and maintainer of OpenLI is Shane Alcock (still!).
Email: salcock@waikato.ac.nz
Email: salcock@searchlight.nz

------

Expand Down
Loading

0 comments on commit a6a9c38

Please sign in to comment.