refactor: single hcloud_token var definition and remove parallel exec in ci
Signed-off-by: Vojtěch Mareš <vojtech@mares.cz>
This commit is contained in:
parent
ccc1c08044
commit
bb0303814d
3 changed files with 7 additions and 16 deletions
|
|
@ -14,13 +14,6 @@ stages:
|
||||||
- validate
|
- validate
|
||||||
- build
|
- build
|
||||||
|
|
||||||
.parallel:
|
|
||||||
parallel:
|
|
||||||
matrix:
|
|
||||||
- IMAGE:
|
|
||||||
- flatcar-stable
|
|
||||||
- talos-v1.10.3
|
|
||||||
|
|
||||||
validate:
|
validate:
|
||||||
stage: validate
|
stage: validate
|
||||||
script:
|
script:
|
||||||
|
|
@ -28,10 +21,9 @@ validate:
|
||||||
- packer fmt -check images
|
- packer fmt -check images
|
||||||
- packer validate images
|
- packer validate images
|
||||||
|
|
||||||
build-image:
|
build-images:
|
||||||
extends: .parallel
|
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- packer build $IMAGE.pkr.hcl
|
- packer build images
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH == "main"
|
- if: $CI_COMMIT_BRANCH == "main"
|
||||||
|
|
|
||||||
5
images/_hcloud.hcl
Normal file
5
images/_hcloud.hcl
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
variable "hcloud_token" {
|
||||||
|
type = string
|
||||||
|
default = env("HCLOUD_TOKEN")
|
||||||
|
sensitive = true
|
||||||
|
}
|
||||||
|
|
@ -14,12 +14,6 @@ locals {
|
||||||
talos_version = "v1.10.3"
|
talos_version = "v1.10.3"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "hcloud_token" {
|
|
||||||
type = string
|
|
||||||
default = env("HCLOUD_TOKEN")
|
|
||||||
sensitive = true
|
|
||||||
}
|
|
||||||
|
|
||||||
source "hcloud" "talos" {
|
source "hcloud" "talos" {
|
||||||
token = var.hcloud_token
|
token = var.hcloud_token
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue