Skip to content

Commit 4c150d3

Browse files
authored
[DPE-3457] Add description to OCI image to be rendered on GitHub Cont… (#73)
1 parent 7cdd7cd commit 4c150d3

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

.github/workflows/publish.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ jobs:
9393
sudo make import TARGET=docker REPOSITORY=${REPOSITORY} TAG=${TAG}\
9494
-o ${{ steps.artifact.outputs.name }}
9595
96+
# Add relevant labels
97+
COMMIT_ID=$(git log -1 --format=%H)
98+
DESCRIPTION=$(yq .description rockcraft.yaml | xargs)
99+
100+
echo "FROM ${IMAGE_NAME}:${TAG}" | docker build --label org.opencontainers.image.description="${DESCRIPTION}" --label org.opencontainers.image.revision="${COMMIT_ID}" --label org.opencontainers.image.source="${{ github.repositoryUrl }}" -t "${IMAGE_NAME}:${TAG}" -
101+
96102
echo "Publishing ${IMAGE_NAME}:${TAG}"
97103
docker push ${IMAGE_NAME}:${TAG}
98104
@@ -119,6 +125,10 @@ jobs:
119125
-o $(find .make_cache -name "*.tag")
120126

121127
IMAGE_NAME=$(make help FLAVOUR=jupyter REPOSITORY=${REPOSITORY} TAG=${TAG} help | grep "Image\:" | cut -d ":" -f2 | xargs)
128+
129+
DESCRIPTION=$(sed -n '/^#\ \-/,/^#\ \-/ p' build/Dockerfile.jupyter | sed 's/^\#\ //g' | sed '$ d' | tail -n+2 | xargs)
130+
131+
echo "FROM ${IMAGE_NAME}:${TAG}" | docker build --label org.opencontainers.image.description="${DESCRIPTION}" --label org.opencontainers.image.revision="${COMMIT_ID}" --label org.opencontainers.image.source="${{ github.repositoryUrl }}" -t "${IMAGE_NAME}:${TAG}" -
122132

123133
echo "Publishing ${IMAGE_NAME}:${TAG}"
124134
docker push ${IMAGE_NAME}:${TAG}

build/Dockerfile.jupyter

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# ---------------------------------------------------------------------------
2+
# This is an OCI image to deploy JupyterLab server instances on K8s, fully
3+
# integrated with Charmed Spark ecosystem and utilities. The image provides an
4+
# automated and seamless user-experience to deploy, operate, manage and monitor
5+
# SparkJob running on K8s cluster.
6+
# It is an open source, end-to-end, production ready data platform on top of
7+
# cloud native technologies.
8+
# ---------------------------------------------------------------------------
9+
110
ARG BASE_IMAGE=base-charmed-spark:latest
211
ARG JUPYTERLAB_VERSION=4.0.0
312
FROM $BASE_IMAGE

rockcraft.yaml

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
name: charmed-spark
2-
summary: Spark ROCK
3-
description: Spark ROCK
2+
summary: Charmed Apache Spark ROCK
3+
description: |
4+
This is an OCI image that bundles Apache Spark binaries together with other
5+
tools of its ecosystem in order to be used in Charmed Operators, providing
6+
an automated and seamless experience to deploy, operate, manage and monitor
7+
SparkJob on K8s cluster.
8+
It is an open source, end-to-end, production ready data platform on top of
9+
cloud native technologies.
10+
411
license: Apache-2.0
512

613
version: "3.4.2"

0 commit comments

Comments
 (0)