From dc6ffc44e6b5d46526ca40071c10f7fe955454c4 Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Wed, 8 Dec 2021 10:42:07 -0500 Subject: [PATCH] Install swagger binary for podman CI Signed-off-by: Chris Evich --- cache_images/podman_tooling.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cache_images/podman_tooling.sh b/cache_images/podman_tooling.sh index e1a9ba39..53dd4aae 100644 --- a/cache_images/podman_tooling.sh +++ b/cache_images/podman_tooling.sh @@ -19,6 +19,14 @@ bigto $SUDO make install.tools # shellcheck disable=SC2154 if [[ "$OS_RELEASE_ID" == "ubuntu" ]]; then lilto $SUDO make install.libseccomp.sudo +else # Fedora + msg "Installing swagger binary" + download_url=$(\ + curl -s https://api.github.com/repos/go-swagger/go-swagger/releases/latest | \ + jq -r '.assets[] | select(.name | contains("linux_amd64")) | .browser_download_url') + $SUDO curl --fail -s -o /usr/local/bin/swagger -L'#' "$download_url" + $SUDO chmod +x /usr/local/bin/swagger + /usr/local/bin/swagger version fi # Make pristine for other runtime usage/expectations also save a bit