Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Swap TAG_SUFFIX for SCANNER_TAG #1532

Merged
merged 2 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .tekton/scanner-component-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ spec:
value: $(params.build-target-stage)
- name: BUILD_ARGS
value:
- TAG_SUFFIX=$(params.output-tag-suffix)
- SCANNER_TAG=$(tasks.determine-image-tag.results.image-tag)
runAfter:
- prefetch-dependencies
- fetch-scanner-data
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ endif
endif

ifeq ($(TAG),)
TAG=$(shell git describe --tags --abbrev=10 --dirty --long)$(TAG_SUFFIX)
TAG=$(shell git describe --tags --abbrev=10 --dirty --long)
endif

# Set expiration on Quay.io for non-release tags.
Expand Down
6 changes: 3 additions & 3 deletions image/db/rhel/konflux.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM registry.redhat.io/rhel8/postgresql-15:latest AS scanner-db-common

ARG SCANNER_TAG

LABEL \
com.redhat.license_terms="https://www.redhat.com/agreements" \
description="Scanner Database Image for Red Hat Advanced Cluster Security for Kubernetes" \
Expand All @@ -9,9 +11,7 @@ LABEL \
source-location="https://github.com/stackrox/scanner" \
summary="Scanner DB for Red Hat Advanced Cluster Security for Kubernetes" \
url="https://catalog.redhat.com/software/container-stacks/detail/60eefc88ee05ae7c5b8f041c" \
# We must set version label to prevent inheriting value set in the base stage.
# TODO(ROX-20236): configure injection of dynamic version value when it becomes possible.
version="0.0.1-todo"
version="${SCANNER_TAG}"

USER root

Expand Down
10 changes: 5 additions & 5 deletions image/scanner/rhel/konflux.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ ARG BASE_TAG=latest
# Compiling scanner binaries and staging repo2cpe and genesis manifests
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.21 AS builder

ARG TAG_SUFFIX
ENV TAG_SUFFIX="$TAG_SUFFIX"
ARG SCANNER_TAG
ENV RELEASE_TAG="${SCANNER_TAG}"

ENV GOFLAGS=""
ENV CI=1
Expand All @@ -31,6 +31,8 @@ COPY ./blob-genesis_manifests.json image/scanner/dump/genesis_manifests.json
# Common base for scanner slim and full
FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} AS scanner-common

ARG SCANNER_TAG

LABEL \
com.redhat.license_terms="https://www.redhat.com/agreements" \
description="This image supports image scanning for Red Hat Advanced Cluster Security for Kubernetes" \
Expand All @@ -40,9 +42,7 @@ LABEL \
source-location="https://github.com/stackrox/scanner" \
summary="The image scanner for Red Hat Advanced Cluster Security for Kubernetes" \
url="https://catalog.redhat.com/software/container-stacks/detail/60eefc88ee05ae7c5b8f041c" \
# We must set version label to prevent inheriting value set in the base stage.
# TODO(ROX-20236): configure injection of dynamic version value when it becomes possible.
version="0.0.1-todo"
version="${SCANNER_TAG}"

SHELL ["/bin/sh", "-o", "pipefail", "-c"]

Expand Down
Loading