forked from argoproj/argo-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CPaaS images for argoexec and workflowcontroller
Signed-off-by: Ricardo M. Oliveira <rmartine@redhat.com>
- Loading branch information
Showing
2 changed files
with
137 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
ARG SOURCE_CODE=. | ||
ARG CI_CONTAINER_VERSION="unknown" | ||
ARG CI_CONTAINER_RELEASE="unknown" | ||
# Builder args | ||
ARG GIT_COMMIT=unknown | ||
ARG GIT_TAG=unknown | ||
ARG GIT_TREE_STATE=unknown | ||
|
||
FROM registry.redhat.io/ubi8/go-toolset:1.21 as builder | ||
|
||
# Build args to be used at this step | ||
ARG SOURCE_CODE | ||
WORKDIR /workspace | ||
|
||
## CPaaS CODE BEGIN ## | ||
COPY ${REMOTE_SOURCE} ${REMOTE_SOURCE_DIR} | ||
ENV SOURCE_CODE=${REMOTE_SOURCE}/app/ | ||
## CPaaS CODE END ## | ||
|
||
USER root | ||
RUN dnf install -y \ | ||
git \ | ||
make \ | ||
ca-certificates \ | ||
wget \ | ||
gcc \ | ||
bash \ | ||
mailcap | ||
|
||
COPY ${SOURCE_CODE}/go.mod . | ||
COPY ${SOURCE_CODE}/go.sum . | ||
|
||
RUN if [ -z ${CACHITO_ENV_FILE} ]; then \ | ||
go mod download; \ | ||
else \ | ||
source ${CACHITO_ENV_FILE}; \ | ||
fi | ||
# Copy the source | ||
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:latest 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" \ | ||
version="${CI_CONTAINER_VERSION}" \ | ||
git.url="${CI_ARGO_WORKFLOWS_UPSTREAM_URL}" \ | ||
git.commit="${CI_ARGO_WORKFLOWS_UPSTREAM_COMMIT}" \ | ||
summary="odh-data-science-pipelines-argo-argoexec" \ | ||
io.openshift.expose-services="" \ | ||
io.k8s.display-name="odh-data-science-pipelines-argo-argoexec" \ | ||
maintainer="['managed-open-data-hub@redhat.com']" \ | ||
description="Argo Executor for Argo Workflows used in Data Science Pipelines" \ | ||
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" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Build arguments | ||
ARG SOURCE_CODE=. | ||
ARG CI_CONTAINER_VERSION="unknown" | ||
ARG CI_CONTAINER_RELEASE="unknown" | ||
# Builder args | ||
ARG GIT_COMMIT=unknown | ||
ARG GIT_TAG=unknown | ||
ARG GIT_TREE_STATE=unknown | ||
|
||
FROM registry.redhat.io/ubi8/go-toolset:1.21 as builder | ||
|
||
# Build args to be used at this step | ||
ARG SOURCE_CODE | ||
WORKDIR /workspace | ||
|
||
## CPaaS CODE BEGIN ## | ||
COPY ${REMOTE_SOURCE} ${REMOTE_SOURCE_DIR} | ||
ENV SOURCE_CODE=${REMOTE_SOURCE}/app | ||
## CPaaS CODE END ## | ||
USER root | ||
RUN dnf install -y \ | ||
git \ | ||
make \ | ||
ca-certificates \ | ||
wget \ | ||
gcc \ | ||
bash \ | ||
mailcap | ||
|
||
COPY ${SOURCE_CODE}/go.mod . | ||
COPY ${SOURCE_CODE}/go.sum . | ||
RUN if [ -z ${CACHITO_ENV_FILE} ]; then \ | ||
go mod download; \ | ||
else \ | ||
source ${CACHITO_ENV_FILE}; \ | ||
fi | ||
# Copy the source | ||
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:latest 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" \ | ||
version="${CI_CONTAINER_VERSION}" \ | ||
git.url="${CI_ARGO_WORKFLOWS_UPSTREAM_URL}" \ | ||
git.commit="${CI_ARGO_WORKFLOWS_UPSTREAM_COMMIT}" \ | ||
summary="odh-data-science-pipelines-argo-workflowcontroller" \ | ||
io.openshift.expose-services="" \ | ||
io.k8s.display-name="odh-data-science-pipelines-argo-workflowcontroller" \ | ||
maintainer="['managed-open-data-hub@redhat.com']" \ | ||
description="Argo Workflow Controller for Argo Workflows used in Data Science Pipelines" \ | ||
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" ] |