Skip to content

Commit

Permalink
add redhat 9 build and package
Browse files Browse the repository at this point in the history
  • Loading branch information
qrkourier committed Feb 13, 2023
1 parent 1ffea8b commit 04fa443
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 4 deletions.
34 changes: 34 additions & 0 deletions .github/actions/openziti-tunnel-build-action/redhat-9/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM quay.io/rockylinux/rockylinux:9

LABEL org.opencontainers.image.authors="[email protected],[email protected]"

USER root
WORKDIR /root/

ENV PATH="/usr/local/:${PATH}"
ENV GIT_DISCOVERY_ACROSS_FILESYSTEM=1
ENV TZ=UTC

RUN dnf install -y \
"@Development Tools" \
cmake \
dnf-plugins-core \
iproute \
python3 \
systemd-devel \
zlib-devel \
systemd-rpm-macros \
cmake-rpm-macros \
openssl-devel \
libatomic \
&& dnf config-manager --set-enabled crb \
&& dnf install -y \
doxygen \
graphviz \
git \
&& dnf clean all


WORKDIR /github/workspace
COPY ./entrypoint.sh /root/
ENTRYPOINT [ "/root/entrypoint.sh" ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/usr/bin/env bash
#
# RedHat 9
#

set -euo pipefail

# these commands must be in the entrypoint so they are run after workspace is mounted on Docker workdir
echo "INFO: GIT_DISCOVERY_ACROSS_FILESYSTEM=${GIT_DISCOVERY_ACROSS_FILESYSTEM}"
echo "INFO: WORKDIR=${PWD}"
echo "INFO: $(git --version)"

# workspace dir for each build env is added to "safe" dirs in global config e.g.
# ~/.gitconfig so both runner and builder containers trust these dirs
# owned by different UIDs from that of Git's EUID. This is made necessary
# by newly-enforced directory boundaries in Git v2.35.2
# ref: https://lore.kernel.org/git/[email protected]/
for SAFE in \
/github/workspace \
/__w/ziti-tunnel-sdk-c/ziti-tunnel-sdk-c \
/mnt ; do
git config --global --add safe.directory ${SAFE}
done

cmake -E make_directory ./build
(
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=./toolchains/default.cmake \
-DBUILD_DIST_PACKAGES=ON \
-DUSE_OPENSSL=ON \
-S . \
-B ./build
cmake \
--build ./build \
--target package \
--verbose
)

if (( ${#} )); then
echo "INFO: running ziti-edge-tunnel"
set -x
./build/programs/ziti-edge-tunnel/ziti-edge-tunnel ${@}
fi
13 changes: 9 additions & 4 deletions .github/workflows/cpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ jobs:
release_name: ${{ null }}
type: rpm
container: docker.io/library/rockylinux:8
- name: redhat
version: "9"
release_name: ${{ null }}
type: rpm
container: docker.io/library/rockylinux:9
exclude:
- distro:
name: ubuntu
Expand Down Expand Up @@ -105,7 +110,7 @@ jobs:
steps:
# only focal-20.04 has >= 2.18, which is required by actions/checkout to clone
# which enables cmake version discovery
- name: install Modern Git in runner container if Ubuntu
- name: install contemporary Git in runner container if Ubuntu
if: ${{ matrix.distro.name == 'ubuntu' }}
run: |
apt -y update
Expand All @@ -115,14 +120,14 @@ jobs:
apt -y install git
git --version
- name: install Modern Git in runner container if RedHat 8
if: ${{ matrix.distro.name == 'redhat' && matrix.distro.version == '8' }}
- name: install contemporary Git in runner container if RedHat 8 or 9
if: ${{ matrix.distro.name == 'redhat' && (matrix.distro.version == '8' || matrix.distro.version == '9') }}
run: |
dnf -y update
dnf -y install git
git --version
- name: install Modern Git in runner container if RedHat 7
- name: install contemporary Git in runner container if RedHat 7
if: ${{ matrix.distro.name == 'redhat' && matrix.distro.version == '7' }}
run: |
yum -y update
Expand Down

0 comments on commit 04fa443

Please sign in to comment.