Skip to content

Commit 4859fee

Browse files
Sachin-Yeshwanthandrewschoen
authored andcommitted
setup snmp-notifier 7.1 container in konflux
1 parent deb04c9 commit 4859fee

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

.tekton/snmp-notifier-7-1-pull-request.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ spec:
2424
- name: revision
2525
value: '{{revision}}'
2626
- name: output-image
27-
value: quay.io/rhceph-dev/snmp-notifier:on-pr-{{revision}}
27+
value: quay.io/rhceph-ci/snmp-notifier:on-pr-v7.1-{{revision}}
2828
- name: image-expires-after
2929
value: 5d
3030
- name: build-platforms
3131
value:
3232
- linux/x86_64
33+
- linux/s390x
34+
- linux/ppc64le
3335
- name: dockerfile
3436
value: Dockerfile
3537
- name: path-context
@@ -554,6 +556,11 @@ spec:
554556
value: $(tasks.build-image-index.results.IMAGE_URL)
555557
- name: IMAGE_DIGEST
556558
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
559+
- name: ADDITIONAL_TAGS
560+
value:
561+
- "pull-request-{{pull_request_number}}"
562+
- "from-branch-{{source_branch}}"
563+
- "{{target_branch}}-$(tasks.clone-repository.results.commit-timestamp)"
557564
runAfter:
558565
- build-image-index
559566
taskRef:

.tekton/snmp-notifier-7-1-push.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ spec:
2323
- name: revision
2424
value: '{{revision}}'
2525
- name: output-image
26-
value: quay.io/rhceph-dev/snmp-notifier:{{revision}}
26+
value: quay.io/rhceph-ci/snmp-notifier:v7.1-{{revision}}
2727
- name: build-platforms
2828
value:
2929
- linux/x86_64
30+
- linux/s390x
31+
- linux/ppc64le
3032
- name: dockerfile
3133
value: Dockerfile
3234
- name: path-context
@@ -551,6 +553,10 @@ spec:
551553
value: $(tasks.build-image-index.results.IMAGE_URL)
552554
- name: IMAGE_DIGEST
553555
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
556+
- name: ADDITIONAL_TAGS
557+
value:
558+
- "v7.1"
559+
- "{{target_branch}}-$(tasks.clone-repository.results.commit-timestamp)"
554560
runAfter:
555561
- build-image-index
556562
taskRef:

Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Build stage 1
22

33
#FROM openshift/golang-builder:rhel_9_golang_1.23 AS builder
4-
FROM quay.io/projectquay/golang:1.23 AS builder
4+
FROM --platform=$BUILDPLATFORM quay.io/projectquay/golang:1.23 AS builder
55

66
COPY snmp_notifier snmp_notifier
77

@@ -22,7 +22,7 @@ RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -mod=readonly \
2222
-a -tags netgo
2323

2424
# Build stage 2
25-
FROM registry.redhat.io/ubi9/ubi-minimal
25+
FROM --platform=$BUILDPLATFORM registry.access.redhat.com/ubi9-minimal:latest
2626

2727
# Update the image to get the latest CVE updates
2828
RUN microdnf update -y && \
@@ -46,5 +46,4 @@ RUN chmod +x "$OPBIN"
4646

4747
EXPOSE 9464
4848
ENTRYPOINT ["/usr/local/bin/snmp_notifier"]
49-
CMD ["--snmp.trap-description-template=/etc/snmp_notifier/description-template.tpl"]
50-
49+
CMD ["--snmp.trap-description-template=/etc/snmp_notifier/description-template.tpl"]

0 commit comments

Comments
 (0)