Skip to content

Commit b88d162

Browse files
authored
Merge pull request #1187 from openziti/tidy-cpack-action
bugfix and tidy cpack action and workflow
2 parents 1cbde67 + bab9266 commit b88d162

File tree

14 files changed

+151
-92
lines changed

14 files changed

+151
-92
lines changed
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
name: 'OpenZiti Tunneler Build Action'
2-
description: 'Builds ziti-edge-tunnel binary and install package for Linux'
3-
author: 'NetFoundry'
1+
name: OpenZiti Tunneler Build Action
2+
description: Builds ziti-edge-tunnel binary and Linux package
3+
author: NetFoundry
44
inputs:
55
arch:
6-
description: 'The cmake preset used by entrypoint.sh when running cmake'
6+
description: The cmake preset used by entrypoint.sh when running cmake
77
required: false
88
config:
9-
description: 'The cmake build configuration used by entrypoint.sh when running cmake'
9+
description: The cmake build configuration used by entrypoint.sh when running cmake
1010
required: false
1111
runs:
12-
using: 'docker'
13-
image: 'Dockerfile'
12+
using: docker
13+
image: Dockerfile
1414
args:
1515
- ${{ inputs.arch }}
1616
- ${{ inputs.config }}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# use ziti-builder:v1 (Ubuntu Bionic 18.04 LTS) for older glibc (2.27)
22
FROM openziti/ziti-builder:v1
33

4-
COPY ./entrypoint.sh /root/
5-
RUN chmod +x /root/entrypoint.sh
4+
COPY --chmod=0755 ./entrypoint.sh /root/
65
ENTRYPOINT [ "/root/entrypoint.sh" ]

.github/actions/openziti-tunnel-build-action/gh-release/entrypoint.sh

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,26 +44,30 @@ fi
4444
for SAFE in \
4545
/github/workspace \
4646
/__w/ziti-tunnel-sdk-c/ziti-tunnel-sdk-c \
47-
/mnt ; do
48-
git config --global --add safe.directory ${SAFE}
47+
/mnt \
48+
/usr/local/vcpkg
49+
do
50+
git config --global --add safe.directory ${SAFE}
4951
done
5052

53+
mkdir -p /github/workspace/vcpkg_cache
54+
5155
(
52-
cd "${VCPKG_ROOT}"
53-
git checkout master
54-
git pull
55-
./bootstrap-vcpkg.sh -disableMetrics
56+
cd "${VCPKG_ROOT}"
57+
git checkout master
58+
git pull
59+
./bootstrap-vcpkg.sh -disableMetrics
5660
)
5761

5862
cmake -E make_directory ./build
5963
cmake \
60-
--preset "${cmake_preset}" \
61-
-DCMAKE_BUILD_TYPE="${cmake_config}" \
62-
-DVCPKG_OVERLAY_PORTS=./.github/actions/openziti-tunnel-build-action/gh-release/vcpkg-overlays \
63-
-S . \
64-
-B ./build
64+
--preset "${cmake_preset}" \
65+
-DCMAKE_BUILD_TYPE="${cmake_config}" \
66+
-DVCPKG_OVERLAY_PORTS=./.github/actions/openziti-tunnel-build-action/gh-release/vcpkg-overlays \
67+
-S . \
68+
-B ./build
6569
cmake \
66-
--build ./build \
67-
--config "${cmake_config}" \
68-
--target bundle \
69-
--verbose
70+
--build ./build \
71+
--config "${cmake_config}" \
72+
--target bundle \
73+
--verbose

.github/actions/openziti-tunnel-build-action/redhat-8/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,11 @@ RUN curl -sSfL https://cmake.org/files/v${CMAKE_VERSION%.*}/cmake-${CMAKE_VERSIO
4141
ENV VCPKG_ROOT=/usr/local/vcpkg
4242
# this must be set on arm. see https://learn.microsoft.com/en-us/vcpkg/users/config-environment#vcpkg_force_system_binaries
4343
ENV VCPKG_FORCE_SYSTEM_BINARIES=yes
44+
ENV VCPKG_BINARY_SOURCES="clear;files,/github/workspace/vcpkg_cache,readwrite"
4445

4546
RUN cd /usr/local \
4647
&& git clone https://github.com/microsoft/vcpkg \
47-
&& ./vcpkg/bootstrap-vcpkg.sh -disableMetrics
48+
&& chmod -R ugo+rwX /usr/local/vcpkg
4849

4950
WORKDIR /github/workspace
5051
COPY ./entrypoint.sh /root/

.github/actions/openziti-tunnel-build-action/redhat-8/entrypoint.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,19 @@ fi
3232
for SAFE in \
3333
/github/workspace \
3434
/__w/ziti-tunnel-sdk-c/ziti-tunnel-sdk-c \
35-
/mnt ; do
36-
git config --global --add safe.directory ${SAFE}
35+
/mnt \
36+
/usr/local/vcpkg
37+
do
38+
git config --global --add safe.directory ${SAFE}
3739
done
3840

41+
mkdir -p /github/workspace/vcpkg_cache
42+
3943
(
40-
cd "${VCPKG_ROOT}"
41-
git checkout master
42-
git pull
43-
./bootstrap-vcpkg.sh -disableMetrics
44+
cd "${VCPKG_ROOT}"
45+
git checkout master
46+
git pull
47+
./bootstrap-vcpkg.sh -disableMetrics
4448
)
4549

4650
cmake -E make_directory ./build

.github/actions/openziti-tunnel-build-action/redhat-9/Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG CMAKE_VERSION="3.26.3"
22

3-
FROM rockylinux:9
3+
FROM quay.io/almalinuxorg/almalinux:9.6-20250611
44

55
ARG CMAKE_VERSION
66

@@ -13,7 +13,8 @@ ENV PATH="/usr/local/:${PATH}"
1313
ENV GIT_DISCOVERY_ACROSS_FILESYSTEM=1
1414
ENV TZ=UTC
1515

16-
RUN dnf install -y \
16+
RUN dnf update --assumeyes --nobest \
17+
&& dnf install --assumeyes --nobest \
1718
"@Development Tools" \
1819
dnf-plugins-core \
1920
iproute \
@@ -25,15 +26,15 @@ RUN dnf install -y \
2526
perl-FindBin perl-IPC-Cmd perl-File-Compare perl-File-Copy \
2627
libatomic \
2728
&& dnf config-manager --set-enabled crb \
28-
&& dnf install -y \
29+
&& dnf install --assumeyes --nobest \
2930
doxygen \
3031
graphviz \
3132
git \
3233
json-c-devel \
3334
protobuf-c-devel \
3435
openssl-devel \
3536
ninja-build \
36-
&& dnf clean all
37+
&& dnf clean all
3738

3839
RUN curl -sSfL https://cmake.org/files/v${CMAKE_VERSION%.*}/cmake-${CMAKE_VERSION}-linux-$(uname -m).sh -o cmake.sh \
3940
&& (bash cmake.sh --skip-license --prefix=/usr/local) \
@@ -44,10 +45,10 @@ ENV GIT_CONFIG_GLOBAL="/tmp/ziti-builder-gitconfig"
4445
ENV VCPKG_ROOT=/usr/local/vcpkg
4546
# this must be set on arm. see https://learn.microsoft.com/en-us/vcpkg/users/config-environment#vcpkg_force_system_binaries
4647
ENV VCPKG_FORCE_SYSTEM_BINARIES=yes
48+
ENV VCPKG_BINARY_SOURCES="clear;files,/github/workspace/vcpkg_cache,readwrite"
4749

4850
RUN cd /usr/local \
4951
&& git clone https://github.com/microsoft/vcpkg \
50-
&& ./vcpkg/bootstrap-vcpkg.sh -disableMetrics \
5152
&& chmod -R ugo+rwX /usr/local/vcpkg
5253

5354
WORKDIR /github/workspace

.github/actions/openziti-tunnel-build-action/redhat-9/entrypoint.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,19 @@ fi
3232
for SAFE in \
3333
/github/workspace \
3434
/__w/ziti-tunnel-sdk-c/ziti-tunnel-sdk-c \
35-
/mnt ; do
36-
git config --global --add safe.directory ${SAFE}
35+
/mnt \
36+
/usr/local/vcpkg
37+
do
38+
git config --global --add safe.directory ${SAFE}
3739
done
3840

41+
mkdir -p /github/workspace/vcpkg_cache
42+
3943
(
40-
cd "${VCPKG_ROOT}"
41-
git checkout master
42-
git pull
43-
./bootstrap-vcpkg.sh -disableMetrics
44+
cd "${VCPKG_ROOT}"
45+
git checkout master
46+
git pull
47+
./bootstrap-vcpkg.sh -disableMetrics
4448
)
4549

4650
(

.github/actions/openziti-tunnel-build-action/ubuntu-20.04/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ RUN curl -sSfL https://cmake.org/files/v${CMAKE_VERSION%.*}/cmake-${CMAKE_VERSIO
5656
ENV VCPKG_ROOT=/usr/local/vcpkg
5757
# this must be set on arm. see https://learn.microsoft.com/en-us/vcpkg/users/config-environment#vcpkg_force_system_binaries
5858
ENV VCPKG_FORCE_SYSTEM_BINARIES=yes
59+
ENV VCPKG_BINARY_SOURCES="clear;files,/github/workspace/vcpkg_cache,readwrite"
5960

6061
RUN cd /usr/local \
61-
&& git config --global advice.detachedHead false \
6262
&& git clone https://github.com/microsoft/vcpkg \
63-
&& ./vcpkg/bootstrap-vcpkg.sh -disableMetrics
63+
&& chmod -R ugo+rwX /usr/local/vcpkg
6464

6565
COPY ./entrypoint.sh /root/
6666
ENTRYPOINT [ "/root/entrypoint.sh" ]

.github/actions/openziti-tunnel-build-action/ubuntu-20.04/entrypoint.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,19 @@ fi
3535
for SAFE in \
3636
/github/workspace \
3737
/__w/ziti-tunnel-sdk-c/ziti-tunnel-sdk-c \
38-
/mnt ; do
39-
git config --global --add safe.directory ${SAFE}
38+
/mnt \
39+
/usr/local/vcpkg
40+
do
41+
git config --global --add safe.directory ${SAFE}
4042
done
4143

44+
mkdir -p /github/workspace/vcpkg_cache
45+
4246
(
43-
cd "${VCPKG_ROOT}"
44-
git checkout master
45-
git pull
46-
./bootstrap-vcpkg.sh -disableMetrics
47+
cd "${VCPKG_ROOT}"
48+
git checkout master
49+
git pull
50+
./bootstrap-vcpkg.sh -disableMetrics
4751
)
4852

4953
[[ -d ./build ]] && rm -r ./build

.github/actions/openziti-tunnel-build-action/ubuntu-22.04/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ RUN curl -sSfL "https://cmake.org/files/v${CMAKE_VERSION%.*}/cmake-${CMAKE_VERSI
6161
ENV VCPKG_ROOT=/usr/local/vcpkg
6262
# this must be set on arm. see https://learn.microsoft.com/en-us/vcpkg/users/config-environment#vcpkg_force_system_binaries
6363
ENV VCPKG_FORCE_SYSTEM_BINARIES=yes
64+
ARG VCPKG_BINARY_SOURCES="clear;files,/github/workspace/vcpkg_cache,readwrite"
6465

6566
RUN cd /usr/local \
66-
&& git config --global advice.detachedHead false \
6767
&& git clone https://github.com/microsoft/vcpkg \
68-
&& ./vcpkg/bootstrap-vcpkg.sh -disableMetrics
68+
&& chmod -R ugo+rwX /usr/local/vcpkg
6969

7070
COPY ./entrypoint.sh /root/
7171
ENTRYPOINT [ "/root/entrypoint.sh" ]

0 commit comments

Comments
 (0)