Merge pull request #271 from tobiasge/labels-in-build
Add labels for all variants
This commit is contained in:
commit
ed0d099df7
6
build.sh
6
build.sh
@ -247,7 +247,6 @@ for DOCKER_TARGET in "${DOCKER_TARGETS[@]}"; do
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# --label
|
# --label
|
||||||
if [ "${DOCKER_TARGET}" == "main" ]; then
|
|
||||||
DOCKER_BUILD_ARGS+=(
|
DOCKER_BUILD_ARGS+=(
|
||||||
--label "ORIGINAL_TAG=${TARGET_DOCKER_TAG}"
|
--label "ORIGINAL_TAG=${TARGET_DOCKER_TAG}"
|
||||||
|
|
||||||
@ -270,7 +269,6 @@ for DOCKER_TARGET in "${DOCKER_TARGETS[@]}"; do
|
|||||||
--label "NETBOX_GIT_URL=${NETBOX_GIT_URL}"
|
--label "NETBOX_GIT_URL=${NETBOX_GIT_URL}"
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
# --build-arg
|
# --build-arg
|
||||||
DOCKER_BUILD_ARGS+=( --build-arg "NETBOX_PATH=${NETBOX_PATH}" )
|
DOCKER_BUILD_ARGS+=( --build-arg "NETBOX_PATH=${NETBOX_PATH}" )
|
||||||
@ -298,7 +296,9 @@ for DOCKER_TARGET in "${DOCKER_TARGETS[@]}"; do
|
|||||||
# Pushing the docker images if either `--push` or `--push-only` are passed
|
# Pushing the docker images if either `--push` or `--push-only` are passed
|
||||||
###
|
###
|
||||||
if [ "${2}" == "--push" ] || [ "${2}" == "--push-only" ] ; then
|
if [ "${2}" == "--push" ] || [ "${2}" == "--push-only" ] ; then
|
||||||
echo "⏫ Pushing '${TARGET_DOCKER_TAG}"
|
echo "⏫ Inspecting labels on '${TARGET_DOCKER_TAG}'"
|
||||||
|
$DRY docker inspect "${TARGET_DOCKER_TAG}" --format "{{json .Config.Labels}}"
|
||||||
|
echo "⏫ Pushing '${TARGET_DOCKER_TAG}'"
|
||||||
$DRY docker push "${TARGET_DOCKER_TAG}"
|
$DRY docker push "${TARGET_DOCKER_TAG}"
|
||||||
echo "✅ Finished pushing the Docker image '${TARGET_DOCKER_TAG}'."
|
echo "✅ Finished pushing the Docker image '${TARGET_DOCKER_TAG}'."
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user