From 95a7736bab33e77658518a6d12e8e314338eb58a Mon Sep 17 00:00:00 2001 From: Misha Sugakov Date: Tue, 17 Sep 2024 14:37:09 +0200 Subject: [PATCH] Fail builds if required args are not provided --- image/db/rhel/konflux.Dockerfile | 1 + image/scanner/rhel/konflux.Dockerfile | 1 + 2 files changed, 2 insertions(+) diff --git a/image/db/rhel/konflux.Dockerfile b/image/db/rhel/konflux.Dockerfile index 24412910f..bfc08392a 100644 --- a/image/db/rhel/konflux.Dockerfile +++ b/image/db/rhel/konflux.Dockerfile @@ -1,6 +1,7 @@ FROM registry.redhat.io/rhel8/postgresql-15:latest AS scanner-db-common ARG SCANNER_TAG +RUN if [[ "$SCANNER_TAG" == "" ]]; then >&2 echo "error: required SCANNER_TAG arg is unset"; exit 6; fi LABEL \ com.redhat.license_terms="https://www.redhat.com/agreements" \ diff --git a/image/scanner/rhel/konflux.Dockerfile b/image/scanner/rhel/konflux.Dockerfile index d40ad2a09..c91314d50 100644 --- a/image/scanner/rhel/konflux.Dockerfile +++ b/image/scanner/rhel/konflux.Dockerfile @@ -7,6 +7,7 @@ ARG BASE_TAG=latest FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.22 AS builder ARG SCANNER_TAG +RUN if [[ "$SCANNER_TAG" == "" ]]; then >&2 echo "error: required SCANNER_TAG arg is unset"; exit 6; fi ENV RELEASE_TAG="${SCANNER_TAG}" ENV GOFLAGS=""