Skip to content

Commit e824a25

Browse files
committed
Prep for 20241121
1 parent 83146f1 commit e824a25

File tree

2 files changed

+27
-49
lines changed

2 files changed

+27
-49
lines changed

160_gitlab_ci/000_rollout/generate.sh

+26-49
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ set -o errexit -o pipefail
55
: "${COUNT:=1}"
66
: "${DOMAIN:=inmylab.de}"
77

8-
if test -f seats.json; then
9-
echo "ERROR: File seats.json already exists."
10-
exit 1
11-
fi
12-
138
function generate_code() {
149
local chars=(A B C D E F G H J K L M N P Q R S T U V W X Y Z 2 3 4 5 6 7 8 9)
1510
local length=6
@@ -26,50 +21,32 @@ function generate_code() {
2621
echo -n "${code}"
2722
}
2823

29-
result="$(
30-
jq \
31-
--null-input \
32-
--arg name "${SET_NAME}" \
33-
--arg count "${COUNT}" \
34-
--arg domain "${DOMAIN}" \
35-
--arg gitlab_admin_password "$(openssl rand -hex 32)" \
36-
--arg gitlab_admin_token "$(openssl rand -hex 32)" \
37-
'
38-
{
39-
"name": $name,
40-
"count": $count,
41-
"domain": $domain,
42-
"gitlab_admin_password": $gitlab_admin_password,
43-
"gitlab_admin_token": $gitlab_admin_token,
44-
"seats": []
45-
}
46-
'
47-
)"
48-
49-
for INDEX in $( seq 0 $(( COUNT - 1)) ); do
50-
result="$(
51-
echo "${result}" | jq \
52-
--arg index "${INDEX}" \
53-
--arg password "$(openssl rand -hex 32)" \
54-
--arg code "$(generate_code)" \
55-
--arg gitlab_token "$(openssl rand -hex 32)" \
56-
--arg webdav_pass_dev "$(openssl rand -hex 32)" \
57-
--arg webdav_pass_live "$(openssl rand -hex 32)" \
58-
'
59-
. as $all |
60-
$all.seats +=
61-
[{
62-
"index": $index,
63-
"password": $password,
64-
"code": $code,
65-
"gitlab_token": $gitlab_token,
66-
"webdav_pass_dev": $webdav_pass_dev,
67-
"webdav_pass_live": $webdav_pass_live
68-
}]
69-
'
70-
)"
71-
done
72-
echo "${result}" >seats.json
24+
if ! test -f seats.json; then
25+
for INDEX in $( seq 0 $(( COUNT - 1)) ); do
26+
result="$(
27+
echo "${result}" | jq \
28+
--arg index "${INDEX}" \
29+
--arg password "$(openssl rand -hex 32)" \
30+
--arg code "$(generate_code)" \
31+
--arg gitlab_token "$(openssl rand -hex 32)" \
32+
--arg webdav_pass_dev "$(openssl rand -hex 32)" \
33+
--arg webdav_pass_live "$(openssl rand -hex 32)" \
34+
'
35+
. as $all |
36+
$all.seats +=
37+
[{
38+
"index": $index,
39+
"password": $password,
40+
"code": $code,
41+
"gitlab_token": $gitlab_token,
42+
"webdav_pass_dev": $webdav_pass_dev,
43+
"webdav_pass_live": $webdav_pass_live
44+
}]
45+
'
46+
)"
47+
done
48+
echo "${result}" >seats.json
49+
fi
7350

7451
UNIQUE_CODES_COUNT="$(
7552
jq --raw-output '.seats[].code' seats.json \

2024-11-21_heise-GitLab-CI.html

+1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ <h2>Agenda</h2>
8484
<section data-markdown="160_gitlab_ci/280_security/slides.md" data-separator="^---$" data-separator-vertical="^--$"></section>
8585
<section data-markdown="160_gitlab_ci/300_components/slides.md" data-separator="^---$" data-separator-vertical="^--$"></section>
8686
<section data-markdown="160_gitlab_ci/310_steps/slides.md" data-separator="^---$" data-separator-vertical="^--$"></section>
87+
<section data-markdown="160_gitlab_ci/320_secure_files/slides.md" data-separator="^---$" data-separator-vertical="^--$"></section>
8788
<section data-markdown="160_gitlab_ci/final.md" data-separator="^---$" data-separator-vertical="^--$"></section>
8889

8990
<section id="summary" data-separator="^---$" data-separator-vertical="^--$">

0 commit comments

Comments
 (0)