Skip to content

Commit 56cfd29

Browse files
committed
Release 25.03 (G3v7)
1 parent c3d7903 commit 56cfd29

13 files changed

+187
-56
lines changed

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,36 @@
66

77
***
88

9+
### Release 25.03 (G3v7)
10+
11+
This is the first `G3v7` release, bringing an improved building pipeline.
12+
13+
The helper script `ci-builder.sh` can build final images significantly faster, because the temporary helper images are used as external caches.
14+
15+
Internally, the helper image is built by the `pre_build` hook script and then used by the `build` hook script.
16+
17+
The helper image is now deleted by the `build` hook script and not the `pre_build` hook script as before.
18+
19+
The `Dockerfiles` got a new metadata label `any.accetto.built-by="docker"`.
20+
21+
#### Remarks
22+
23+
If you would build a final image without building also the helper image (e.g. by executing `builder.sh latest build`), then there could be an error message about trying to remove the non-existing helper image.
24+
You can safely ignore the message.
25+
26+
For example:
27+
28+
```shell
29+
### The next line would build the helper image, but it was not executed.
30+
#./build.sh latest pre_build
31+
32+
./build.sh latest build
33+
34+
### then somewhere near the end of the log
35+
Removing helper image
36+
Error response from daemon: No such image: accetto/devops-headless-coding-g3_nvm-helper:latest
37+
```
38+
939
### Release 25.01
1040

1141
This is a maintenance release.

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Project `accetto/headless-coding-g3`
44

5-
Version: G3v6
5+
Version: G3v7
66

77
***
88

@@ -26,8 +26,10 @@ Version: G3v6
2626
- [Building images](#building-images)
2727
- [Image generations](#image-generations)
2828
- [Project versions](#project-versions)
29+
- [Previous versions](#previous-versions)
2930
- [Project goals](#project-goals)
3031
- [Project features](#project-features)
32+
- [How to fork](#how-to-fork)
3133
- [Getting help](#getting-help)
3234
- [Credits](#credits)
3335

@@ -95,16 +97,26 @@ The **first generation** (G1) contains the GitHub repository [accetto/ubuntu-vnc
9597

9698
### Project versions
9799

98-
This file describes the **sixth version** (G3v6) of the project.
100+
This file describes the **seventh version** (G3v7) of the project.
101+
102+
This version brings an improved building pipeline.
103+
104+
The helper script `ci-builder.sh` can build final images significantly faster, because the temporary helper images are used as external caches.
105+
106+
Internally, the helper image is built by the `pre_build` hook script and then used by the `build` hook script.
107+
108+
The helper image is now removed by the `build` hook script and not the `pre_build` hook script.
99109

100110
However, also this version keeps evolving.
101111
Please check the [CHANGELOG][this-changelog] for more information about the changes.
102112

113+
#### Previous versions
114+
103115
The previous versions are still available in this **GitHub** repository as the branches named as `archived-generation-g3v{d}`.
104116

105117
*Remark*: The version number `G3v4` has been skipped, to align the numbering with the **sibling project** [accetto/ubuntu-vnc-xfce-g3][accetto-github-ubuntu-vnc-xfce-g3].
106118

107-
The main purpose of the version `G3v6` is to keep the project and the images uniform with the ones from the sibling `Ubuntu` projects.
119+
The main purpose of the version `G3v6` was to keep the project and the images uniform with the ones from the sibling `Ubuntu` projects.
108120

109121
The version `G3v5` has brought only one significant change comparing to the previous version `G3v3` and it also introduces the [portable Visual Studio Code][vscode-portable] installation.
110122

@@ -154,6 +166,10 @@ Please refer to the [sibling project][accetto-github-ubuntu-vnc-xfce-g3_project-
154166

155167
Please refer to the [sibling project][accetto-github-ubuntu-vnc-xfce-g3_project-features] to learn more about the project features.
156168

169+
### How to fork
170+
171+
If you want to fork this project, then please check the page [How to fork this repository][sibling-wiki-how-to-fork] in the sibling [Wiki][sibling-wiki].
172+
157173
### Getting help
158174

159175
If you have found a problem or you just have a question, please check the [User guide][this-user-guide], [Issues][this-issues] and the [sibling Wiki][sibling-wiki] first.
@@ -220,6 +236,8 @@ Credit goes to all the countless people and companies, who contribute to open so
220236

221237
[sibling-wiki]: https://github.com/accetto/ubuntu-vnc-xfce-g3/wiki
222238

239+
[sibling-wiki-how-to-fork]: https://github.com/accetto/ubuntu-vnc-xfce-g3/wiki/How-to-fork
240+
223241
[sibling-discussions]: https://github.com/accetto/ubuntu-vnc-xfce-g3/discussions
224242

225243
[accetto-github-ubuntu-vnc-xfce-g3_project-versions]: https://github.com/accetto/ubuntu-vnc-xfce-g3#project-versions

docker/Dockerfile.xfce.nodejs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ RUN \
350350
NODEJS_PATH="/usr/local" \
351351
&& if [ ! -s "/tmp/g3-cache/nodejs/node-v${NODEJS_VERSION}-${NODEJS_DISTRO}.tar.xz" ] ; then \
352352
wget --show-progress --progress=bar:force:noscroll \
353-
-q "https://nodejs.org/dist/${NODEJS_VERSION}/node-v${NODEJS_VERSION}-${NODEJS_DISTRO}.tar.xz" \
353+
-q "https://nodejs.org/dist/v${NODEJS_VERSION}/node-v${NODEJS_VERSION}-${NODEJS_DISTRO}.tar.xz" \
354354
-P "/tmp/g3-cache/nodejs" ; \
355355
fi \
356356
&& tar xJf "/tmp/g3-cache/nodejs/node-v${NODEJS_VERSION}-${NODEJS_DISTRO}.tar.xz" --strip 1 -C "${NODEJS_PATH}" \
@@ -453,6 +453,7 @@ RUN \
453453
&& echo "${HEADLESS_USER_NAME}:$(cat ${STARTUPDIR}/.initial_sudo_password)" | chpasswd \
454454
&& ln -s "${HOME}"/readme.md "${HOME}"/Desktop/README \
455455
&& envsubst <"${HOME}"/Desktop/versionsticker.desktop >/tmp/esub.tmp && mv -f /tmp/esub.tmp "${HOME}"/Desktop/versionsticker.desktop \
456+
&& chmod +x "${STARTUPDIR}"/set_user_permissions.sh \
456457
&& "${STARTUPDIR}"/set_user_permissions.sh "${STARTUPDIR}" "${HOME}"
457458

458459
USER "${HEADLESS_USER_ID}"
@@ -489,4 +490,5 @@ LABEL \
489490
org.label-schema.vcs-ref="${ARG_VCS_REF}"
490491

491492
LABEL \
492-
any.accetto.version-sticker="${ARG_VERSION_STICKER}"
493+
any.accetto.version-sticker="${ARG_VERSION_STICKER}" \
494+
any.accetto.built-by="docker"

docker/Dockerfile.xfce.nvm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,7 @@ RUN \
435435
&& echo "${HEADLESS_USER_NAME}:$(cat ${STARTUPDIR}/.initial_sudo_password)" | chpasswd \
436436
&& ln -s "${HOME}"/readme.md "${HOME}"/Desktop/README \
437437
&& envsubst <"${HOME}"/Desktop/versionsticker.desktop >/tmp/esub.tmp && mv -f /tmp/esub.tmp "${HOME}"/Desktop/versionsticker.desktop \
438+
&& chmod +x "${STARTUPDIR}"/set_user_permissions.sh \
438439
&& "${STARTUPDIR}"/set_user_permissions.sh "${STARTUPDIR}" "${HOME}"
439440

440441
USER "${HEADLESS_USER_ID}"
@@ -471,4 +472,5 @@ LABEL \
471472
org.label-schema.vcs-ref="${ARG_VCS_REF}"
472473

473474
LABEL \
474-
any.accetto.version-sticker="${ARG_VERSION_STICKER}"
475+
any.accetto.version-sticker="${ARG_VERSION_STICKER}" \
476+
any.accetto.built-by="docker"

docker/Dockerfile.xfce.postman

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,7 @@ RUN \
401401
&& echo "${HEADLESS_USER_NAME}:$(cat ${STARTUPDIR}/.initial_sudo_password)" | chpasswd \
402402
&& ln -s "${HOME}"/readme.md "${HOME}"/Desktop/README \
403403
&& envsubst <"${HOME}"/Desktop/versionsticker.desktop >/tmp/esub.tmp && mv -f /tmp/esub.tmp "${HOME}"/Desktop/versionsticker.desktop \
404+
&& chmod +x "${STARTUPDIR}"/set_user_permissions.sh \
404405
&& "${STARTUPDIR}"/set_user_permissions.sh "${STARTUPDIR}" "${HOME}"
405406

406407
USER "${HEADLESS_USER_ID}"
@@ -437,4 +438,5 @@ LABEL \
437438
org.label-schema.vcs-ref="${ARG_VCS_REF}"
438439

439440
LABEL \
440-
any.accetto.version-sticker="${ARG_VERSION_STICKER}"
441+
any.accetto.version-sticker="${ARG_VERSION_STICKER}" \
442+
any.accetto.built-by="docker"

docker/Dockerfile.xfce.python

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,7 @@ RUN \
427427
&& echo "${HEADLESS_USER_NAME}:$(cat ${STARTUPDIR}/.initial_sudo_password)" | chpasswd \
428428
&& ln -s "${HOME}"/readme.md "${HOME}"/Desktop/README \
429429
&& envsubst <"${HOME}"/Desktop/versionsticker.desktop >/tmp/esub.tmp && mv -f /tmp/esub.tmp "${HOME}"/Desktop/versionsticker.desktop \
430+
&& chmod +x "${STARTUPDIR}"/set_user_permissions.sh \
430431
&& "${STARTUPDIR}"/set_user_permissions.sh "${STARTUPDIR}" "${HOME}"
431432

432433
USER "${HEADLESS_USER_ID}"
@@ -463,4 +464,5 @@ LABEL \
463464
org.label-schema.vcs-ref="${ARG_VCS_REF}"
464465

465466
LABEL \
466-
any.accetto.version-sticker="${ARG_VERSION_STICKER}"
467+
any.accetto.version-sticker="${ARG_VERSION_STICKER}" \
468+
any.accetto.built-by="docker"

docker/Dockerfile.xfce.vscode

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,7 @@ RUN \
400400
&& echo "${HEADLESS_USER_NAME}:$(cat ${STARTUPDIR}/.initial_sudo_password)" | chpasswd \
401401
&& ln -s "${HOME}"/readme.md "${HOME}"/Desktop/README \
402402
&& envsubst <"${HOME}"/Desktop/versionsticker.desktop >/tmp/esub.tmp && mv -f /tmp/esub.tmp "${HOME}"/Desktop/versionsticker.desktop \
403+
&& chmod +x "${STARTUPDIR}"/set_user_permissions.sh \
403404
&& "${STARTUPDIR}"/set_user_permissions.sh "${STARTUPDIR}" "${HOME}"
404405

405406
USER "${HEADLESS_USER_ID}"
@@ -436,4 +437,5 @@ LABEL \
436437
org.label-schema.vcs-ref="${ARG_VCS_REF}"
437438

438439
LABEL \
439-
any.accetto.version-sticker="${ARG_VERSION_STICKER}"
440+
any.accetto.version-sticker="${ARG_VERSION_STICKER}" \
441+
any.accetto.built-by="docker"

docker/hooks/build

Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ main() {
1414
local -i exit_code=0
1515
local target_stage
1616

17+
### helper image is also used as a cache and therefore it must not use a tag
18+
local helper_image="${DOCKER_REPO}"_"${DOCKER_TAG}${helper_suffix}"
19+
1720
if [[ -f "${_build_context}/${_scrap_demand_stop_building}" ]] ; then
1821

1922
echo "Skipping build on demand."
@@ -23,7 +26,9 @@ main() {
2326
### refresh local cache for the case the 'pre_build' was not run
2427
"${_mydir}/${cache_script}" "${_branch}" "${_blend}"
2528
exit_code=$?
26-
if [[ ${exit_code} -ne 0 ]] ; then die "Script '${cache_script}' failed with code ${exit_code}." ${exit_code} ; fi
29+
if [[ ${exit_code} -ne 0 ]] ; then
30+
die "Script '${cache_script}' failed with code ${exit_code}." ${exit_code}
31+
fi
2732

2833
### get current version sticker
2934
if [[ -f "${_build_context}/${_scrap_version_sticker_current}" ]] ; then
@@ -73,6 +78,7 @@ main() {
7378
### no quotes around ${params}!
7479
set -x
7580
docker build ${params} \
81+
--cache-from=${helper_image} \
7682
-f "${DOCKERFILE_PATH}" \
7783
--build-arg BASEIMAGE="${BASEIMAGE}" \
7884
--build-arg BASETAG="${BASETAG}" \
@@ -112,7 +118,13 @@ main() {
112118
exit_code=$?
113119
set +x
114120

115-
if [[ ${exit_code} -ne 0 ]] ; then die "Failed to build image '${DOCKER_REPO}:${DOCKER_TAG}'" ${exit_code} ; fi
121+
if [[ ${exit_code} -ne 0 ]] ; then
122+
die "Failed to build image '${DOCKER_REPO}:${DOCKER_TAG}'" ${exit_code}
123+
fi
124+
125+
### delete the helper image in any case
126+
echo; echo "Removing helper image"
127+
${CONTAINER_MANAGER:-docker} rmi "${helper_image}"
116128
;;
117129

118130
### -------------------------
@@ -124,6 +136,7 @@ main() {
124136
### no quotes around ${params}!
125137
set -x
126138
docker build ${params} \
139+
--cache-from=${helper_image} \
127140
-f "${DOCKERFILE_PATH}" \
128141
--build-arg BASEIMAGE="${BASEIMAGE}" \
129142
--build-arg BASETAG="${BASETAG}" \
@@ -162,7 +175,13 @@ main() {
162175
exit_code=$?
163176
set +x
164177

165-
if [[ ${exit_code} -ne 0 ]] ; then die "Failed to build image '${DOCKER_REPO}:${DOCKER_TAG}'" ${exit_code} ; fi
178+
if [[ ${exit_code} -ne 0 ]] ; then
179+
die "Failed to build image '${DOCKER_REPO}:${DOCKER_TAG}'" ${exit_code}
180+
fi
181+
182+
### delete the helper image in any case
183+
echo; echo "Removing helper image"
184+
${CONTAINER_MANAGER:-docker} rmi "${helper_image}"
166185
;;
167186

168187
### --------------------------
@@ -174,6 +193,7 @@ main() {
174193
### no quotes around ${params}!
175194
set -x
176195
docker build ${params} \
196+
--cache-from=${helper_image} \
177197
-f "${DOCKERFILE_PATH}" \
178198
--build-arg BASEIMAGE="${BASEIMAGE}" \
179199
--build-arg BASETAG="${BASETAG}" \
@@ -208,7 +228,13 @@ main() {
208228
exit_code=$?
209229
set +x
210230

211-
if [[ ${exit_code} -ne 0 ]] ; then die "Failed to build image '${DOCKER_REPO}:${DOCKER_TAG}'" ${exit_code} ; fi
231+
if [[ ${exit_code} -ne 0 ]] ; then
232+
die "Failed to build image '${DOCKER_REPO}:${DOCKER_TAG}'" ${exit_code}
233+
fi
234+
235+
### delete the helper image in any case
236+
echo; echo "Removing helper image"
237+
${CONTAINER_MANAGER:-docker} rmi "${helper_image}"
212238
;;
213239

214240
### -------------------------
@@ -220,6 +246,7 @@ main() {
220246
### no quotes around ${params}!
221247
set -x
222248
docker build ${params} \
249+
--cache-from=${helper_image} \
223250
-f "${DOCKERFILE_PATH}" \
224251
--build-arg BASEIMAGE="${BASEIMAGE}" \
225252
--build-arg BASETAG="${BASETAG}" \
@@ -257,7 +284,13 @@ main() {
257284
exit_code=$?
258285
set +x
259286

260-
if [[ ${exit_code} -ne 0 ]] ; then die "Failed to build image '${DOCKER_REPO}:${DOCKER_TAG}'" ${exit_code} ; fi
287+
if [[ ${exit_code} -ne 0 ]] ; then
288+
die "Failed to build image '${DOCKER_REPO}:${DOCKER_TAG}'" ${exit_code}
289+
fi
290+
291+
### delete the helper image in any case
292+
echo; echo "Removing helper image"
293+
${CONTAINER_MANAGER:-docker} rmi "${helper_image}"
261294
;;
262295

263296
### -------------------------
@@ -269,6 +302,7 @@ main() {
269302
### no quotes around ${params}!
270303
set -x
271304
docker build ${params} \
305+
--cache-from=${helper_image} \
272306
-f "${DOCKERFILE_PATH}" \
273307
--build-arg BASEIMAGE="${BASEIMAGE}" \
274308
--build-arg BASETAG="${BASETAG}" \
@@ -304,7 +338,13 @@ main() {
304338
exit_code=$?
305339
set +x
306340

307-
if [[ ${exit_code} -ne 0 ]] ; then die "Failed to build image '${DOCKER_REPO}:${DOCKER_TAG}'" ${exit_code} ; fi
341+
if [[ ${exit_code} -ne 0 ]] ; then
342+
die "Failed to build image '${DOCKER_REPO}:${DOCKER_TAG}'" ${exit_code}
343+
fi
344+
345+
### delete the helper image in any case
346+
echo; echo "Removing helper image"
347+
${CONTAINER_MANAGER:-docker} rmi "${helper_image}"
308348
;;
309349

310350
* )

docker/hooks/env.rc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ declare _readme_context
6161
# VERSION_STICKER_PREFIX=${VERSION_STICKER_SUFFIX:-"BETA-"}
6262
# VERSION_STICKER_SUFFIX=${VERSION_STICKER_SUFFIX:-"-BETA"}
6363

64+
### suffix added to the helper image name
65+
declare helper_suffix="-helper"
66+
6467
### be careful with moving this statement
6568
### remove the first two command line arguments (<branch> <blend>)
6669
if [[ $# -ge 2 ]] ; then shift 2 ; fi

0 commit comments

Comments
 (0)