File tree Expand file tree Collapse file tree 3 files changed +19
-6
lines changed Expand file tree Collapse file tree 3 files changed +19
-6
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+
4+ # Tag the latest build with the short git sha as well as version of key runtimes
5+ # and packages.
6+ GIT_SHA_TAG=${SOURCE_COMMIT: 0: 12}
7+ docker tag $IMAGE_NAME " $DOCKER_REPO :$GIT_SHA_TAG "
8+ PY_VERSION_TAG=" python-$( docker run --rm ${IMAGE_NAME} python --version 2>&1 | awk ' {print $2}' ) "
9+ docker tag $IMAGE_NAME " $DOCKER_REPO :$PY_VERSION_TAG "
10+ NB_VERSION_TAG=" notebook-$( docker run --rm -a STDOUT ${IMAGE_NAME} jupyter-notebook --version | tr -d ' \r' ) "
11+ docker tag $IMAGE_NAME " $DOCKER_REPO :${NB_VERSION_TAG%% } "
12+ LAB_VERSION_TAG=" lab-$( docker run --rm -a STDOUT ${IMAGE_NAME} jupyter-lab --version | tr -d ' \r' ) "
13+ docker tag $IMAGE_NAME " $DOCKER_REPO :${LAB_VERSION_TAG%% \r } "
14+ HUB_VERSION_TAG=" hub-$( docker run --rm -a STDOUT ${IMAGE_NAME} jupyterhub --version | tr -d ' \r' ) "
15+ docker tag $IMAGE_NAME " $DOCKER_REPO :${HUB_VERSION_TAG%% \r } "
Original file line number Diff line number Diff line change 1- INDEX_ROW="|\`${BUILD_TIMESTAMP}\`|\`jupyter/${IMAGE_SHORT_NAME}:${GIT_SHA_TAG}\`|[Git diff](https://github.com/jupyter/docker-stacks/commit/${SOURCE_COMMIT})<br />[Dockerfile](https://github.com/jupyter/docker-stacks/blob/${SOURCE_COMMIT}/${IMAGE_SHORT_NAME}/Dockerfile)<br />[Build manifest](./${IMAGE_SHORT_NAME}-${GIT_SHA_TAG})|"
1+ INDEX_ROW="|\`${BUILD_TIMESTAMP}\`|\`jupyter/${IMAGE_SHORT_NAME}:${GIT_SHA_TAG}\`<br />\`jupyter/${IMAGE_SHORT_NAME}:${PY_VERSION_TAG}\`<br />\`jupyter/${IMAGE_SHORT_NAME}:${NB_VERSION_TAG}\`<br />\`jupyter/${IMAGE_SHORT_NAME}:${LAB_VERSION_TAG}\`<br />\`jupyter/${IMAGE_SHORT_NAME}:${HUB_VERSION_TAG}\` |[Git diff](https://github.com/jupyter/docker-stacks/commit/${SOURCE_COMMIT})<br />[Dockerfile](https://github.com/jupyter/docker-stacks/blob/${SOURCE_COMMIT}/${IMAGE_SHORT_NAME}/Dockerfile)<br />[Build manifest](./${IMAGE_SHORT_NAME}-${GIT_SHA_TAG})|"
22sed "/|-|/a ${INDEX_ROW}" -i "$INDEX_FILE"
Original file line number Diff line number Diff line change 11#! /bin/bash
22set -e
33
4- # Tag the latest build with the short git sha. Push the tag in addition
5- # to the "latest" tag already pushed.
6- GIT_SHA_TAG=${SOURCE_COMMIT: 0: 12}
7- docker tag $IMAGE_NAME $DOCKER_REPO :$GIT_SHA_TAG
8- docker push $DOCKER_REPO :$GIT_SHA_TAG
4+ # Apply and push all tags
5+ source hooks/apply_tags
6+ docker push $DOCKER_REPO
97
108# Create a working directory.
119BUILD_TIMESTAMP=$( date -u +%FT%TZ)
You can’t perform that action at this time.
0 commit comments