From 0c1494bf5277a050f9285353d25f5ab551bb677d Mon Sep 17 00:00:00 2001 From: Vadim Bauer Date: Wed, 29 May 2024 00:44:26 +0200 Subject: [PATCH 1/3] This makes changes makes it possible to build the spectral image also on ARM architecture. --- Makefile | 2 +- tools/spectral/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ecd4972ddea..605951df451 100644 --- a/Makefile +++ b/Makefile @@ -282,7 +282,7 @@ endef # lint swagger doc SPECTRAL_IMAGENAME=$(IMAGENAMESPACE)/spectral -SPECTRAL_VERSION=v6.1.0 +SPECTRAL_VERSION=v6.11.1 SPECTRAL_IMAGE_BUILD_CMD=${DOCKERBUILD} -f ${TOOLSPATH}/spectral/Dockerfile --build-arg GOLANG=${GOBUILDIMAGE} --build-arg SPECTRAL_VERSION=${SPECTRAL_VERSION} -t ${SPECTRAL_IMAGENAME}:$(SPECTRAL_VERSION) . SPECTRAL=$(RUNCONTAINER) $(SPECTRAL_IMAGENAME):$(SPECTRAL_VERSION) diff --git a/tools/spectral/Dockerfile b/tools/spectral/Dockerfile index d9fc51793e1..cb095ab108c 100644 --- a/tools/spectral/Dockerfile +++ b/tools/spectral/Dockerfile @@ -2,7 +2,7 @@ ARG GOLANG FROM ${GOLANG} ARG SPECTRAL_VERSION -RUN curl -fsSL -o /usr/bin/spectral https://github.com/stoplightio/spectral/releases/download/$SPECTRAL_VERSION/spectral-linux && chmod +x /usr/bin/spectral +RUN curl -fsSL -o /usr/bin/spectral https://github.com/stoplightio/spectral/releases/download/$SPECTRAL_VERSION/spectral-linux-$(dpkg --print-architecture) && chmod +x /usr/bin/spectral ENTRYPOINT ["/usr/bin/spectral"] CMD ["--version"] From 1ace7ed96103e9a89ee2373072948e31c4ab54c2 Mon Sep 17 00:00:00 2001 From: Vadim Bauer Date: Sat, 29 Jun 2024 15:35:20 +0200 Subject: [PATCH 2/3] no message Signed-off-by: Vadim Bauer --- tools/spectral/Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/spectral/Dockerfile b/tools/spectral/Dockerfile index cb095ab108c..ac847044f05 100644 --- a/tools/spectral/Dockerfile +++ b/tools/spectral/Dockerfile @@ -2,7 +2,12 @@ ARG GOLANG FROM ${GOLANG} ARG SPECTRAL_VERSION -RUN curl -fsSL -o /usr/bin/spectral https://github.com/stoplightio/spectral/releases/download/$SPECTRAL_VERSION/spectral-linux-$(dpkg --print-architecture) && chmod +x /usr/bin/spectral +RUN case "$(dpkg --print-architecture)" in \ + amd64) ARCH="x86" ;; \ + arm64) ARCH="arm64" ;; \ + *) echo "Unsupported architecture" && exit 1 ;; \ + esac && \ + curl -fsSL -o /usr/bin/spectral https://github.com/stoplightio/spectral/releases/download/$SPECTRAL_VERSION/spectral-linux-$ARCH && chmod +x /usr/bin/spectral ENTRYPOINT ["/usr/bin/spectral"] CMD ["--version"] From 91c0b15d5d863f060ee45fa741f5e4314ead5dc9 Mon Sep 17 00:00:00 2001 From: Vadim Bauer Date: Sat, 29 Jun 2024 15:52:45 +0200 Subject: [PATCH 3/3] fix issue Signed-off-by: Vadim Bauer --- tools/spectral/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/spectral/Dockerfile b/tools/spectral/Dockerfile index ba1bd731ae9..0a93965a317 100644 --- a/tools/spectral/Dockerfile +++ b/tools/spectral/Dockerfile @@ -3,7 +3,7 @@ FROM ${GOLANG} ARG SPECTRAL_VERSION RUN case "$(dpkg --print-architecture)" in \ - amd64) ARCH="x86" ;; \ + amd64) ARCH="x64" ;; \ arm64) ARCH="arm64" ;; \ *) echo "Unsupported architecture" && exit 1 ;; \ esac && \