Skip to content

Commit 3cd4b50

Browse files
authored
Finally finally fix fcos image build (#204)
Fix github url
1 parent d121a23 commit 3cd4b50

File tree

4 files changed

+21
-10
lines changed

4 files changed

+21
-10
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,8 @@ jobs:
328328
with:
329329
# Since we need the cargo workspace, we need to make the repo root the context
330330
context: ./images/fcos-skate
331-
push: true
332-
build-args: VERSION=${{ github.ref_name }}
331+
push: false
332+
#build-args: VERSION=${{ github.ref_name }}
333333
tags: ${{ steps.meta.outputs.tags }}
334334
labels: ${{ steps.meta.outputs.labels }}
335335
file: ./images/fcos-skate/ContainerFile

hack/install-skate.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@ if [[ -n "${DEBUG:-}" ]]; then
77
fi
88

99
INSTALL_PATH=${INSTALL_PATH:-/usr/local/bin}
10-
VERSION=${VERSION:-latest}
10+
VERSION=${VERSION:-}
11+
12+
if [[ -z "$VERSION" ]]; then
13+
URL_SUFFIX="latest"
14+
else
15+
URL_SUFFIX="tags/$VERSION"
16+
fi
1117

1218
os=$(uname -o)
1319
arch=$(uname -m)
@@ -43,7 +49,7 @@ fi
4349

4450
get_install_alternatives(){
4551
# shellcheck disable=SC2068
46-
output=$(curl ${EXTRA_ARGS[@]+"${EXTRA_ARGS[@]}"} -f --retry 5 --retry-max-time 30 --retry-all-errors --silent "https://api.github.com/repos/skateco/skate/releases/${VERSION}")
52+
output=$(curl ${EXTRA_ARGS[@]+"${EXTRA_ARGS[@]}"} -f --retry 5 --retry-max-time 30 --retry-all-errors --silent "https://api.github.com/repos/skateco/skate/releases/${URL_SUFFIX}")
4753

4854
echo "$output" \
4955
| grep "browser_download_url.*tar.gz" \

hack/install-skatelet.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@ if [[ -n "${DEBUG:-}" ]]; then
77
fi
88

99
INSTALL_PATH=${INSTALL_PATH:-/usr/local/bin}
10-
VERSION=${VERSION:-latest}
10+
VERSION=${VERSION:-}
11+
12+
if [[ -z "$VERSION" ]]; then
13+
URL_SUFFIX="latest"
14+
else
15+
URL_SUFFIX="tags/$VERSION"
16+
fi
1117

1218
os=$(uname -o)
1319
arch=$(uname -m)
@@ -43,7 +49,7 @@ fi
4349

4450
get_install_alternatives(){
4551
# shellcheck disable=SC2068
46-
output=$(curl ${EXTRA_ARGS[@]+"${EXTRA_ARGS[@]}"} -f --retry 5 --retry-max-time 30 --retry-all-errors --silent "https://api.github.com/repos/skateco/skate/releases/${VERSION}")
52+
output=$(curl ${EXTRA_ARGS[@]+"${EXTRA_ARGS[@]}"} -f --retry 5 --retry-max-time 30 --retry-all-errors --silent "https://api.github.com/repos/skateco/skate/releases/${URL_SUFFIX}")
4753

4854
echo "$output" \
4955
| grep "browser_download_url.*tar.gz" \
@@ -80,5 +86,5 @@ tar -xvf skatelet.tar.gz
8086
sudo mv skatelet "${INSTALL_PATH}/skatelet"
8187
sudo chmod +x "${INSTALL_PATH}/skatelet"
8288

83-
echo "Skate installed successfully in ${INSTALL_PATH}"
89+
echo "Skatelet installed successfully in ${INSTALL_PATH}"
8490

images/fcos-skate/ContainerFile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ FROM quay.io/fedora/fedora-coreos:stable
22

33
ARG VERSION
44

5-
RUN echo "Running rpm install" && \
6-
dnf install -y \
5+
RUN dnf install -y \
76
rsyslog \
87
wget \
98
keepalived && \
109
# set registry short name mode to permissive
1110
sed -i 's|^[\#]\?short-name-mode\s\?=.*|short-name-mode=\"permissive\"|g' /etc/containers/registries.conf && \
1211
wget -O /tmp/install-skatelet.sh https://raw.githubusercontent.com/skateco/skate/refs/heads/main/hack/install-skatelet.sh && \
13-
INSTALL_PATH=/usr/sbin VERSION=$VERSION bash /tmp/install-skatelet.sh && \
12+
DEBUG=1 INSTALL_PATH=/usr/sbin VERSION=$VERSION bash /tmp/install-skatelet.sh && \
1413
ostree container commit

0 commit comments

Comments
 (0)