From bb0303814d351fcf92b2e386470a39376fa106b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vojt=C4=9Bch=20Mare=C5=A1?= Date: Fri, 13 Jun 2025 20:53:00 +0200 Subject: [PATCH] refactor: single hcloud_token var definition and remove parallel exec in ci MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Vojtěch Mareš --- .gitlab-ci.yml | 12 ++---------- images/_hcloud.hcl | 5 +++++ images/talos-v1.10.3.pkr.hcl | 6 ------ 3 files changed, 7 insertions(+), 16 deletions(-) create mode 100644 images/_hcloud.hcl diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 947fd81..1dc650f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,13 +14,6 @@ stages: - validate - build -.parallel: - parallel: - matrix: - - IMAGE: - - flatcar-stable - - talos-v1.10.3 - validate: stage: validate script: @@ -28,10 +21,9 @@ validate: - packer fmt -check images - packer validate images -build-image: - extends: .parallel +build-images: stage: build script: - - packer build $IMAGE.pkr.hcl + - packer build images rules: - if: $CI_COMMIT_BRANCH == "main" diff --git a/images/_hcloud.hcl b/images/_hcloud.hcl new file mode 100644 index 0000000..012e434 --- /dev/null +++ b/images/_hcloud.hcl @@ -0,0 +1,5 @@ +variable "hcloud_token" { + type = string + default = env("HCLOUD_TOKEN") + sensitive = true +} diff --git a/images/talos-v1.10.3.pkr.hcl b/images/talos-v1.10.3.pkr.hcl index c0481c3..0d31edb 100644 --- a/images/talos-v1.10.3.pkr.hcl +++ b/images/talos-v1.10.3.pkr.hcl @@ -14,12 +14,6 @@ locals { talos_version = "v1.10.3" } -variable "hcloud_token" { - type = string - default = env("HCLOUD_TOKEN") - sensitive = true -} - source "hcloud" "talos" { token = var.hcloud_token