Skip to content

Commit da85669

Browse files
committed
Release 25.04
1 parent 0a4f603 commit da85669

19 files changed

+124
-95
lines changed

.gitignore

+1-4
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,21 @@
33
# starting patterns with '/' disables recursivity
44
# ending patterns with '/' specifies directories
55
# starting patterns with '!' negates them
6-
# standard glob patterns (shell paterns) work:
6+
# standard glob patterns (shell patterns) work:
77
# '*' matches zero oro more characters
88
# '?' matches a single characters
99
# '[abc]' matches the characters inside the brackets
1010
# '[0-9]' matches the characters inside the brackets
1111
# '**' matches nested directories (e.g. 'a/**/z')
1212
# recommended files on 'https://github.com/github/gitignore'
1313

14-
..developer*
1514
.vscode
1615
.cache*
1716
.favorites.json
1817
.g3-cache*
1918
.secret*
2019
.util*
2120
.vscode
22-
avanti*
23-
debug*
2421
scrap*
2522
secret*
2623
TODO*

CHANGELOG.md

+21
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,27 @@
66

77
***
88

9+
### Release 25.04
10+
11+
Availability checking of the `wget` utility has been added.
12+
The utility is used by the `cache` hook script for downloading of selected packages into the `g3-cache` folders.
13+
It's generally not available on Windows environments by default.
14+
You can install it or to build on an environment, where the utility is available (e.g. WSL or Linux).
15+
16+
The checking can be skipped by setting the environment variable `IGNORE_MISSING_WGET=1`.
17+
18+
The selected packages still will be downloaded into a temporary image layer, but not into the project's
19+
`.g3-cache` folder nor the shared one, defined by the variable `SHARED_G3_CACHE_PATH`.
20+
21+
Other changes:
22+
23+
- The `ci-builder.sh` script's command `log get errors` now lists building errors and also warnings.
24+
25+
Updated components:
26+
27+
- `noVNC` to version **1.6.0**
28+
- `websockify` to version **0.13.0**
29+
930
### Release 25.03 (G3v7)
1031

1132
This is the first `G3v7` release, bringing an improved building pipeline.

builder.sh

+9-3
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,19 @@ main() {
8383
clear_log
8484
"${_build_context}"/hooks/"${cmd}" dev "${blend}" $@
8585
exit_code=$?
86-
if [[ ${exit_code} -ne 0 ]] ; then die "Hook script '${cmd}' failed with code ${exit_code}." ${exit_code} ; fi
86+
if [[ ${exit_code} -ne 0 ]] ; then
87+
die "Hook script '${cmd}' failed with code ${exit_code}." ${exit_code}
88+
fi
8789
;;
8890

8991
all | all-no-push )
9092

9193
clear_log
9294
"${_build_context}"/hooks/pre_build dev "${blend}" $@
9395
exit_code=$?
94-
if [[ ${exit_code} -ne 0 ]] ; then die "Hook script 'pre_build' failed with code ${exit_code}." ${exit_code} ; fi
96+
if [[ ${exit_code} -ne 0 ]] ; then
97+
die "Hook script 'pre_build' failed with code ${exit_code}." ${exit_code}
98+
fi
9599

96100
if [[ ! -f "${_build_context}"/scrap-demand-stop-building ]] ; then
97101

@@ -112,7 +116,9 @@ main() {
112116

113117
"${_build_context}"/hooks/"${c}" dev "${blend}" $@
114118
exit_code=$?
115-
if [[ ${exit_code} -ne 0 ]] ; then die "Hook script '${c}' failed with code ${exit_code}." ${exit_code} ; fi
119+
if [[ ${exit_code} -ne 0 ]] ; then
120+
die "Hook script '${c}' failed with code ${exit_code}." ${exit_code}
121+
fi
116122
done
117123

118124
echo

ci-builder.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ show_log_timing() {
7575

7676
show_log_errors() {
7777

78-
echo -e "\n--> Building errors:\n"
78+
echo -e "\n--> Building errors and warnings:\n"
7979
grep -iPn "${_regex_log_errors}" "${_ci_builder_log}"
8080
echo
8181
}
@@ -413,7 +413,7 @@ declare _log_mark="\n[CI-BUILDER]"
413413
declare _regex_log_digest="(?<=\[CI-BUILDER\] ).+"
414414
declare _regex_log_stickers="Current version sticker of "
415415
declare _regex_log_timing="==> (EXECUTING @.*builder\.sh.*|FINISHED @.*builder\.sh.*)"
416-
declare _regex_log_errors="\berror\b"
416+
declare _regex_log_errors="\berror\b|\bwarning\b|\bexiting at line\b"
417417

418418
declare _flag_skip_footer=""
419419
declare _option_nocache=""

cspell.json

-32
This file was deleted.

docker/hooks/cache

+33-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,37 @@
11
#!/bin/bash
22

3-
### @accetto, September 2022
4-
53
echo -e "\n==> EXECUTING @$(date -u +'%Y-%m-%d_%H-%M-%S'): ${0} $@\n"
64

75
declare _mydir=$(dirname $0)
86

97
source "${_mydir}"/env.rc
8+
source "${_mydir}"/util.rc
9+
10+
ensure_wget() {
11+
local -i error_code=0
12+
local -i enforced_error_code=1
13+
14+
### checking can be disabled by passing 'enforced_error_code=0'
15+
if [[ "${IGNORE_MISSING_WGET:-0}" == "0" ]] ; then
16+
enforced_error_code=1
17+
else
18+
enforced_error_code=0
19+
fi
20+
ensure_utility wget ${enforced_error_code}
21+
22+
error_code=$?
23+
if [[ ${error_code} -ne 0 ]] ; then
24+
echo
25+
echo "WARNING! Utility 'wget' not found."
26+
echo "It's recommended to install the utility or to switch to an environment where it's available (e.g. WSL)."
27+
echo "Otherwise set the environment variable IGNORE_MISSING_WGET=1 to ignore this checking."
28+
echo "The selected packages still will be downloaded into a temporary image layer, but not into the project's"
29+
echo "'.g3-cache' folder nor the shared one, defined by the variable SHARED_G3_CACHE_PATH."
30+
echo
31+
32+
die "Utility 'wget' not found." ${error_code}
33+
fi
34+
}
1035

1136
use_wget() {
1237
local section="${1?Expected section name}"
@@ -169,25 +194,27 @@ cache_chromium() {
169194

170195
main() {
171196

197+
ensure_wget
198+
172199
if [[ "${FEATURES_VNC}" == "1" ]] ; then
173200

174201
cache_tigervnc
175-
if [[ $? -ne 0 ]] ; then return 1; fi
202+
if [[ $? -ne 0 ]] ; then return 1 ; fi
176203
fi
177204

178205
if [[ "${FEATURES_NOVNC}" == "1" ]] ; then
179206

180207
cache_novnc
181-
if [[ $? -ne 0 ]] ; then return 1; fi
208+
if [[ $? -ne 0 ]] ; then return 1 ; fi
182209

183210
cache_websockify
184-
if [[ $? -ne 0 ]] ; then return 1; fi
211+
if [[ $? -ne 0 ]] ; then return 1 ; fi
185212
fi
186213

187214
if [[ "${FEATURES_CHROMIUM}" == "1" ]] ; then
188215

189216
cache_chromium
190-
if [[ $? -ne 0 ]] ; then return 1; fi
217+
if [[ $? -ne 0 ]] ; then return 1 ; fi
191218
fi
192219

193220
echo

docker/hooks/env.rc

+4-4
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ if [[ $# -ge 2 ]] ; then shift 2 ; fi
8181
### Remark: There are also 'FEATURES_*' variables that are always set, e.g. 'FEATURES_VERSION_STICKER=1'.
8282

8383
### These features influence the content of almost all stages:
84-
### Warning! Anything except '0' means '1', even unset or emty.
84+
### Warning! Anything except '0' means '1', even unset or empty.
8585
if [[ "${FEATURES_BUILD_SLIM}" == "0" ]] ; then FEATURES_BUILD_SLIM="" ; else FEATURES_BUILD_SLIM=1 ; fi
8686

8787
### These features influence the content of the related stages:
@@ -93,7 +93,7 @@ if [[ "${FEATURES_CHROMIUM}" == "1" ]] ; then FEATURES_CHROMIUM=1 ; else FEATURE
9393
if [[ "${FEATURES_FIREFOX}" == "1" ]] ; then FEATURES_FIREFOX=1 ; else FEATURES_FIREFOX="" ; fi
9494

9595
### These features influence container behaviour at startup time
96-
### Warning! Anything except '0' means '1', even unset or emty.
96+
### Warning! Anything except '0' means '1', even unset or empty.
9797
if [[ "${FEATURES_OVERRIDING_ENVV}" == "0" ]] ; then FEATURES_OVERRIDING_ENVV="" ; else FEATURES_OVERRIDING_ENVV=1 ; fi
9898

9999
### These features are always enabled and cannot be disabled via environment variables
@@ -116,8 +116,8 @@ case "${_branch}" in
116116
### hardcoded settings
117117
TIGERVNC_VERSION="1.13.1"
118118
TIGERVNC_DISTRO="x86_64"
119-
NOVNC_VERSION="1.5.0"
120-
WEBSOCKIFY_VERSION="0.12.0"
119+
NOVNC_VERSION="1.6.0"
120+
WEBSOCKIFY_VERSION="0.13.0"
121121
CHROMIUM_DISTRO="amd64"
122122

123123
### ---------------------------

docker/hooks/post_push

-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ main() {
2525
local repo_deploy="${_deploy_repo##*/}"
2626
local keeper_repo_tag="${_deploy_builder_tags[0]}"
2727

28-
### debugging support
29-
# dump_environment
30-
3128
if [[ ! -f "${_build_context}/${_scrap_demand_stop_building}" ]] ; then
3229

3330
### essential environment variables must be already set

docker/hooks/pre_build

-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ main() {
2626
die "Script '${cache_script}' failed with code ${exit_code}." ${exit_code}
2727
fi
2828

29-
### debugging support
30-
# dump_environment
31-
3229
echo -e "\nRemoving helper files\n"
3330
cleanup_scrap_files
3431

docker/hooks/push

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/bin/bash
22

3-
### @accetto, August 2021
4-
53
echo -e "\n==> EXECUTING @$(date -u +'%Y-%m-%d_%H-%M-%S'): ${0} $@\n"
64

75
declare _mydir=$(dirname $0)

docker/hooks/util.rc

+15-29
Original file line numberDiff line numberDiff line change
@@ -16,34 +16,6 @@ cleanup_scrap_files() {
1616
rm -f "${_build_context}/${_scrap_prefix}"*
1717
}
1818

19-
dump_environment() {
20-
### List the selected environment variables.
21-
### Just debugging support.
22-
23-
echo "Environment dump:"
24-
echo "_build_context=${_build_context}"
25-
echo "_branch=${_branch}"
26-
echo "_blend=${_blend}"
27-
28-
echo "_owner=${_owner}"
29-
echo "DOCKER_REPO=${DOCKER_REPO}"
30-
echo "DOCKER_TAG=${DOCKER_TAG}"
31-
echo "_deploy_repo=${_deploy_repo}"
32-
echo "_deploy_tags=${_deploy_tags[@]}"
33-
34-
echo "FEATURES_BUILD_SLIM=${FEATURES_BUILD_SLIM}"
35-
echo "FEATURES_JQ=${FEATURES_JQ}"
36-
echo "FEATURES_NOVNC=${FEATURES_NOVNC}"
37-
echo "FEATURES_SCREENSHOOTING=${FEATURES_SCREENSHOOTING}"
38-
echo "FEATURES_THUMBNAILING=${FEATURES_THUMBNAILING}"
39-
40-
echo "DOCKERFILE_PATH=${DOCKERFILE_PATH}"
41-
echo "BASEIMAGE=${BASEIMAGE}"
42-
echo "BASETAG=${BASETAG}"
43-
echo "VERSION_STICKER_PREFIX=${VERSION_STICKER_PREFIX}"
44-
echo "VERSION_STICKER_SUFFIX=${VERSION_STICKER_SUFFIX}"
45-
}
46-
4719
encode_json_quotes() {
4820
### Encode double-quotes for use in JSON
4921
echo "${1//\"/\\\"}"
@@ -54,6 +26,20 @@ encode_json_newlines() {
5426
echo $( echo -e "${1}" | sed -z 's/\n/\\n/g' )
5527
}
5628

29+
ensure_utility() {
30+
### Checks availability of the given utility.
31+
### It can be effectively disabled by providing 'enforced_error_code=0'.
32+
33+
local util_name="${1?Need utility name}"
34+
local enforced_error_code=${2?Need enforced error code}
35+
36+
if command -v "${util_name}" > /dev/null ; then
37+
return 0
38+
else
39+
return ${enforced_error_code}
40+
fi
41+
}
42+
5743
get_label() {
5844
### Returning the given label value via the predefined global variable.
5945

@@ -125,7 +111,7 @@ list_labels() {
125111
}
126112

127113
update_gist() {
128-
### Updating the secret GitHub gist containing datat (e.g. badge endpoints).
114+
### Updating the secret GitHub gist containing data (e.g. badge endpoints).
129115
### 'GIST_TOKEN' secret (PAT) with the 'gist' scope is required
130116

131117
local gist=${1?Need gist ID}

docker/src/xfce-startup/startup.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ main() {
175175

176176
else
177177

178-
### tail the null device infinitelly
178+
### tail the null device infinitely
179179
if [[ -n $"{_verbose}" ]] ; then
180180

181181
echo "Tailing '/dev/null'"
@@ -186,7 +186,7 @@ main() {
186186
fi
187187
fi
188188

189-
### default backround execution mode
189+
### default background execution mode
190190
### be sure to end all previous branches by calling 'cleanup'
191191
### option '--wait' is purely because of the parser
192192

docker/src/xfce-startup/version_of.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/bin/bash
2-
### @accetto, September 2019
2+
3+
# cSpell:disable
34

45
case "$1" in
56
angular | angular-cli | angularcli | ng )

docker/src/xfce-startup/version_sticker.sh

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/bin/bash
2-
### @accetto, September 2019
32

43
### resolve also symlinks
54
_current_dir="$(dirname "$(readlink -f "$0")")"

examples/example-secrets.rc

+5-1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ export DOCKER_BUILDKIT=1
5757
# # export FEATURES_NOVNC=0
5858
# # export FEATURES_FIREFOX_PLUS=0
5959
# # export FEATURES_OVERRIDING_ENVV=0
60+
# ### ignoring 'wget' checking may be helpful on Windows
61+
# # export IGNORE_MISSING_WGET=1
6062

6163
#endregion
6264

@@ -71,7 +73,7 @@ export DOCKER_BUILDKIT=1
7173
# export REPO_OWNER_NAME=""
7274
# ### production builder gist
7375
# export GIST_ID=""
74-
# ### produktion deployment gist
76+
# ### production deployment gist
7577
# export DEPLOY_GIST_ID=""
7678
# ### note that the reserved repository name 'void' will prohibit the publishing
7779
# ### primary deployment repos
@@ -91,6 +93,8 @@ export DOCKER_BUILDKIT=1
9193
# # export FEATURES_NOVNC=0
9294
# # export FEATURES_FIREFOX_PLUS=0
9395
# # export FEATURES_OVERRIDING_ENVV=0
96+
# ### ignoring 'wget' checking may be helpful on Windows
97+
# # export IGNORE_MISSING_WGET=1
9498

9599
#endregion
96100

0 commit comments

Comments
 (0)