1# Add the CHART framework to the prerequisites image
 2
 3# Requires a more recent docker version than v1.13.1 so don't build from a Centos 7.9 machine
 4
 5#ARG PREREQ_IMAGE_TAG=
 6#ARG UPLOAD_PREFIX=
 7#FROM ${UPLOAD_PREFIX}chart/prereq:${PREREQ_IMAGE_TAG}
 8ARG PREREQ_IMAGE_NAME=
 9FROM ${PREREQ_IMAGE_NAME}
10
11COPY . chart
12RUN cd chart && invoke build --force-all
13
14RUN rm test_prereq.py
15
16WORKDIR /app
17# COPY --from=0 /app/chart /app/chart
18
19# Write a VERSIONS file inside the image
20ARG FRAMEWORK_VCS_BRANCH
21ARG FRAMEWORK_VCS_TAG
22ARG FRAMEWORK_VCS_COMMIT
23ARG FRAMEWORK_BUILD_USER
24ARG FRAMEWORK_BUILD_HOST
25ARG FRAMEWORK_BUILD_DIR
26ARG FRAMEWORK_BUILD_DIRTY
27RUN echo "framework.vcs.branch=${FRAMEWORK_VCS_BRANCH}\n\
28framework.vcs.tag=${FRAMEWORK_VCS_TAG}\n\
29framework.vcs.commit=${FRAMEWORK_VCS_COMMIT}\n\
30framework.build.user=${FRAMEWORK_BUILD_USER}\n\
31framework.build.host=${FRAMEWORK_BUILD_HOST}\n\
32framework.build.dir=${FRAMEWORK_BUILD_DIR}\n\
33framework.build.dirty=${FRAMEWORK_BUILD_DIRTY}"\
34> chart/VERSIONS
35
36# Set image labels
37LABEL "eum.chart.framework.vcs.branch"="${FRAMEWORK_VCS_BRANCH}"
38LABEL "eum.chart.framework.vcs.tag"="${FRAMEWORK_VCS_TAG}"
39LABEL "eum.chart.framework.vcs.commit"="${FRAMEWORK_VCS_COMMIT}"
40LABEL "eum.chart.framework.build.user"="${FRAMEWORK_BUILD_USER}"
41LABEL "eum.chart.framework.build.host"="${FRAMEWORK_BUILD_HOST}"
42LABEL "eum.chart.framework.build.dir"="${FRAMEWORK_BUILD_DIR}"
43LABEL "eum.chart.framework.build.dirty"="${FRAMEWORK_BUILD_DIRTY}"
44
45# Run the auto tests
46CMD pytest chart/tests