tests: add unit test for label skipping

This commit is contained in:
Jose Diaz-Gonzalez
2020-12-12 16:33:39 -05:00
parent a42786a465
commit f2a3cfc0b4
2 changed files with 37 additions and 2 deletions

View File

@@ -16,7 +16,7 @@ trigger-builder-dockerfile-builder-release() {
local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
if "$DOCKER_BIN" image history --format "{{ json . }}" "$IMAGE" | grep -q "ONBUILD"; then
dokku_log_warn "Image contains ONBUILD directive(s), skipping re-labeling"
dokku_log_warn "Image contains one or more ONBUILD directives, skipping label injection"
else
echo "FROM $IMAGE" | suppress_output "$DOCKER_BIN" image build --label=com.dokku.image-stage=release --label=com.dokku.app-name=$APP --label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=dokku -t "$IMAGE" -
fi