Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nats-server] Release v2.1.2 #7004

Merged
merged 1 commit into from
Nov 19, 2019
Merged

Conversation

kozlovic
Copy link
Contributor

Details can be found here

Signed-off-by: Ivan Kozlovic ivan@synadia.com

Details can be found [here](https://github.com/nats-io/nats-server/releases/tag/v2.1.2)

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
@tianon
Copy link
Member

tianon commented Nov 19, 2019

Diff:
diff --git a/_bashbrew-list b/_bashbrew-list
index dc66f31..a9252b2 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -22,18 +22,18 @@ nats:2.1-windowsservercore
 nats:2.1-windowsservercore-1803
 nats:2.1-windowsservercore-1809
 nats:2.1-windowsservercore-ltsc2016
-nats:2.1.0
-nats:2.1.0-alpine
-nats:2.1.0-alpine3.10
-nats:2.1.0-linux
-nats:2.1.0-nanoserver
-nats:2.1.0-nanoserver-1803
-nats:2.1.0-nanoserver-1809
-nats:2.1.0-scratch
-nats:2.1.0-windowsservercore
-nats:2.1.0-windowsservercore-1803
-nats:2.1.0-windowsservercore-1809
-nats:2.1.0-windowsservercore-ltsc2016
+nats:2.1.2
+nats:2.1.2-alpine
+nats:2.1.2-alpine3.10
+nats:2.1.2-linux
+nats:2.1.2-nanoserver
+nats:2.1.2-nanoserver-1803
+nats:2.1.2-nanoserver-1809
+nats:2.1.2-scratch
+nats:2.1.2-windowsservercore
+nats:2.1.2-windowsservercore-1803
+nats:2.1.2-windowsservercore-1809
+nats:2.1.2-windowsservercore-ltsc2016
 nats:alpine
 nats:alpine3.10
 nats:latest
diff --git a/_bashbrew-shared-tags b/_bashbrew-shared-tags
index 14d60e2..132c542 100644
--- a/_bashbrew-shared-tags
+++ b/_bashbrew-shared-tags
@@ -4,9 +4,9 @@ nats:2-windowsservercore -- nats:windowsservercore-1809, nats:windowsservercore-
 nats:2.1 -- nats:linux, nats:nanoserver-1809, nats:nanoserver-1803
 nats:2.1-nanoserver -- nats:nanoserver-1809, nats:nanoserver-1803
 nats:2.1-windowsservercore -- nats:windowsservercore-1809, nats:windowsservercore-1803, nats:windowsservercore-ltsc2016
-nats:2.1.0 -- nats:linux, nats:nanoserver-1809, nats:nanoserver-1803
-nats:2.1.0-nanoserver -- nats:nanoserver-1809, nats:nanoserver-1803
-nats:2.1.0-windowsservercore -- nats:windowsservercore-1809, nats:windowsservercore-1803, nats:windowsservercore-ltsc2016
+nats:2.1.2 -- nats:linux, nats:nanoserver-1809, nats:nanoserver-1803
+nats:2.1.2-nanoserver -- nats:nanoserver-1809, nats:nanoserver-1803
+nats:2.1.2-windowsservercore -- nats:windowsservercore-1809, nats:windowsservercore-1803, nats:windowsservercore-ltsc2016
 nats:latest -- nats:linux, nats:nanoserver-1809, nats:nanoserver-1803
 nats:nanoserver -- nats:nanoserver-1809, nats:nanoserver-1803
 nats:windowsservercore -- nats:windowsservercore-1809, nats:windowsservercore-1803, nats:windowsservercore-ltsc2016
diff --git a/nats_alpine/Dockerfile b/nats_alpine/Dockerfile
index 05dca50..d35d78e 100644
--- a/nats_alpine/Dockerfile
+++ b/nats_alpine/Dockerfile
@@ -1,7 +1,6 @@
 FROM alpine:3.10
 
-ENV NATS_SERVER 2.1.0
-ENV NATS_SERVER_SHA256 a4012cac52715dbc693dbc3a98b90369b132416b12a67f9bcfb24c18d1efcbd6
+ENV NATS_SERVER 2.1.2
 
 RUN set -eux; \
 	apkArch="$(apk --print-arch)"; \
@@ -15,7 +14,6 @@ RUN set -eux; \
 	esac; \
 	\
 	wget -O nats-server.zip "https://github.com/nats-io/nats-server/releases/download/v${NATS_SERVER}/nats-server-v${NATS_SERVER}-linux-${natsArch}.zip"; \
-	echo "${NATS_SERVER_SHA256}  nats-server.zip" | sha256sum -c -; \
 	\
 	apk add --no-cache ca-certificates; \
 	apk add --no-cache --virtual buildtmp unzip; \
diff --git a/nats_linux/Dockerfile b/nats_linux/Dockerfile
index db5d819..a33982a 100644
--- a/nats_linux/Dockerfile
+++ b/nats_linux/Dockerfile
@@ -1,5 +1,5 @@
 FROM scratch
-COPY --from=nats:2.1.0-alpine3.10 /usr/local/bin/nats-server /nats-server
+COPY --from=nats:2.1.2-alpine3.10 /usr/local/bin/nats-server /nats-server
 COPY nats-server.conf /nats-server.conf
 EXPOSE 4222 8222 6222
 ENTRYPOINT ["/nats-server"]
diff --git a/nats_nanoserver-1803/Dockerfile b/nats_nanoserver-1803/Dockerfile
index 4f384c8..2112592 100644
--- a/nats_nanoserver-1803/Dockerfile
+++ b/nats_nanoserver-1803/Dockerfile
@@ -2,7 +2,7 @@ FROM mcr.microsoft.com/windows/nanoserver:1803
 
 ENV NATS_DOCKERIZED 1
 
-COPY --from=nats:2.1.0-windowsservercore-1803 C:\\nats-server.exe C:\\nats-server.exe
+COPY --from=nats:2.1.2-windowsservercore-1803 C:\\nats-server.exe C:\\nats-server.exe
 COPY nats-server.conf C:\\nats-server.conf
 
 EXPOSE 4222 8222 6222
diff --git a/nats_nanoserver-1809/Dockerfile b/nats_nanoserver-1809/Dockerfile
index 68f8d6c..da50dae 100644
--- a/nats_nanoserver-1809/Dockerfile
+++ b/nats_nanoserver-1809/Dockerfile
@@ -2,7 +2,7 @@ FROM mcr.microsoft.com/windows/nanoserver:1809
 
 ENV NATS_DOCKERIZED 1
 
-COPY --from=nats:2.1.0-windowsservercore-1809 C:\\nats-server.exe C:\\nats-server.exe
+COPY --from=nats:2.1.2-windowsservercore-1809 C:\\nats-server.exe C:\\nats-server.exe
 COPY nats-server.conf C:\\nats-server.conf
 
 EXPOSE 4222 8222 6222
diff --git a/nats_windowsservercore-1803/Dockerfile b/nats_windowsservercore-1803/Dockerfile
index 49987be..2d6b526 100644
--- a/nats_windowsservercore-1803/Dockerfile
+++ b/nats_windowsservercore-1803/Dockerfile
@@ -4,7 +4,7 @@ FROM mcr.microsoft.com/windows/servercore:1803
 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"]
 
 ENV NATS_DOCKERIZED 1
-ENV NATS_SERVER 2.1.0
+ENV NATS_SERVER 2.1.2
 ENV NATS_SERVER_DOWNLOAD https://github.com/nats-io/nats-server/releases/download/v${NATS_SERVER}/nats-server-v${NATS_SERVER}-windows-amd64.zip
 
 RUN Set-PSDebug -Trace 2
diff --git a/nats_windowsservercore-1809/Dockerfile b/nats_windowsservercore-1809/Dockerfile
index 8bb790f..ebda36d 100644
--- a/nats_windowsservercore-1809/Dockerfile
+++ b/nats_windowsservercore-1809/Dockerfile
@@ -4,7 +4,7 @@ FROM mcr.microsoft.com/windows/servercore:1809
 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"]
 
 ENV NATS_DOCKERIZED 1
-ENV NATS_SERVER 2.1.0
+ENV NATS_SERVER 2.1.2
 ENV NATS_SERVER_DOWNLOAD https://github.com/nats-io/nats-server/releases/download/v${NATS_SERVER}/nats-server-v${NATS_SERVER}-windows-amd64.zip
 
 RUN Set-PSDebug -Trace 2
diff --git a/nats_windowsservercore-ltsc2016/Dockerfile b/nats_windowsservercore-ltsc2016/Dockerfile
index fe9c941..3a076f4 100644
--- a/nats_windowsservercore-ltsc2016/Dockerfile
+++ b/nats_windowsservercore-ltsc2016/Dockerfile
@@ -4,7 +4,7 @@ FROM mcr.microsoft.com/windows/servercore:ltsc2016
 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"]
 
 ENV NATS_DOCKERIZED 1
-ENV NATS_SERVER 2.1.0
+ENV NATS_SERVER 2.1.2
 ENV NATS_SERVER_DOWNLOAD https://github.com/nats-io/nats-server/releases/download/v${NATS_SERVER}/nats-server-v${NATS_SERVER}-windows-amd64.zip
 
 RUN Set-PSDebug -Trace 2

@tianon
Copy link
Member

tianon commented Nov 19, 2019

Any particular reason to have dropped the sha256 artifact verification?

@tianon
Copy link
Member

tianon commented Nov 19, 2019

LGTM otherwise (so I'm going to merge, but I'd still like to understand the reasoning behind dropping sha256 ❤️)

Build test of #7004; 3e320c0; amd64 (nats):

$ bashbrew build nats:2.1.2-alpine3.10
Building bashbrew/cache:2fec7a3d931435a4db27acb72453d29e675c1c51ee026651c94f7f291e9c8d30 (nats:2.1.2-alpine3.10)
Tagging nats:2.1.2-alpine3.10
Tagging nats:2.1-alpine3.10
Tagging nats:2-alpine3.10
Tagging nats:alpine3.10
Tagging nats:2.1.2-alpine
Tagging nats:2.1-alpine
Tagging nats:2-alpine
Tagging nats:alpine

$ test/run.sh nats:2.1.2-alpine3.10
testing nats:2.1.2-alpine3.10
	'cve-2014--shellshock' [1/2]...passed
	'override-cmd' [2/2]...passed


$ bashbrew build nats:2.1.2-scratch
Building bashbrew/cache:80b3bd489eae6fb3ef5753aa7074e7143f3fb61e61722ed0a89728d0ecc0024f (nats:2.1.2-scratch)
Tagging nats:2.1.2-scratch
Tagging nats:2.1-scratch
Tagging nats:2-scratch
Tagging nats:scratch
Tagging nats:2.1.2-linux
Tagging nats:2.1-linux
Tagging nats:2-linux
Tagging nats:linux
Tagging nats:2.1.2
Tagging nats:2.1
Tagging nats:2
Tagging nats:latest

$ test/run.sh nats:2.1.2-scratch
testing nats:2.1.2-scratch
	'cve-2014--shellshock' [1/2]...passed
	'override-cmd' [2/2]...image does not appear to contain "echo" -- assuming single-binary image
passed


$ bashbrew build nats:2.1.2-windowsservercore-1809
skipping "nats:2.1.2-windowsservercore-1809" (due to architecture "amd64"; only "windows-amd64" supported)

$ test/run.sh nats:2.1.2-windowsservercore-1809
testing nats:2.1.2-windowsservercore-1809
	image has no tests...skipping


$ bashbrew build nats:2.1.2-nanoserver-1809
skipping "nats:2.1.2-nanoserver-1809" (due to architecture "amd64"; only "windows-amd64" supported)

$ test/run.sh nats:2.1.2-nanoserver-1809
testing nats:2.1.2-nanoserver-1809
	image has no tests...skipping


$ bashbrew build nats:2.1.2-windowsservercore-1803
skipping "nats:2.1.2-windowsservercore-1803" (due to architecture "amd64"; only "windows-amd64" supported)

$ test/run.sh nats:2.1.2-windowsservercore-1803
testing nats:2.1.2-windowsservercore-1803
	image has no tests...skipping


$ bashbrew build nats:2.1.2-nanoserver-1803
skipping "nats:2.1.2-nanoserver-1803" (due to architecture "amd64"; only "windows-amd64" supported)

$ test/run.sh nats:2.1.2-nanoserver-1803
testing nats:2.1.2-nanoserver-1803
	image has no tests...skipping


$ bashbrew build nats:2.1.2-windowsservercore-ltsc2016
skipping "nats:2.1.2-windowsservercore-ltsc2016" (due to architecture "amd64"; only "windows-amd64" supported)

$ test/run.sh nats:2.1.2-windowsservercore-ltsc2016
testing nats:2.1.2-windowsservercore-ltsc2016
	image has no tests...skipping

@tianon tianon merged commit 2fd9dbc into docker-library:master Nov 19, 2019
@kozlovic
Copy link
Contributor Author

@tianon Good question. Yesterday, after doing the release and before submitting the PR here, I realized that the script we have here required the new tag and the SHA for the linux amd64. But then, looking at the Docker file here, I felt that this was not right since this Dockerfile, from what I understand, could be invoked with different arch, which means that the download artifact here would be different, and so comparing the sha of the arch specific downloaded artifact against the "static" linux amd64 sha would fail.

But maybe I misunderstood how this is working?

@kozlovic kozlovic deleted the nats_server_2_1_2 branch November 19, 2019 23:36
@tianon
Copy link
Member

tianon commented Nov 20, 2019

Oh gosh, yes, that's exactly right! What we typically do in that case is embed the hash per-arch; for a couple examples of that if you're interested, see:

Given that they're ZIP files and not just tar, they already include some form of integrity checking, but that doesn't provide quite the same level of guarantee that embedding a hash directly does.

@kozlovic
Copy link
Contributor Author

kozlovic commented Nov 20, 2019

@tianon Thanks, that's something that we could look into doing, definitively. @variadico, our update-server-version.sh should be a bit more elaborate and download the sha sums maybe, and use that to update the Dockerfile on a per arch basis?
Anyway, we definitively intend to put back the sha testing, but for this release we were time constrained (wanted to release for Kubecon).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants