Skip to content

Commit c49931b

Browse files
committed
add Containerfile.plugin and update tekton config for docker file for down stream build
Signed-off-by: Mangaal <[email protected]>
1 parent 2a9ca63 commit c49931b

File tree

3 files changed

+33
-2
lines changed

3 files changed

+33
-2
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Build Stage
2+
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_golang_1.22 AS builder
3+
WORKDIR /go/src
4+
COPY . /go/src
5+
RUN GIT_COMMIT=$(git rev-parse HEAD) && \
6+
CGO_ENABLED=0 GOOS=linux go build -a -mod=readonly \
7+
-ldflags "-X github.com/redhat-developer/gitops-backend/pkg/health.GitRevision=${GIT_COMMIT}" ./cmd/backend-http
8+
9+
# Final Stage
10+
FROM registry.access.redhat.com/ubi8/ubi-minimal
11+
WORKDIR /
12+
COPY --from=builder /go/src/backend-http .
13+
EXPOSE 8080
14+
ENTRYPOINT ["./backend-http"]
15+
16+
LABEL \
17+
name="openshift-gitops-1/gitops-rhel8" \
18+
version=${CI_CONTAINER_VERSION} \
19+
License="Apache 2.0" \
20+
com.redhat.component="openshift-gitops-container" \
21+
com.redhat.delivery.appregistry="false" \
22+
release=${CI_CONTAINER_RELEASE} \
23+
upstream-version=${CI_UPSTREAM_VERSION} \
24+
upstream-vcs-ref="${CI_GITOPS_BACKEND_UPSTREAM_COMMIT}" \
25+
upstream-vcs-type="git" \
26+
summary="Red Hat OpenShift GitOps Backend Service" \
27+
io.openshift.expose-services="" \
28+
io.openshift.tags="openshift,gitops" \
29+
io.k8s.display-name="Red Hat OpenShift GitOps Backend Service" \
30+
maintainer="William Tam <[email protected]>" \
31+
description="Red Hat OpenShift GitOps Backend Service"

.tekton/gitops-backend-pull-request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ spec:
2727
- name: image-expires-after
2828
value: 5d
2929
- name: dockerfile
30-
value: Dockerfile
30+
value: .konflux/gitops-backend/Containerfile.plugin
3131
pipelineSpec:
3232
description: |
3333
This pipeline is ideal for building multi-arch container images from a Containerfile while maintaining trust after pipeline customization.

.tekton/gitops-backend-push.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ spec:
2424
- name: output-image
2525
value: quay.io/redhat-user-workloads/rh-openshift-gitops-tenant/openshift-gitops-operator/gitops-backend:{{revision}}
2626
- name: dockerfile
27-
value: Dockerfile
27+
value: .konflux/gitops-backend/Containerfile.plugin
2828
pipelineSpec:
2929
description: |
3030
This pipeline is ideal for building multi-arch container images from a Containerfile while maintaining trust after pipeline customization.

0 commit comments

Comments
 (0)