Skip to content

Commit e61e4e3

Browse files
authored
Merge pull request #308 from rancher/push-image-to-staging-scc
[main] More CI fixes to enable pushing to Prime registry
2 parents 78605eb + c7cf0ed commit e61e4e3

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

.github/workflows/publish.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ jobs:
121121
steps:
122122
- name : Checkout repository
123123
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
124+
- name: Prepare helm charts (needed for build)
125+
run: |
126+
GIT_TAG=${{ github.ref_name }} BUILD_TARGET=prometheus-federator make package-helm && echo "pf: release chart prepared"
127+
BUILD_TARGET=prometheus-federator make build-chart && echo "pf: embedded project-monitoring chart prepared"
124128
- name: "Read Secrets"
125129
if: github.repository == 'rancher/prometheus-federator'
126130
uses: rancher-eio/read-vault-secrets@main

Makefile

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
TARGETS := $(shell ls scripts|grep -ve "^util-\|entry\|^pull-scripts")
22

3-
# Define target platforms, image builder and the fully qualified image name.
4-
TARGET_PLATFORMS ?= linux/amd64,linux/arm64
5-
63
# Default behavior for targets without dapper
74
$(TARGETS):
85
./scripts/$@
@@ -28,10 +25,3 @@ list-make:
2825
@LC_ALL=C $(MAKE) -pRrq -f $(firstword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/(^|\n)# Files(\n|$$)/,/(^|\n)# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | grep -E -v -e '^[^[:alnum:]]' -e '^$@$$'
2926
# IMPORTANT: The line above must be indented by (at least one)
3027
# *actual TAB character* - *spaces* do *not* work.
31-
32-
push-image: validate version ## build the container image targeting all platforms defined by TARGET_PLATFORMS and push to a registry.
33-
docker buildx build -f package/Dockerfile-prometheus-federator \
34-
--build-arg RANCHER_PROJECT_MONITORING=$RANCHER_PROJECT_MONITORING \
35-
--platform=$(TARGET_PLATFORMS) \
36-
-t "$(IMAGE)" --push .
37-
@echo "Pushed $(IMAGE)"

scripts/push-image

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
source $(dirname $0)/version
5+
6+
cd $(dirname $0)/..
7+
8+
docker buildx build -f package/Dockerfile-prometheus-federator \
9+
--build-arg RANCHER_PROJECT_MONITORING=${RANCHER_PROJECT_MONITORING} ${IID_FILE_FLAG} \
10+
--platform="linux/amd64,linux/arm64" \
11+
-t ${IMAGE} --push .

0 commit comments

Comments
 (0)