Skip to content

Commit

Permalink
Add legacy builds (#323)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebrandon1 authored Aug 8, 2024
1 parent b549353 commit cff8a17
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/collector-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -135,13 +136,24 @@ 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 \
-t ${REGISTRY}/${COLLECTOR_IMAGE_NAME}:${COLLECTOR_IMAGE_TAG} \
-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}
Expand Down

0 comments on commit cff8a17

Please sign in to comment.