mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-09-27 18:46:23 +09:00
Check the registry login before releasing
The GitHub release was created before the image push failed on a missing docker login, leaving the release half done.
This commit is contained in:
+14
-1
@@ -18,7 +18,8 @@ GIT_SHA = `git rev-parse HEAD`.strip
|
||||
MANUAL_NOTES = ARGV.delete("--notes")
|
||||
VERSION = ARGV[0]
|
||||
|
||||
DOCKER_IMAGE_NAME = "registry.once.com/campfire"
|
||||
DOCKER_REGISTRY = "registry.once.com"
|
||||
DOCKER_IMAGE_NAME = "#{DOCKER_REGISTRY}/campfire"
|
||||
DOCKER_LATEST_IMAGE_NAME = [ DOCKER_IMAGE_NAME, :latest ].join(":")
|
||||
DOCKER_TAGGED_IMAGE_NAME = [ DOCKER_IMAGE_NAME, GIT_SHA ].join(":")
|
||||
|
||||
@@ -47,6 +48,18 @@ def announcing(message)
|
||||
yield
|
||||
end
|
||||
|
||||
announcing "Checking #{DOCKER_REGISTRY} login..." do
|
||||
unless system "docker", "manifest", "inspect", DOCKER_LATEST_IMAGE_NAME, out: File::NULL, err: File::NULL
|
||||
abort <<~MESSAGE
|
||||
Not logged in to #{DOCKER_REGISTRY}. Run:
|
||||
|
||||
docker login #{DOCKER_REGISTRY}
|
||||
|
||||
The credentials are in the "chatinabox" entry in 1Password.
|
||||
MESSAGE
|
||||
end
|
||||
end
|
||||
|
||||
on(:local) do
|
||||
builder_found = test :docker, :buildx, :inspect, BUILDER_NAME
|
||||
|
||||
|
||||
Reference in New Issue
Block a user