Skip to content

Commit

Permalink
Merge pull request argoproj#4 from red-hat-data-services/konflux-2.16
Browse files Browse the repository at this point in the history
Review Dockerfile and RPMs file for building argo-argoexec and argo-workflowcontroller in Konflux
  • Loading branch information
MohammadiIram authored Oct 16, 2024
2 parents 19fc17c + dfdf4a8 commit 31963f3
Show file tree
Hide file tree
Showing 5 changed files with 186 additions and 0 deletions.
51 changes: 51 additions & 0 deletions argo-argoexec/Dockerfile.konflux
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
ARG SOURCE_CODE=.

# Builder args
ARG GIT_COMMIT=unknown
ARG GIT_TAG=unknown
ARG GIT_TREE_STATE=unknown

FROM registry.redhat.io/ubi8/go-toolset@sha256:4ec05fd5b355106cc0d990021a05b71bbfb9231e4f5bdc0c5316515edf6a1c96 as builder

# Build args to be used at this step
ARG SOURCE_CODE
WORKDIR /workspace

USER root
RUN dnf install -y mailcap

COPY ${SOURCE_CODE}/go.mod .
COPY ${SOURCE_CODE}/go.sum .
COPY ${SOURCE_CODE}/ ./

RUN --mount=type=cache,target=/go/pkg/mod --mount=type=cache,target=/root/.cache/go-build make dist/argoexec GIT_COMMIT=${GIT_COMMIT} GIT_TAG=${GIT_TAG} GIT_TREE_STATE=${GIT_TREE_STATE}


####################################################################################################
FROM registry.redhat.io/ubi8/ubi-minimal@sha256:7583ca0ea52001562bd81a961da3f75222209e6192e4e413ee226cff97dbd48c AS argoexec


ARG CI_CONTAINER_VERSION

LABEL com.redhat.component="odh-data-science-pipelines-argo-argoexec-container" \
name="managed-open-data-hub/odh-data-science-pipelines-argo-argoexec-rhel8" \
description="Argo Executor for Argo Workflows used in Data Science Pipelines" \
summary="odh-data-science-pipelines-argo-argoexec" \
maintainer="['managed-open-data-hub@redhat.com']" \
io.openshift.expose-services="" \
io.k8s.display-name="odh-data-science-pipelines-argo-argoexec" \
io.k8s.description="odh-data-science-pipelines-argo-argoexec" \
com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf"

WORKDIR /bin

COPY --from=builder /workspace/dist/argoexec /bin/
COPY --from=builder /etc/mime.types /etc/mime.types
COPY --from=builder /workspace/hack/ssh_known_hosts /etc/ssh/
COPY --from=builder /workspace/hack/nsswitch.conf /etc/

RUN chmod +x /bin/argoexec

USER 2000

ENTRYPOINT [ "/bin/argoexec" ]
45 changes: 45 additions & 0 deletions argo-workflowcontroller/Dockerfile.konflux
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Build arguments
ARG SOURCE_CODE=.

# Builder args
ARG GIT_COMMIT=unknown
ARG GIT_TAG=unknown
ARG GIT_TREE_STATE=unknown

FROM registry.redhat.io/ubi8/go-toolset@sha256:4ec05fd5b355106cc0d990021a05b71bbfb9231e4f5bdc0c5316515edf6a1c96 as builder

# Build args to be used at this step
ARG SOURCE_CODE
WORKDIR /workspace

USER root
RUN dnf install -y mailcap

COPY ${SOURCE_CODE}/go.mod .
COPY ${SOURCE_CODE}/go.sum .
COPY ${SOURCE_CODE}/ ./

RUN --mount=type=cache,target=/go/pkg/mod --mount=type=cache,target=/root/.cache/go-build make dist/workflow-controller GIT_COMMIT=${GIT_COMMIT} GIT_TAG=${GIT_TAG} GIT_TREE_STATE=${GIT_TREE_STATE}

####################################################################################################
FROM registry.redhat.io/ubi8/ubi-minimal@sha256:7583ca0ea52001562bd81a961da3f75222209e6192e4e413ee226cff97dbd48c AS workflow-controller


ARG CI_CONTAINER_VERSION

LABEL com.redhat.component="odh-data-science-pipelines-argo-workflowcontroller-container" \
name="managed-open-data-hub/odh-data-science-pipelines-argo-workflowcontroller-rhel8" \
description="Argo Workflow Controller for Argo Workflows used in Data Science Pipelines" \
summary="odh-data-science-pipelines-argo-workflowcontroller" \
maintainer="['managed-open-data-hub@redhat.com']" \
io.openshift.expose-services="" \
io.k8s.display-name="odh-data-science-pipelines-argo-workflowcontroller" \
io.k8s.description="odh-data-science-pipelines-argo-workflowcontroller" \
com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf"

WORKDIR /bin
USER 8737
COPY --from=builder /workspace/hack/ssh_known_hosts /etc/ssh/
COPY --from=builder /workspace/hack/nsswitch.conf /etc/
COPY --chown=8737 --from=builder /workspace/dist/workflow-controller /bin/workflow-controller
ENTRYPOINT [ "/bin/workflow-controller" ]
5 changes: 5 additions & 0 deletions rpms.in.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
contentOrigin:
repofiles:
- ubi.repo
packages:
- mailcap
15 changes: 15 additions & 0 deletions rpms.lock.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
lockfileVersion: 1
lockfileVendor: redhat
arches:
- arch: x86_64
packages:
- url: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi8/8/x86_64/baseos/os/Packages/m/mailcap-2.1.48-3.el8.noarch.rpm
repoid: ubi-8-baseos-rpms
size: 39708
checksum: sha256:b2d5f3c4e187dc8c6f94b551fc021925188ab7675e02a317111aa0b49965f03e
name: mailcap
evr: 2.1.48-3.el8
sourcerpm: mailcap-2.1.48-3.el8.src.rpm
source: []
module_metadata: []
70 changes: 70 additions & 0 deletions ubi.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
[ubi-8-baseos-rpms]
name = Red Hat Universal Base Image 8 (RPMs) - BaseOS
baseurl = https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi8/8/$basearch/baseos/os
enabled = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
gpgcheck = 1

[ubi-8-baseos-debug-rpms]
name = Red Hat Universal Base Image 8 (Debug RPMs) - BaseOS
baseurl = https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi8/8/$basearch/baseos/debug
enabled = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
gpgcheck = 1

[ubi-8-baseos-source]
name = Red Hat Universal Base Image 8 (Source RPMs) - BaseOS
baseurl = https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi8/8/$basearch/baseos/source/SRPMS
enabled = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
gpgcheck = 1

[ubi-8-appstream-rpms]
name = Red Hat Universal Base Image 8 (RPMs) - AppStream
baseurl = https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi8/8/$basearch/appstream/os
enabled = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
gpgcheck = 1

[ubi-8-appstream-debug-rpms]
name = Red Hat Universal Base Image 8 (Debug RPMs) - AppStream
baseurl = https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi8/8/$basearch/appstream/debug
enabled = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
gpgcheck = 1

[ubi-8-appstream-source]
name = Red Hat Universal Base Image 8 (Source RPMs) - AppStream
baseurl = https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi8/8/$basearch/appstream/source/SRPMS
enabled = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
gpgcheck = 1

[ubi-8-codeready-builder-rpms]
name = Red Hat Universal Base Image 8 (RPMs) - CodeReady Builder
baseurl = https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi8/8/$basearch/codeready-builder/os
enabled = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
gpgcheck = 1

[ubi-8-codeready-builder]
name = Red Hat Universal Base Image 8 (RPMs) - CodeReady Builder
baseurl = https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi8/8/$basearch/codeready-builder/os
enabled = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
gpgcheck = 1


[ubi-8-codeready-builder-debug-rpms]
name = Red Hat Universal Base Image 8 (Debug RPMs) - CodeReady Builder
baseurl = https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi8/8/$basearch/codeready-builder/debug
enabled = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
gpgcheck = 1

[ubi-8-codeready-builder-source]
name = Red Hat Universal Base Image 8 (Source RPMs) - CodeReady Builder
baseurl = https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi8/8/$basearch/codeready-builder/source/SRPMS
enabled = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
gpgcheck = 1

0 comments on commit 31963f3

Please sign in to comment.