Skip to content

Commit

Permalink
Fix drone bug. Autoscaler image not being pushed
Browse files Browse the repository at this point in the history
Signed-off-by: Manuel Buil <mbuil@suse.com>
  • Loading branch information
manuelbuil committed Jan 23, 2024
1 parent 21b6a75 commit 205b2ec
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
11 changes: 11 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,15 @@ platform:
os: linux
arch: amd64
steps:
- name: extract-tag
image: alpine
commands:
- apk add --no-cache make
- echo $(make -s print-autoscaler-tag) > ./tag.txt
when:
event:
- tag

- name: push
image: plugins/manifest:1.2.3
settings:
Expand All @@ -164,9 +173,11 @@ steps:
from_secret: docker_username
spec: manifest-autoscaler.tmpl
ignore_missing: true
template: ./tag.txt
when:
event:
- tag

depends_on:
- linux-amd64
- linux-arm64
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,6 @@ image-manifest-autoscaler:
image-scan-autoscaler:
trivy image --severity $(SEVERITIES) --no-progress --ignore-unfixed $(ORG)/hardened-cluster-autoscaler:$(AUTOSCALER_TAG)

.PHONY: print-autoscaler-tag
print-autoscaler-tag:
echo ${AUTOSCALER_TAG}
7 changes: 4 additions & 3 deletions manifest-autoscaler.tmpl
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
image: rancher/hardened-cluster-autoscaler:{{build.tag}}
# {{ . }} is consuming the extracted value in tag.txt templated in manifest-autoscaler drone pipeline
image: rancher/hardened-cluster-autoscaler:{{ . }}
manifests:
-
image: rancher/hardened-cluster-autoscaler:{{build.tag}}-amd64
image: rancher/hardened-cluster-autoscaler:{{ . }}-amd64
platform:
architecture: amd64
os: linux
-
image: rancher/hardened-cluster-autoscaler:{{build.tag}}-arm64
image: rancher/hardened-cluster-autoscaler:{{ . }}-arm64
platform:
architecture: arm64
os: linux

0 comments on commit 205b2ec

Please sign in to comment.