From cff8a17093315bae3fc7c7ffe3e666189c0ef09b Mon Sep 17 00:00:00 2001 From: Brandon Palm Date: Thu, 8 Aug 2024 17:11:02 -0500 Subject: [PATCH] Add legacy builds (#323) --- .github/workflows/collector-image.yaml | 2 +- .github/workflows/pre-main.yaml | 2 +- Makefile | 12 ++++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/collector-image.yaml b/.github/workflows/collector-image.yaml index 91cafdc..d34e1e9 100644 --- a/.github/workflows/collector-image.yaml +++ b/.github/workflows/collector-image.yaml @@ -158,7 +158,7 @@ jobs: # Build Collector image with latest and version tags - name: Build the `collector` image run: | - make build-image-collector-by-version + make build-image-collector-by-version-legacy env: COLLECTOR_VERSION: ${{ env.COLLECTOR_VERSION }} diff --git a/.github/workflows/pre-main.yaml b/.github/workflows/pre-main.yaml index df8086e..95ef7ca 100644 --- a/.github/workflows/pre-main.yaml +++ b/.github/workflows/pre-main.yaml @@ -140,7 +140,7 @@ jobs: # Build Collector image with unstable tag - name: Build the image - run: make build-image-collector + run: make build-image-collector-legacy env: COLLECTOR_IMAGE_TAG: ${{ env.COLLECTOR_IMAGE_TAG }} diff --git a/Makefile b/Makefile index 4fcbf5a..920f6e5 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ endif MYSQL_CONTAINER_NAME?=mysql-container COLLECTOR_IMAGE_NAME?=redhat-best-practices-for-k8s/collector +COLLECTOR_IMAGE_NAME_LEGACY?=testnetworkfunction/collector COLLECTOR_IMAGE_TAG?=latest COLLECTOR_CONTAINER_NAME?=cnf-collector COLLECTOR_NS?=cnf-collector @@ -135,6 +136,11 @@ build-image-collector: -t ${REGISTRY}/${COLLECTOR_IMAGE_NAME}:${COLLECTOR_IMAGE_TAG} \ -f Dockerfile . +build-image-collector-legacy: + docker build \ + -t ${REGISTRY}/${COLLECTOR_IMAGE_NAME_LEGACY}:${COLLECTOR_IMAGE_TAG} \ + -f Dockerfile . + # Builds collector image with latest and version tags build-image-collector-by-version: docker build \ @@ -142,6 +148,12 @@ build-image-collector-by-version: -t ${REGISTRY}/${COLLECTOR_IMAGE_NAME}:${COLLECTOR_VERSION} \ -f Dockerfile . +build-image-collector-by-version-legacy: + docker build \ + -t ${REGISTRY}/${COLLECTOR_IMAGE_NAME_LEGACY}:${COLLECTOR_IMAGE_TAG} \ + -t ${REGISTRY}/${COLLECTOR_IMAGE_NAME_LEGACY}:${COLLECTOR_VERSION} \ + -f Dockerfile . + # Pushes collector image with latest tag push-image-collector: docker push ${REGISTRY}/${COLLECTOR_IMAGE_NAME}:${COLLECTOR_IMAGE_TAG}