Skip to content

Commit 6e23ed9

Browse files
fix: install skopeo and zstd correctly (#484)
* install skopeo and zstd correctly * fix: include docker build in pr * remove duplicate line --------- Co-authored-by: D Morty k <dekusdenial@hotmail.com>
1 parent 2e8d118 commit 6e23ed9

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

Dockerfile

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,13 @@ RUN set -x \
3737
# bin link bash if not present
3838
&& if [[ -z $(command -v bash) ]]; then /hab/bin/hab pkg binlink core/bash bash ; fi \
3939
# Download zstd
40-
&& wget -q -O zstd-cli-linux.tar.gz "https://github.com/screwdriver-cd/sd-packages/releases/download/v0.0.40/zstd-cli-linux.tar.gz"
40+
&& wget -q -O zstd-cli-linux.tar.gz "https://github.com/screwdriver-cd/sd-packages/releases/download/v0.0.40/zstd-cli-linux.tar.gz" \
41+
&& tar -C . -ozxvf zstd-cli-linux.tar.gz \
42+
&& mv zstd-linux-x86_64 zstd \
43+
# Download skopeo
44+
&& wget -q -O skopeo-linux.tar.gz "https://github.com/screwdriver-cd/sd-packages/releases/download/v0.0.40/skopeo-linux.tar.gz" \
45+
&& tar -C . -ozxvf skopeo-linux.tar.gz \
46+
&& mv skopeo.linux.amd64 skopeo
4147

4248
FROM base AS base-arm64
4349
RUN set -x \
@@ -50,6 +56,12 @@ RUN set -x \
5056
&& apk add --no-cache composer wget zip unzip git bash iptables sed docker jq curl kmod \
5157
# Download zstd
5258
&& wget -q -O zstd-cli-linux.tar.gz "https://github.com/screwdriver-cd/sd-packages/releases/download/v0.0.40/zstd-cli-linux-aarch64.tar.gz" \
59+
&& tar -C . -ozxvf zstd-cli-linux.tar.gz \
60+
&& mv zstd-linux-aarch64 zstd \
61+
# Download skopeo
62+
&& wget -q -O skopeo-linux.tar.gz "https://github.com/screwdriver-cd/sd-packages/releases/download/v0.0.40/skopeo-linux-aarch64.tar.gz" \
63+
&& tar -C . -ozxvf skopeo-linux.tar.gz \
64+
&& mv skopeo.linux.aarch64 skopeo \
5365
# Download sonar scanner cli any
5466
&& wget -O sonarscanner-cli-any.zip "https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-5.0.1.3006.zip" \
5567
&& unzip -q sonarscanner-cli-any.zip \
@@ -150,17 +162,15 @@ RUN set -x \
150162
&& unzip -q sonarscanner-cli-macosx.zip \
151163
&& mv sonar-scanner-*-linux sonarscanner-cli-linux \
152164
&& mv sonar-scanner-*-macosx sonarscanner-cli-macosx \
153-
# Install skope
154-
&& wget -q -O skopeo-linux.tar.gz "https://github.com/screwdriver-cd/sd-packages/releases/download/v0.0.40/skopeo-linux.tar.gz" \
155-
&& tar -C . -ozxvf skopeo-linux.tar.gz \
165+
# Install skopeo
156166
&& chmod +x skopeo \
157-
# Install zstd
158-
&& wget -q -O zstd-cli-macosx.tar.gz "https://github.com/screwdriver-cd/sd-packages/releases/download/v0.0.40/zstd-cli-macosx.tar.gz" \
159-
&& tar -C . -ozxvf zstd-cli-linux.tar.gz \
167+
# Install zstd linux
160168
&& mv zstd zstd-cli-linux \
169+
&& chmod +x zstd-cli-linux \
170+
# Install zstd for mac
171+
&& wget -q -O zstd-cli-macosx.tar.gz "https://github.com/screwdriver-cd/sd-packages/releases/download/v0.0.40/zstd-cli-macosx.tar.gz" \
161172
&& tar -C . -ozxvf zstd-cli-macosx.tar.gz \
162173
&& mv zstd zstd-cli-macosx \
163-
&& chmod +x zstd-cli-linux \
164174
&& chmod +x zstd-cli-macosx \
165175
# Cleanup Skopeo and Sonar scanner cli files
166176
&& rm -rf /opt/sd/skopeo-linux.tar.gz /opt/sd/sonarscanner-cli-linux.zip /opt/sd/sonarscanner-cli-macosx.zip /opt/sd/sonar-scanner-*-linux /opt/sd/sonar-scanner-*-macosx \

screwdriver.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ jobs:
3636
environment:
3737
DOCKER_MULTI_PLATFORM_BUILDS_ENABLED: 1
3838
DOCKER_BUILDKIT: 1
39-
requires: publish
39+
requires: [~pr, publish]
4040
template: sd/dind@latest

0 commit comments

Comments
 (0)