Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DPE-3457] Add description to OCI image to be rendered on GitHub Cont… #73

Merged
merged 2 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ jobs:
sudo make import TARGET=docker REPOSITORY=${REPOSITORY} TAG=${TAG}\
-o ${{ steps.artifact.outputs.name }}

# Add relevant labels
COMMIT_ID=$(git log -1 --format=%H)
DESCRIPTION=$(yq .description rockcraft.yaml | xargs)

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}" -

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

Expand All @@ -119,6 +125,10 @@ jobs:
-o $(find .make_cache -name "*.tag")

IMAGE_NAME=$(make help FLAVOUR=jupyter REPOSITORY=${REPOSITORY} TAG=${TAG} help | grep "Image\:" | cut -d ":" -f2 | xargs)

DESCRIPTION=$(sed -n '/^#\ \-/,/^#\ \-/ p' build/Dockerfile.jupyter | sed 's/^\#\ //g' | sed '$ d' | tail -n+2 | xargs)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Can we add a comment here describing what we're trying to do? This is very hard to read and understand.


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}" -

echo "Publishing ${IMAGE_NAME}:${TAG}"
docker push ${IMAGE_NAME}:${TAG}
Expand Down
9 changes: 9 additions & 0 deletions build/Dockerfile.jupyter
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# ---------------------------------------------------------------------------
# This is an OCI image to deploy JupyterLab server instances on K8s, fully
# integrated with Charmed Spark ecosystem and utilities. The image provides an
# automated and seamless user-experience to deploy, operate, manage and monitor
# SparkJob running on K8s cluster.
# It is an open source, end-to-end, production ready data platform on top of
# cloud native technologies.
# ---------------------------------------------------------------------------

ARG BASE_IMAGE=base-charmed-spark:latest
ARG JUPYTERLAB_VERSION=4.0.0
FROM $BASE_IMAGE
Expand Down
11 changes: 9 additions & 2 deletions rockcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: charmed-spark
summary: Spark ROCK
description: Spark ROCK
summary: Charmed Apache Spark ROCK
description: |
This is an OCI image that bundles Apache Spark binaries together with other
tools of its ecosystem in order to be used in Charmed Operators, providing
an automated and seamless experience to deploy, operate, manage and monitor
SparkJob on K8s cluster.
It is an open source, end-to-end, production ready data platform on top of
cloud native technologies.

license: Apache-2.0

version: "3.4.2"
Expand Down
Loading