diff --git a/.tekton/on-pull-request.yaml b/.tekton/on-pull-request.yaml index b7c566f..4d6659d 100644 --- a/.tekton/on-pull-request.yaml +++ b/.tekton/on-pull-request.yaml @@ -87,7 +87,7 @@ spec: value: $(params.path-context) - name: BUILDER_IMAGE value: >- - registry.redhat.io/rhel8/buildah@sha256:aac6629389db17e99894c5bee0da01d4c8065d11d8c6f6e1602f9484290baa70 + registry.redhat.io/rhel8/buildah@sha256:6d2dcb651ba680cf4ec74331f8349dec43d071d420625a1703370acc8d984e9e - name: STORAGE_DRIVER value: vfs - name: FORMAT @@ -97,6 +97,9 @@ spec: --target base --squash --label=quay.expires-after=$(params.image-expires-after) + --label=agent_morpheus_vcs_branch={{source_branch}} + --label=agent_morpheus_vcs_build_commit_id={{revision}} + --label=agent_morpheus_vcs_repo={{repo_url}} taskRef: resolver: cluster params: diff --git a/.tekton/on-push.yaml b/.tekton/on-push.yaml index d3fc4a2..7172a5b 100644 --- a/.tekton/on-push.yaml +++ b/.tekton/on-push.yaml @@ -82,7 +82,7 @@ spec: value: $(params.path-context) - name: BUILDER_IMAGE value: >- - registry.redhat.io/rhel8/buildah@sha256:aac6629389db17e99894c5bee0da01d4c8065d11d8c6f6e1602f9484290baa70 + registry.redhat.io/rhel8/buildah@sha256:6d2dcb651ba680cf4ec74331f8349dec43d071d420625a1703370acc8d984e9e - name: STORAGE_DRIVER value: vfs - name: FORMAT @@ -91,6 +91,9 @@ spec: value: >- --target base --squash + --label=agent_morpheus_vcs_branch={{source_branch}} + --label=agent_morpheus_vcs_build_commit_id={{revision}} + --label=agent_morpheus_vcs_repo={{repo_url}} taskRef: resolver: cluster params: diff --git a/.tekton/on-tag.yaml b/.tekton/on-tag.yaml index 7549b48..d0ad527 100644 --- a/.tekton/on-tag.yaml +++ b/.tekton/on-tag.yaml @@ -110,7 +110,7 @@ spec: value: $(params.path-context) - name: BUILDER_IMAGE value: >- - registry.redhat.io/rhel8/buildah@sha256:aac6629389db17e99894c5bee0da01d4c8065d11d8c6f6e1602f9484290baa70 + registry.redhat.io/rhel8/buildah@sha256:6d2dcb651ba680cf4ec74331f8349dec43d071d420625a1703370acc8d984e9e - name: STORAGE_DRIVER value: vfs - name: FORMAT @@ -119,6 +119,9 @@ spec: value: >- --target base --squash + --label=agent_morpheus_vcs_branch={{source_branch}} + --label=agent_morpheus_vcs_build_commit_id={{revision}} + --label=agent_morpheus_vcs_repo={{repo_url}} taskRef: resolver: cluster params: diff --git a/Dockerfile b/Dockerfile index 3f21404..d62c3e6 100755 --- a/Dockerfile +++ b/Dockerfile @@ -76,10 +76,7 @@ RUN --mount=type=cache,id=pip_cache,target=/root/.cache/pip,sharing=locked \ COPY . /workspace/ # Mark all git repos as safe to avoid git errors -RUN echo $'\ -[safe]\n\ - directory = *\n\ -'> /root/.gitconfig +RUN bash -c "echo -e \"[safe]\\n\\tdirectory = *\"" > /root/.gitconfig ENTRYPOINT [ "/opt/conda/envs/morpheus-vuln-analysis/bin/tini", "--", "/workspace/docker/scripts/entrypoint.sh"]