script/publish no longer defaults DOCKER_HOST to an SSH target on one of our servers or PUBLISH_IMAGE to the registry. Both are required, and an unset one stops it with a message naming it. The README says so. The instance name in docs and tests was our server's name; it is now host1/waf in the docs and host1/blog in the tests. Model: opus-5-5
This commit was merged in pull request #397.
This commit is contained in:
1 parent
0a2b2d809f
commit
f33d0a4fce
13 files changed
+61
-56
No files matched your search
+12
-6
@@ -2,8 +2,9 @@
|
||||
# script/publish: build the image on the Docker host and push it to the
|
||||
# registry under four tags: the UTC date (YYYY-MM-DD), the short commit
|
||||
# hash, the branch name and latest. The build is script/docker's, so the
|
||||
# tests and the linter run first. The host and the registry name are
|
||||
# environment variables with defaults, for running it against another.
|
||||
# tests and the linter run first. DOCKER_HOST names the Docker host and
|
||||
# PUBLISH_IMAGE the image in the registry. Both must be set; neither has
|
||||
# a default.
|
||||
#
|
||||
# The working tree must be clean: the hash tag names a commit, and an
|
||||
# image built from uncommitted changes would carry a hash that does not
|
||||
@@ -13,11 +14,16 @@ set -eu
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)"
|
||||
ROOT="$(cd "$SCRIPT_DIR/.." && pwd -P)"
|
||||
|
||||
: "${DOCKER_HOST:=ssh://root@fsn1app1}"
|
||||
: "${PUBLISH_IMAGE:=git.eeqj.de/sneak/smallwebwaf}"
|
||||
export DOCKER_HOST
|
||||
|
||||
main() {
|
||||
if [ -z "${DOCKER_HOST:-}" ]; then
|
||||
echo "script/publish: DOCKER_HOST is not set; set it to the Docker host that builds the image, such as ssh://user@build.example.com" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "${PUBLISH_IMAGE:-}" ]; then
|
||||
echo "script/publish: PUBLISH_IMAGE is not set; set it to the image name in the registry, such as registry.example.com/smallwebwaf" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd "$ROOT"
|
||||
|
||||
# Own line: a failing command substitution inside an argument does
|
||||
|
||||
Reference in new issue
Block a user