Simplify continuation and go back to echoing.

This commit is contained in:
Greg Hellings
2024-11-19 07:18:36 +00:00
parent 606f6259f8
commit 8301af5669
+12 -30
View File
@@ -18,6 +18,11 @@ let
paths = [ "./packer_config/" ];
}
];
variables = {
PACKER_CONFIG_DIR = "./packer_config/";
PACKER_CACHE_DIR = "./cache/";
PACKER_LOG = "1";
};
rules = [
{
"if" = "$CI_COMMIT_TAG";
@@ -46,51 +51,28 @@ let
];
};
variables = {
PACKER_CONFIG_DIR = "./packer_config/";
PACKER_CACHE_DIR = "./cache/";
PACKER_LOG = "1";
};
continue = {
stages = [
"build"
"release"
];
"qemu.amd64" = general // {
variables = variables // {
only = "-only=qemu.amd64";
};
tags = [ "qemu" ];
parallel = {
matrix = qemu_list;
};
before_script = [
"echo $BUILD"
"env"
];
parallel.matrix = qemu_list;
};
"virtualbox-iso.amd64" = general // {
variables = variables // {
only = "-only=\"virtualbox-iso.amd64\"";
};
tags = [ "vbox" ];
parallel = {
matrix = vbox_list;
};
parallel.matrix = vbox_list;
};
"hyperv-iso.amd64" = general // {
variables = variables // {
only = "-only=\"hyperv-iso.amd64\"";
};
tags = [ "hyperv" ];
parallel = {
matrix = hyperv_list;
};
parallel.matrix = hyperv_list;
script = [
"packer init sources"
"packer build -only=\"hyperv-iso.amd64\" -var-file=\"\${distro}\" -var build=\${BUILD} -var cpus=2 -var memory=4096 \${EXCEPT} sources"
"if (-not $?) { throw \"Error in build\" }"
"echo packer build -only=\"hyperv-iso.amd64\" -var-file=\"\${distro}\" -var build=\${BUILD} -var cpus=2 -var memory=4096 \${EXCEPT} sources > build.ps1"
"echo 'if (-not $?) { throw \"Error in build\" }' >> build.ps1"
"cat .\build.ps1"
"pwsh .\build.ps1"
];
};
"Create release" = {