@@ -9,7 +9,7 @@ COPY .konflux/patches patches/
9
9
RUN set -e; for f in patches/*.patch; do echo ${f}; [[ -f ${f} ]] || continue; git apply ${f}; done
10
10
COPY head HEAD
11
11
ENV GODEBUG="http2server=0"
12
- RUN cd image/git-init && go build -ldflags="-X 'knative.dev/pkg/changeset.rev=${CHANGESET_REV:0:7} '" -mod=vendor -v -o /tmp/tektoncd-catalog-git-clone
12
+ RUN cd image/git-init && go build -ldflags="-X 'knative.dev/pkg/changeset.rev=$(cat HEAD) '" -mod=vendor -v -o /tmp/tektoncd-catalog-git-clone
13
13
14
14
FROM $RUNTIME
15
15
ARG VERSION=git-init-1.15.3
@@ -18,8 +18,12 @@ ENV BINARY=git-init \
18
18
KO_APP=/ko-app \
19
19
KO_DATA_PATH=/kodata
20
20
21
+ RUN dnf install -y openssh-clients git git-lfs shadow-utils
22
+
21
23
COPY --from=builder /tmp/tektoncd-catalog-git-clone ${KO_APP}/${BINARY}
22
24
COPY head ${KO_DATA_PATH}/HEAD
25
+ RUN chgrp -R 0 ${KO_APP} && \
26
+ chmod -R g+rwX ${KO_APP}
23
27
24
28
LABEL \
25
29
com.redhat.component="openshift-pipelines-git-init-rhel8-container" \
@@ -29,10 +33,10 @@ LABEL \
29
33
30
34
description="Red Hat OpenShift Pipelines Git-init" \
31
35
io.k8s.display-name="Red Hat OpenShift Pipelines Git-init" \
32
- io.k8s.description="Red Hat OpenShift Pipelines Git-init " \
36
+ io.k8s.description="git-init is a binary that makes it easy to clone a repository from a Tekton Task. It is usually used via the git-clone Tasks. " \
33
37
io.openshift.tags="pipelines,tekton,openshift"
34
38
35
- RUN groupadd -r -g 65532 nonroot && useradd --no-log-init -r -u 65532 -g nonroot nonroot
39
+ RUN groupadd -r -g 65532 nonroot && useradd --no-log-init -r -u 65532 -g nonroot -d /home/git -m nonroot
36
40
USER 65532
37
41
38
42
ENTRYPOINT ["/ko-app/git-init" ]
0 commit comments