Skip to content

Commit

Permalink
Release 23.08.1
Browse files Browse the repository at this point in the history
  • Loading branch information
accetto committed Aug 19, 2023
1 parent ce9bc6c commit 1dfb8d9
Show file tree
Hide file tree
Showing 15 changed files with 124 additions and 16 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@

***

### Release 23.08.1

Main changes:

- hook scripts `env.rc`, `push` and `post_push` have been updated
- handling of multiple deployment tags per image has been improved and it covers also publishing into the builder repository now
- also less image pollution by publishing
- file `readme-local-building-example.md` got a new section `Tips and examples`, containing
- `How to deploy all images into one repository`
- fix in `ci-builder.sh` help mode
- readme files updated
- container screenshots replaced by animations

### Release 23.08

This release brings updated and significantly shortened README files, because most of the content has been moved into the new [User guide][this-user-guide].
Expand Down
32 changes: 32 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
// Version of the setting file. Always 0.2
"version": "0.2",
// language - current active spelling language
"language": "en",
// words - list of words to be always considered correct
"words": [
"accetto",
"BUILDKIT",
"CERTDIR",
"dind",
"Dockerfiles",
"DOCKERHUB",
"envrc",
"ENVV",
"esac",
"fugo",
"Gists",
"nomachine",
"novnc",
"NOVNC",
"tldr",
"utilrc",
"xfce",
"Xfce",
"xubuntu"
],
// flagWords - list of words to be always considered incorrect
// This is useful for offensive words and common spelling errors.
// For example "hte" should be "the"
"flagWords": []
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file removed docker/doc/images/ubuntu-vnc-xfce-g3-latest.png
Binary file not shown.
6 changes: 5 additions & 1 deletion docker/hooks/env.rc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ DOCKER_REPO="${_owner}/${BUILDER_REPO:?Need builder repo name}"

declare _deploy_repo

### array of the image tags to be deployed
### arrays of the image tags to be deployed
declare -a _deploy_builder_tags
declare -a _deploy_tags
declare _deploytag

Expand Down Expand Up @@ -215,19 +216,22 @@ case "${_branch}" in
### latest -> 22.04
DOCKER_TAG="${_blend}"
_deploy_tags=( "latest" "22.04" )
_deploy_builder_tags=( "${_blend}" "${_blend/latest/22.04}" )
;;

jammy | jammy-* )

### jammy -> 22.04
DOCKER_TAG="${_blend/jammy/22.04}"
_deploy_tags=( "latest" "22.04" )
_deploy_builder_tags=( "${_blend/jammy/latest}" "${_blend/jammy/22.04}" )
;;

focal | focal-* )
### focal -> 20.04
DOCKER_TAG="${_blend/focal/20.04}"
_deploy_tags=( "20.04" )
_deploy_builder_tags=( "${_blend/focal/20.04}" )
;;

* )
Expand Down
16 changes: 10 additions & 6 deletions docker/hooks/post_push
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ main() {
local version_sticker_verbose
local repo_building="${DOCKER_REPO##*/}"
local repo_deploy="${_deploy_repo##*/}"
local keeper_repo_tag="${_deploy_builder_tags[0]}"

### debugging support
# dump_environment
Expand All @@ -37,14 +38,17 @@ main() {
then

### get values for badges from the image metadata (labels)
created=$( get_label "${DOCKER_REPO}:${DOCKER_TAG}" "org.opencontainers.image.created" )
version_sticker=$( get_label "${DOCKER_REPO}:${DOCKER_TAG}" "any.accetto.version-sticker" )
created=$( get_label "${DOCKER_REPO}:${keeper_repo_tag}" "org.opencontainers.image.created" )
version_sticker=$( get_label "${DOCKER_REPO}:${keeper_repo_tag}" "any.accetto.version-sticker" )
version_sticker_verbose=$( cat "${_build_context}/${_scrap_version_sticker_verbose_current}" )

### update badge endpoints in the builder repository gist
update_gist "${GIST_ID}" "${_gist_key_created}" "${DOCKER_REPO}" "${DOCKER_TAG}" "${created}"
update_gist "${GIST_ID}" "${_gist_key_version_sticker}" "${DOCKER_REPO}" "${DOCKER_TAG}" "${version_sticker}"
update_gist "${GIST_ID}" "${_gist_key_version_sticker_verbose}" "${DOCKER_REPO}" "${DOCKER_TAG}" "${version_sticker_verbose}"
for t in "${_deploy_builder_tags[@]}" ; do

update_gist "${GIST_ID}" "${_gist_key_created}" "${DOCKER_REPO}" "${t}" "${created}"
update_gist "${GIST_ID}" "${_gist_key_version_sticker}" "${DOCKER_REPO}" "${t}" "${version_sticker}"
update_gist "${GIST_ID}" "${_gist_key_version_sticker_verbose}" "${DOCKER_REPO}" "${t}" "${version_sticker_verbose}"
done

else
echo "Skipping builder gist update because of null or prohibited target repositories."
Expand All @@ -57,7 +61,7 @@ main() {

### note that the builder and deployment repositories could be identical
### in that case skip the tag which has been already published above
if [[ "${DOCKER_REPO}" != "${_deploy_repo}" || "${DOCKER_TAG}" != "${t}" ]] ; then
if [[ "${DOCKER_REPO}" != "${_deploy_repo}" || "${keeper_repo_tag}" != "${t}" ]] ; then

update_gist "${DEPLOY_GIST_ID}" "${_gist_key_created}" "${_deploy_repo}" "${t}" "${created}"
update_gist "${DEPLOY_GIST_ID}" "${_gist_key_version_sticker}" "${_deploy_repo}" "${t}" "${version_sticker}"
Expand Down
31 changes: 25 additions & 6 deletions docker/hooks/push
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ source "${_mydir}"/util.rc
deployment_push() {
local target
local repo="${_deploy_repo##*/}"
local keeper_repo_tag="${_deploy_builder_tags[0]}"

if [[ -n "${repo}" && "${repo}" != "${_prohibited_repo_name}" ]] ; then

Expand All @@ -19,24 +20,26 @@ deployment_push() {

### note that the builder and deployment repositories could be identical
### in that case skip the tag which has been already published above
if [[ "${DOCKER_REPO}" != "${_deploy_repo}" || "${DOCKER_TAG}" != "${t}" ]] ; then
if [[ "${DOCKER_REPO}" != "${_deploy_repo}" || "${keeper_repo_tag}" != "${t}" ]] ; then

target="${_deploy_repo}:${t}"

echo ; echo "Deploying image '${target}'"
docker tag "${DOCKER_REPO}:${DOCKER_TAG}" "${target}"
docker tag "${DOCKER_REPO}:${keeper_repo_tag}" "${target}"
docker push "${target}"
docker rmi "${target}"
fi
done

else
echo "Skipping push because of null or prohibited deployment repository '${repo}'."
echo "Skipping deployment repo push because of null or prohibited deployment repository '${repo}'."
fi
}

main() {
local target
local repo="${DOCKER_REPO##*/}"
local keeper_repo_tag="${_deploy_builder_tags[0]}"

if [[ -f "${_build_context}/${_scrap_demand_stop_building}" ]] ; then
echo "Skipping push on demand."
Expand Down Expand Up @@ -66,11 +69,27 @@ main() {

if [[ -n "${repo}" && "${repo}" != "${_prohibited_repo_name}" ]] ; then

echo ; echo "Pushing builder image ${DOCKER_REPO}:${DOCKER_TAG}"
docker push ${DOCKER_REPO}:${DOCKER_TAG}
### push all target tags into the builder repository
for t in "${_deploy_builder_tags[@]}" ; do

echo ; echo "Pushing builder image ${DOCKER_REPO}:${t}"

if [[ "${t}" == "${keeper_repo_tag}" ]] ; then

# first element is the master repo (a keeper)
docker push "${DOCKER_REPO}:${t}"

else
target="${DOCKER_REPO}:${t}"

docker tag "${DOCKER_REPO}:${keeper_repo_tag}" "${target}"
docker push "${target}"
docker rmi "${target}"
fi
done

else
echo "Skipping forced push because of null or prohibited builder repository '${repo}'."
echo "Skipping forced builder repo push because of null or prohibited builder repository '${repo}'."
fi
fi

Expand Down
2 changes: 1 addition & 1 deletion docker/xfce-chromium/README-dockerhub.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ If you have a question or an idea and you don't want to open an issue, you can a

[this-dockerfile]: https://github.com/accetto/ubuntu-vnc-xfce-g3/blob/master/docker/Dockerfile.xfce.22-04

[this-screenshot-container]: https://raw.githubusercontent.com/accetto/ubuntu-vnc-xfce-g3/master/docker/doc/images/ubuntu-vnc-xfce-chromium-g3-latest.png
[this-screenshot-container]: https://raw.githubusercontent.com/accetto/ubuntu-vnc-xfce-g3/master/docker/doc/images/animation-ubuntu-vnc-xfce-chromium-g3.gif

[accetto-dockerhub-debian-vnc-xfce-chromium-g3]: https://hub.docker.com/r/accetto/debian-vnc-xfce-chromium-g3

Expand Down
2 changes: 1 addition & 1 deletion docker/xfce-firefox/README-dockerhub.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ If you have a question or an idea and you don't want to open an issue, you can a

[this-dockerfile]: https://github.com/accetto/ubuntu-vnc-xfce-g3/blob/master/docker/Dockerfile.xfce.22-04

[this-screenshot-container]: https://raw.githubusercontent.com/accetto/ubuntu-vnc-xfce-g3/master/docker/doc/images/ubuntu-vnc-xfce-firefox-g3-latest.png
[this-screenshot-container]: https://raw.githubusercontent.com/accetto/ubuntu-vnc-xfce-g3/master/docker/doc/images/animation-ubuntu-vnc-xfce-firefox-g3.gif

[accetto-dockerhub-debian-vnc-xfce-firefox-g3]: https://hub.docker.com/r/accetto/debian-vnc-xfce-firefox-g3

Expand Down
2 changes: 1 addition & 1 deletion docker/xfce/README-dockerhub.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ If you have a question or an idea and you don't want to open an issue, you can a

[this-dockerfile]: https://github.com/accetto/ubuntu-vnc-xfce-g3/blob/master/docker/Dockerfile.xfce.22-04

[this-screenshot-container]: https://raw.githubusercontent.com/accetto/ubuntu-vnc-xfce-g3/master/docker/doc/images/ubuntu-vnc-xfce-g3-latest.png
[this-screenshot-container]: https://raw.githubusercontent.com/accetto/ubuntu-vnc-xfce-g3/master/docker/doc/images/animation-ubuntu-vnc-xfce-g3.gif

[accetto-github-xubuntu-vnc-novnc]: https://github.com/accetto/xubuntu-vnc-novnc/

Expand Down
36 changes: 36 additions & 0 deletions readme-local-building-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
- [Disabling `noVNC`](#disabling-novnc)
- [Disabling `Firefox Plus`](#disabling-firefox-plus)
- [README files for Docker Hub](#readme-files-for-docker-hub)
- [Tips and examples](#tips-and-examples)
- [How to deploy all images into one repository](#how-to-deploy-all-images-into-one-repository)

## Introduction

Expand Down Expand Up @@ -359,3 +361,37 @@ For example, the `README` file for the repository `accetto/ubuntu-vnc-xfce-g3` c
### or if the environment variable 'DEPLOY_GIST_ID' has been set
./util-readme.sh --repo accetto/ubuntu-vnc-xfce-g3 --context=../docker/xfce -- preview
```

## Tips and examples

### How to deploy all images into one repository

There are three deployment repositories by default.

Their names are defined by the following environment variables:

- `DEPLOYMENT_REPO` for generic images
- `DEPLOYMENT_REPO_CHROMIUM` for images with Chromium
- `DEPLOYMENT_REPO_FIREFOX` for images with Firefox

The forth variable `BUILDER_REPO` defines the name of the *builder repository*, which is not used for deployment by default.

However, the images can be optionally published also into the *builder repository* by setting the environment variable `FORCE_PUBLISHING_BUILDER_REPO=1`.

The images in the builder repository are distinguished by their tags.

On the other hand, if the repository environment variables are unset or set to the reserved value `void`, then the deployment into the related repository will be skipped.

This behaviour can be used, if you want to publish all the images into a single repository.

Simply set all repositories except the builder one to `void` and force the publishing into the builder repository.

For example, for publishing all the images into a single repository `headless-ubuntu-g3` set the variables like this:

```shell
DEPLOYMENT_REPO="void"
DEPLOYMENT_REPO_CHROMIUM="void"
DEPLOYMENT_REPO_FIREFOX="void"
BUILDER_REPO="headless-ubuntu-g3"
FORCE_PUBLISHING_BUILDER_REPO=1
```

0 comments on commit 1dfb8d9

Please sign in to comment.