Skip to content

Hetzner #3030

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 133 commits into
base: master
Choose a base branch
from
Draft

Hetzner #3030

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
d9f7bc1
PKG-197 psmdb.cd: run pbm build job on Hetzner
vorsel Nov 7, 2024
902f18b
PKG-197 psmdb.cd: update htz cloud config
vorsel Nov 8, 2024
63200a6
PKG-276 psmdb.cd: adjust lables for hetzner cloud
vorsel Nov 13, 2024
481a209
PKG-335 psmdb.cd: move htz infra to fsn1 zone
vorsel Dec 12, 2024
ede7c77
PKG-333 psmdb.cd: migrate pbm to hetzner
vorsel Dec 12, 2024
09aac4f
PKG-333 psmdb.cd: migrate pbm to hetzner
vorsel Dec 12, 2024
b50ecd1
Update percona-mongodb-backup.groovy
vorsel Dec 12, 2024
7f6f66c
PKG-338 psmdb.cd: fix hetzner arm64 workers
vorsel Dec 16, 2024
7138024
PKG-333 psmdb.cd: pbm fix build nore selector for amzn2023
vorsel Dec 16, 2024
6088688
PKG-333 psmdb.cd: adjust var functs to run on Hetzner
vorsel Dec 16, 2024
bcd59d2
PKG-344 psmdb.cd: switch between hetzner/aws s3 obj storages
vorsel Dec 18, 2024
ab28ba1
PKG-344 psmdb.cd: fix htz/aws artifacts uploads
vorsel Dec 18, 2024
83bfd05
PKG-352 psmdb-80: move build to Hetzner
vorsel Jan 13, 2025
81a86bc
PKG-412 psmdb-70: move build to Hetzner
vorsel Jan 13, 2025
f37a45f
PKG-413 psmdb-60: move build to Hetzner
vorsel Jan 14, 2025
c757033
PKG-413 psmdb-60: move get_branches to hetzner
vorsel Jan 14, 2025
44e76d3
PKG-413 psmdb-60: re-add amzn2023 build steps
vorsel Jan 14, 2025
d81b24c
PKG-413 psmdb-60: fix new vars definitions
vorsel Jan 14, 2025
df1140a
PKG-413 psmdb-60: fix Deb11 Hetzner builds
vorsel Jan 20, 2025
c188091
PKG-413 psmdb-60: adjust supplementary functions to work with Hetzner
vorsel Jan 21, 2025
571151d
PKG-429 psmdb.cd: fix s3 upload to Hetzner
vorsel Jan 22, 2025
529c0e8
PKG-434 psmdb-60: fix_dbd_pkgs_issue
vorsel Jan 27, 2025
3072cc3
PKG-444 psmdb.cd: add workers from all EU data centers: nbg1, hel1, fsn1
vorsel Jan 28, 2025
4a04436
PKG-413 psmdb-60: fix test folder creation / add debug ls output
vorsel Jan 28, 2025
a378c65
PKG-412 psmdb-70: adjust PSMDB-70 build job to work with Hetzner
vorsel Jan 31, 2025
0470bf0
PKG-434 psmdb.cd: adjust cli connect/read timeouts
vorsel Feb 3, 2025
8657a92
PKG-412 psmdb-70: pipeline fixups
vorsel Feb 4, 2025
f7e0f9f
PKG-412 psmdb-70: re-add stage for deb bullseye
vorsel Feb 4, 2025
b40a8ac
PKG-412 psmdb-70: stage labels fixup
vorsel Feb 4, 2025
655cec9
PKG-469 rel.cd: add Hetzner cloud configuration
vorsel Feb 6, 2025
d2f37a8
PKG-352 psmdb-80: adjust pipeline code.
vorsel Feb 7, 2025
2539e49
Update jobs to use hetzner (#3141)
EvgeniyPatlan Feb 10, 2025
fa4553e
PKG-476 rel.cd: fix ppg/ydiff.groovy to work with Hetzner
vorsel Feb 10, 2025
4b5f30c
PKG-476 rel.cd: fix uploadRPMfromAWS func
vorsel Feb 10, 2025
602ffcd
Adds PG ARM groovy and yml files to hetzner branch. (#3155)
Feb 11, 2025
fe9fce1
Adds missing params.CLOUD parameter to popArtifactFolder function. (#…
Feb 12, 2025
9a4d83c
Adds missing params.CLOUD parameter to popArtifactFolder function. (#…
Feb 13, 2025
fe5a885
Adds missing params.CLOUD parameter to sync2ProdAutoBuild and signing…
Feb 13, 2025
a998c5c
CLOUD-888 Fix failing EKS pipelines because of a change how latest ve…
ptankov Feb 10, 2025
54bb6ff
PKG-223 packaging for release-8.0.41-32 (#3152)
adivinho Feb 11, 2025
ed972da
CLOUD-889 Fix the detection of newest GKE version in pipelines (#3154)
ptankov Feb 11, 2025
8bfcf0e
PMM-13733: PMM V3 Migration pipeline (#3135) (#3136)
peterSirotnak Feb 11, 2025
73d4423
PKG-475 Update PS/PXC/PXB release pipeline to add support for private…
surbhat1595 Feb 12, 2025
4b1c1fb
PKG-333 pbm: update get-branches job
vorsel Feb 13, 2025
adfacad
PKG-486 psmdb.cd: migrate mongosh pipeline to Hetzner
vorsel Feb 14, 2025
3a31078
PKG-492 psmdb.cd: add "*-min" htz workers
vorsel Feb 17, 2025
0afc31e
PKG-493 add JNKPercona user to psmdb.cd, pxc.cd and ps80.cd
vorsel Feb 17, 2025
be277b1
Add hetzner changes for pg_percona_telemetry jobs
surbhat1595 Feb 17, 2025
eb66f1b
Fix issue with pg_percona_telemetry pipeline
surbhat1595 Feb 17, 2025
8c1adde
Fix issue with pg_percona_telemetry pipeline - buildStage
surbhat1595 Feb 17, 2025
dfa6789
PKG-486 mongosh: fix worker labes for Hetzner/AWS for src stage
vorsel Feb 17, 2025
e3369e3
Updates pgpool groovy to start using docker for builds. (#3171)
Feb 19, 2025
199913c
Updates pg_stat_monitor groovy to start using docker for builds. (#3174)
Feb 20, 2025
2fbf51c
PKG-303 mongosh: add info about used CLOUD to description
vorsel Feb 20, 2025
7a316af
Updates ppg-docker jobs for Hetzner (#3176)
Feb 21, 2025
321b8ba
PKG-303 mongosh: add "retry" loop for Hetzner S3 access
vorsel Feb 21, 2025
d5d0a13
[PKG-483]: Updates nightly jobs for hetzner (#3178)
Feb 24, 2025
36c115e
PKG-483 ppg: add missing param to uploadPGTarballfromAWS func
vorsel Feb 24, 2025
72f3924
Hetzner (#3194)
Mar 3, 2025
c9e6762
ProxySQL job was not properly migrated to Hetzner. (#3195)
Mar 3, 2025
c054712
[PKG-373]: Fixes qemu installation issue. (#3196)
Mar 4, 2025
5570222
update percona-telemetry-agent script
surbhat1595 Mar 6, 2025
5d9f757
Update percona-telemetry-agent groovy script
surbhat1595 Mar 10, 2025
9baa76b
[PG-1424]: Temporarily updates default branch to release-17.4 for nig…
Mar 10, 2025
6032e69
[PG-1424]: Updates default branch of packaging. (#3207)
Mar 10, 2025
85a3568
PKG-484 PS jobs Hetzner migration fixing and validation (#3209)
adivinho Mar 10, 2025
be2db8b
[PKG-373]: Fixes docker build issue with apparmor. (#3212)
Mar 12, 2025
2bad586
[PKG-373]: Builds proxysql docker image only for AMD64. (#3213)
Mar 12, 2025
61ee4d5
[PKG-373]: Fixes proxysql docker image tags (#3214)
Mar 12, 2025
27099c9
Hetzner (#3215)
adivinho Mar 12, 2025
83138fa
[PKG-373]: Adds one more tag to proxysql docker image. (#3216)
Mar 12, 2025
d667efc
Hetzner (#3222)
adivinho Mar 14, 2025
cf47781
Hetzner (#3225)
adivinho Mar 17, 2025
814dd9e
Migrate qpress pipeline to Hetzner and add AL 2023 arm64 build
surbhat1595 Mar 18, 2025
6dbe19a
PKG-534 pxc.cd: configure Hetzner cloud
vorsel Mar 21, 2025
43c0edc
PKG-541 ps80.cd: configure Hetzner cloud
vorsel Mar 21, 2025
e8fee8d
PKG-542 ps57.cd: configure Hetzner cloud
vorsel Mar 21, 2025
a4b1b81
PKG-540 Adjust PSMDB build pipelines to use mongodb build scripts fro…
surbhat1595 Mar 21, 2025
0d5b73e
PKG-543 pxb.cd: configure Hetzner cloud
vorsel Mar 25, 2025
2ddec28
[PG-1384]: Updates PG 17.4 tag (#3237)
Mar 26, 2025
4f9e486
PSMDB-1637. Push images to private dockerhub, add ARM build and migra…
sandraromanchenko Mar 28, 2025
9ab3522
Hetzner (#3249)
adivinho Apr 7, 2025
7acdb0b
[PKG-561]: Updates jobs for hetzner plus adjusts tags. (#3250)
Apr 7, 2025
abc56f3
[PKG-549]: Makes docker build conditional + Fixes tags + Adds missing…
Apr 11, 2025
b35acfd
PBM-1529 add PBM tests on hetzner (#3256)
olexandr-havryliak Apr 11, 2025
b588bed
[PKG-549]: Adds missing docker manifest annotate statements (#3261)
Apr 14, 2025
492d8c8
[PKG-549]: Adds missing closing quotes (#3262)
Apr 14, 2025
23aa5e5
PKG-196 Misleading URL pattern for some downloads (#3263)
adivinho Apr 14, 2025
ead69fb
PSMDB. Add missing RHEL8 arm stage (#3267)
sandraromanchenko Apr 16, 2025
c20070f
[PKG-549]: Fixes case sensitive value to FULL_FEATURED parameter + in…
Apr 18, 2025
545f5cc
PBM. Move e2e tests job to Hetzner (#3279)
sandraromanchenko Apr 23, 2025
ccdaa16
PML. Move functional tests job to Hetzner (#3280)
sandraromanchenko Apr 23, 2025
a9706b2
PKG-643 Add an additional tag for ps, pxc multi docker images (#3281)
adivinho Apr 23, 2025
82ef485
[PKG-485]: Merges AMD and ARM jobs into one job. (#3283)
Apr 24, 2025
aacf940
etcd native package build process is different than other components …
Apr 25, 2025
847c9d6
PSMDB. PBM. Move jobs to hetzner (#3288)
sandraromanchenko Apr 25, 2025
796c3b1
PSMDB. PBM. Switch missing automation to hetzner, add missing changes…
sandraromanchenko Apr 28, 2025
a9ed281
PSMDB. Fix PBM test start (#3293)
sandraromanchenko Apr 29, 2025
da3262f
[PKG-639]: Jenkins job to generate PG SBOM json files. (#3295)
Apr 30, 2025
b91d671
PSMDB. Change integration run parameters (#3296)
sandraromanchenko Apr 30, 2025
5175e31
[PKG-639]: Fixes variable name issue. (#3297)
Apr 30, 2025
f45977c
[PKG-639]: Adds missing parameter to build function. (#3299)
Apr 30, 2025
ffac064
[PKG-639]: Fixes the issue with upload command (#3300)
Apr 30, 2025
a96e4ad
[PKG-639]: Fixes the path issue with upload command (#3301)
Apr 30, 2025
6ea8c91
PBM update default golang image (#3310)
olexandr-havryliak May 8, 2025
a207480
PSMDB regression tests to Hetzner (#3289)
olexandr-havryliak May 8, 2025
1dcff39
PBM update golang (#3317)
olexandr-havryliak May 13, 2025
0b78c73
PKG-683 htz.cloud: add launcher-x64 to nbg1, hel1, fsn1 EU regions
vorsel May 12, 2025
9b9ee42
PKG-551 Packaging tasks for release - PS 8.0.42-33 (#3326)
adivinho May 16, 2025
acffbca
Fix PG build (#3336)
EvgeniyPatlan May 19, 2025
fd9b2d2
Update pg_tarballs.groovy (#3339)
EvgeniyPatlan May 20, 2025
1438acd
PML. Download code from github on docker build stage (#3343)
sandraromanchenko May 22, 2025
b4f2015
Update version
EvgeniyPatlan May 22, 2025
6a187b1
PKG-733 Add autobuild and release jenkins jobs for Percona Mongolink
surbhat1595 May 22, 2025
3cb3b10
PML. Fix build pipeline (#3348)
sandraromanchenko May 22, 2025
52fe711
make build on OL8
EvgeniyPatlan May 23, 2025
99cda4e
fix build
EvgeniyPatlan May 24, 2025
80c449b
Test
sandraromanchenko May 27, 2025
44901f3
Hetzner (#3363)
adivinho Jun 1, 2025
db4df2c
PLM rename (#3372)
sandraromanchenko Jun 5, 2025
3cf8c0f
PKG-776 pmm.cd: add hetzner cloud config
vorsel Jun 4, 2025
e22927d
PKG-777 PLM: rename pml to plm
vorsel Jun 5, 2025
46c2374
PKG-775 psmdb60: build focal olny for PRO
vorsel Jun 9, 2025
88f411d
Hetzner (#3380)
adivinho Jun 10, 2025
d8d3b39
Fix builds (#3382)
EvgeniyPatlan Jun 11, 2025
395ae6a
Fix typo
EvgeniyPatlan Jun 11, 2025
3b29779
Add pg nightly (#3383)
EvgeniyPatlan Jun 11, 2025
570f411
Fix
EvgeniyPatlan Jun 11, 2025
ceee9ba
fix ver
EvgeniyPatlan Jun 11, 2025
53c6c72
Hetzner (#3386)
adivinho Jun 16, 2025
504925d
Update nightly jobs
EvgeniyPatlan Jun 16, 2025
56a92d5
PG17 builds on commit (#3388)
EvgeniyPatlan Jun 17, 2025
c2b94f6
PKG-775 psmdb.cd: remove focal from psmdb/pbm/plm/mongosh
vorsel Jun 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Percona-Lab/build-engineers

/cloud/gcp-functions/ @egegunes @inelpandzic
/cloud/ @hors @tplavcic @nmarukovich @ptankov @jvpasinatto @eleo007
/cloud/ @hors @tplavcic @nmarukovich @jvpasinatto @eleo007
/pmm/ @talhabinrizwan @ademidoff @puneet0191
/IaC/pmm.cd/ @talhabinrizwan @ademidoff
/pxb/ @mchawla16 @eleo007 @mohitj1988 @kaushikpuneet07 @panchal-yash @Percona-Lab/build-engineers
Expand All @@ -14,3 +14,4 @@
/pdmdb/ @olexandr-havryliak @sandraromanchenko @Percona-Lab/build-engineers
/pdps/ @eleo007 @kaushikpuneet07 @Percona-Lab/build-engineers
/pdpxc/ @eleo007 @kaushikpuneet07 @Percona-Lab/build-engineers
/pml/ @olexandr-havryliak @sandraromanchenko @keithquinnpercona @Percona-Lab/build-engineers
188 changes: 188 additions & 0 deletions IaC/pmm.cd/init.groovy.d/htz.cloud.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
import cloud.dnation.jenkins.plugins.hetzner.*
import cloud.dnation.jenkins.plugins.hetzner.launcher.*
import hudson.model.*
import jenkins.model.Jenkins
import java.util.logging.Logger

def cloudName = "pmm-htz"

imageMap = [:] // ID TYPE NAME DESCRIPTION ARCHITECTURE IMAGE SIZE DISK SIZE CREATED DEPRECATED
imageMap['deb12-x64'] = '114690387' // 114690387 system debian-12 Debian 12 x86 - 5 GB Tue Jun 13 09:00:02 EEST 2023 -
imageMap['deb12-aarch64'] = '114690389' // 114690389 system debian-12 Debian 12 arm - 5 GB Tue Jun 13 09:00:03 EEST 2023 -
imageMap['launcher-x64'] = imageMap['deb12-x64']

execMap = [:]
execMap['deb'] = 1
execMap['deb12-x64-nbg1'] = execMap['deb']
execMap['deb12-x64-hel1'] = execMap['deb']
execMap['deb12-x64-fsn1'] = execMap['deb']
execMap['deb12-aarch64-nbg1'] = execMap['deb']
execMap['deb12-aarch64-hel1'] = execMap['deb']
execMap['deb12-aarch64-fsn1'] = execMap['deb']
execMap['deb12-x64-nbg1-min'] = execMap['deb']
execMap['deb12-x64-hel1-min'] = execMap['deb']
execMap['deb12-x64-fsn1-min'] = execMap['deb']
execMap['deb12-aarch64-nbg1-min'] = execMap['deb']
execMap['deb12-aarch64-hel1-min'] = execMap['deb']
execMap['deb12-aarch64-fsn1-min'] = execMap['deb']
execMap['launcher-x64-nbg1'] = 30
execMap['launcher-x64-hel1'] = 30
execMap['launcher-x64-fsn1'] = 30

bootDeadlineMap =[:]
bootDeadlineMap['default'] = 3
bootDeadlineMap['deb12-x64-nbg1'] = bootDeadlineMap['default']
bootDeadlineMap['deb12-x64-hel1'] = bootDeadlineMap['default']
bootDeadlineMap['deb12-x64-fsn1'] = bootDeadlineMap['default']
bootDeadlineMap['deb12-aarch64-nbg1'] = bootDeadlineMap['default']
bootDeadlineMap['deb12-aarch64-hel1'] = bootDeadlineMap['default']
bootDeadlineMap['deb12-aarch64-fsn1'] = bootDeadlineMap['default']
bootDeadlineMap['deb12-x64-nbg1-min'] = bootDeadlineMap['default']
bootDeadlineMap['deb12-x64-hel1-min'] = bootDeadlineMap['default']
bootDeadlineMap['deb12-x64-fsn1-min'] = bootDeadlineMap['default']
bootDeadlineMap['deb12-aarch64-nbg1-min'] = bootDeadlineMap['default']
bootDeadlineMap['deb12-aarch64-hel1-min'] = bootDeadlineMap['default']
bootDeadlineMap['deb12-aarch64-fsn1-min'] = bootDeadlineMap['default']
bootDeadlineMap['launcher-x64-nbg1'] = bootDeadlineMap['default']
bootDeadlineMap['launcher-x64-hel1'] = bootDeadlineMap['default']
bootDeadlineMap['launcher-x64-fsn1'] = bootDeadlineMap['default']

jvmOptsMap = [:]
jvmOptsMap['deb12'] = '-Xmx512m -Xms512m --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED'
jvmOptsMap['deb12-x64-nbg1'] = jvmOptsMap['deb12']
jvmOptsMap['deb12-x64-hel1'] = jvmOptsMap['deb12']
jvmOptsMap['deb12-x64-fsn1'] = jvmOptsMap['deb12']
jvmOptsMap['deb12-aarch64-nbg1'] = jvmOptsMap['deb12']
jvmOptsMap['deb12-aarch64-hel1'] = jvmOptsMap['deb12']
jvmOptsMap['deb12-aarch64-fsn1'] = jvmOptsMap['deb12']
jvmOptsMap['deb12-x64-nbg1-min'] = jvmOptsMap['deb12']
jvmOptsMap['deb12-x64-hel1-min'] = jvmOptsMap['deb12']
jvmOptsMap['deb12-x64-fsn1-min'] = jvmOptsMap['deb12']
jvmOptsMap['deb12-aarch64-nbg1-min'] = jvmOptsMap['deb12']
jvmOptsMap['deb12-aarch64-hel1-min'] = jvmOptsMap['deb12']
jvmOptsMap['deb12-aarch64-fsn1-min'] = jvmOptsMap['deb12']
jvmOptsMap['launcher-x64-nbg1'] = jvmOptsMap['deb12']
jvmOptsMap['launcher-x64-hel1'] = jvmOptsMap['deb12']
jvmOptsMap['launcher-x64-fsn1'] = jvmOptsMap['deb12']

labelMap = [:]
labelMap['deb12-x64-min'] = 'docker-x64-min docker-deb12-x64-min deb12-x64-min'
labelMap['deb12-aarch64-min'] = 'docker-aarch64-min docker-deb12-aarch64-min deb12-aarch64-min'
labelMap['deb12-x64'] = 'docker-x64 docker-deb12-x64 deb12-x64'
labelMap['deb12-aarch64'] = 'docker-aarch64 docker-deb12-aarch64 deb12-aarch64'
labelMap['launcher-x64'] = 'launcher-x64'

networkMap = [:]
networkMap['percona-vpc-eu'] = '10442325' // percona-vpc-eu

initMap = [:]
initMap['deb-docker'] = '''#!/bin/bash -x
set -o xtrace
sudo fallocate -l 32G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

export DEBIAN_FRONTEND=noninteractive
until sudo apt-get update; do
sleep 1
echo try again
done
until sudo apt-get -y install openjdk-17-jre-headless apt-transport-https ca-certificates curl gnupg lsb-release unzip git; do
sleep 1
echo try again
done
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
until sudo apt-get update; do
sleep 1
echo try again
done
until sudo apt-get -y install docker-ce docker-ce-cli containerd.io; do
sleep 1
echo try again
done
if ! $(aws --version | grep -q 'aws-cli/2'); then
find /tmp -maxdepth 1 -name "*aws*" | xargs sudo rm -rf
until curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m)-2.22.35.zip" -o "/tmp/awscliv2.zip"; do
sleep 1
echo try again
done
unzip -o /tmp/awscliv2.zip -d /tmp
cd /tmp/aws && sudo ./install
fi
sudo install -o $(id -u -n) -g $(id -g -n) -d /mnt/jenkins
sudo sysctl net.ipv4.tcp_fin_timeout=15
sudo sysctl net.ipv4.tcp_tw_reuse=1
sudo sysctl net.ipv6.conf.all.disable_ipv6=1
sudo sysctl net.ipv6.conf.default.disable_ipv6=1
sudo sysctl -w fs.inotify.max_user_watches=10000000 || true
sudo sysctl -w fs.aio-max-nr=1048576 || true
sudo sysctl -w fs.file-max=6815744 || true
echo "* soft core unlimited" | sudo tee -a /etc/security/limits.conf
sudo sed -i.bak -e 's^ExecStart=.*^ExecStart=/usr/bin/dockerd --data-root=/mnt/docker --default-ulimit nofile=900000:900000^' /lib/systemd/system/docker.service
sudo systemctl daemon-reload
sudo install -o root -g root -d /mnt/docker
sudo usermod -aG docker $(id -u -n)
sudo mkdir -p /etc/docker
echo '{"experimental": true, "ipv6": true, "fixed-cidr-v6": "fd3c:a8b0:18eb:5c06::/64"}' | sudo tee /etc/docker/daemon.json
sudo systemctl restart docker
echo "* * * * * root /usr/sbin/route add default gw 10.177.1.1 eth0" | sudo tee /etc/cron.d/fix-default-route
'''
initMap['deb12-x64-nbg1'] = initMap['deb-docker']
initMap['deb12-x64-hel1'] = initMap['deb-docker']
initMap['deb12-x64-fsn1'] = initMap['deb-docker']
initMap['deb12-aarch64-nbg1'] = initMap['deb-docker']
initMap['deb12-aarch64-hel1'] = initMap['deb-docker']
initMap['deb12-aarch64-fsn1'] = initMap['deb-docker']
initMap['deb12-x64-nbg1-min'] = initMap['deb-docker']
initMap['deb12-x64-hel1-min'] = initMap['deb-docker']
initMap['deb12-x64-fsn1-min'] = initMap['deb-docker']
initMap['deb12-aarch64-nbg1-min'] = initMap['deb-docker']
initMap['deb12-aarch64-hel1-min'] = initMap['deb-docker']
initMap['deb12-aarch64-fsn1-min'] = initMap['deb-docker']
initMap['launcher-x64-nbg1'] = initMap['deb-docker']
initMap['launcher-x64-hel1'] = initMap['deb-docker']
initMap['launcher-x64-fsn1'] = initMap['deb-docker']

def templates = [
/* new HetznerServerTemplate("ubuntu20-cx21", "java", "name=ubuntu20-docker", "fsn1", "cx21"), */
// tmplName tmplLabels tmplImage region server type
new HetznerServerTemplate("deb12-x64-nbg1-min", labelMap['deb12-x64-min'], imageMap['deb12-x64'], "nbg1", "cpx41"),
new HetznerServerTemplate("deb12-aarch64-nbg1-min", labelMap['deb12-aarch64-min'], imageMap['deb12-aarch64'], "nbg1", "cax31"),
new HetznerServerTemplate("deb12-x64-hel1-min", labelMap['deb12-x64-min'], imageMap['deb12-x64'], "hel1", "cpx41"),
new HetznerServerTemplate("deb12-aarch64-hel1-min", labelMap['deb12-aarch64-min'], imageMap['deb12-aarch64'], "hel1", "cax31"),
new HetznerServerTemplate("deb12-x64-fsn1-min", labelMap['deb12-x64-min'], imageMap['deb12-x64'], "fsn1", "cpx41"),
new HetznerServerTemplate("deb12-aarch64-fsn1-min", labelMap['deb12-aarch64-min'], imageMap['deb12-aarch64'], "fsn1", "cax31"),
new HetznerServerTemplate("deb12-x64-nbg1", labelMap['deb12-x64'], imageMap['deb12-x64'], "nbg1", "cpx51"),
new HetznerServerTemplate("deb12-aarch64-nbg1", labelMap['deb12-aarch64'], imageMap['deb12-aarch64'], "nbg1", "cax41"),
new HetznerServerTemplate("deb12-x64-hel1", labelMap['deb12-x64'], imageMap['deb12-x64'], "hel1", "cpx51"),
new HetznerServerTemplate("deb12-aarch64-hel1", labelMap['deb12-aarch64'], imageMap['deb12-aarch64'], "hel1", "cax41"),
new HetznerServerTemplate("deb12-x64-fsn1", labelMap['deb12-x64'], imageMap['deb12-x64'], "fsn1", "cpx51"),
new HetznerServerTemplate("deb12-aarch64-fsn1", labelMap['deb12-aarch64'], imageMap['deb12-aarch64'], "fsn1", "cax41"),
new HetznerServerTemplate("launcher-x64-nbg1", labelMap['launcher-x64'], imageMap['launcher-x64'], "nbg1", "cpx21"),
new HetznerServerTemplate("launcher-x64-hel1", labelMap['launcher-x64'], imageMap['launcher-x64'], "hel1", "cpx21"),
new HetznerServerTemplate("launcher-x64-fsn1", labelMap['launcher-x64'], imageMap['launcher-x64'], "fsn1", "cpx21")
]

templates.each { it ->
def sshConnector = new SshConnectorAsRoot("htz.cd.key")
sshConnector.setConnectionMethod(new PublicAddressOnly()) // Replace with the desired method
it.setConnector(sshConnector)
def tmplName = it.name
it.setNumExecutors(execMap[tmplName])
it.bootDeadline = bootDeadlineMap[tmplName]
it.remoteFs = "/mnt/jenkins/"
it.jvmOpts = jvmOptsMap[tmplName]
it.network = networkMap['percona-vpc-eu']
it.userData = initMap[tmplName]
}

// public HetznerCloud(String name, String credentialsId, String instanceCapStr, List<HetznerServerTemplate> serverTemplates)
def cloud = new HetznerCloud(cloudName, "htz.cd.token", "100", templates)

def jenkins = Jenkins.get()

jenkins.clouds.remove(jenkins.clouds.getByName(cloudName))
jenkins.clouds.add(cloud)
jenkins.save()
Loading