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/" ]; paths = [ "./packer_config/" ];
} }
]; ];
variables = {
PACKER_CONFIG_DIR = "./packer_config/";
PACKER_CACHE_DIR = "./cache/";
PACKER_LOG = "1";
};
rules = [ rules = [
{ {
"if" = "$CI_COMMIT_TAG"; "if" = "$CI_COMMIT_TAG";
@@ -46,51 +51,28 @@ let
]; ];
}; };
variables = {
PACKER_CONFIG_DIR = "./packer_config/";
PACKER_CACHE_DIR = "./cache/";
PACKER_LOG = "1";
};
continue = { continue = {
stages = [ stages = [
"build" "build"
"release" "release"
]; ];
"qemu.amd64" = general // { "qemu.amd64" = general // {
variables = variables // {
only = "-only=qemu.amd64";
};
tags = [ "qemu" ]; tags = [ "qemu" ];
parallel = { parallel.matrix = qemu_list;
matrix = qemu_list;
};
before_script = [
"echo $BUILD"
"env"
];
}; };
"virtualbox-iso.amd64" = general // { "virtualbox-iso.amd64" = general // {
variables = variables // {
only = "-only=\"virtualbox-iso.amd64\"";
};
tags = [ "vbox" ]; tags = [ "vbox" ];
parallel = { parallel.matrix = vbox_list;
matrix = vbox_list;
};
}; };
"hyperv-iso.amd64" = general // { "hyperv-iso.amd64" = general // {
variables = variables // {
only = "-only=\"hyperv-iso.amd64\"";
};
tags = [ "hyperv" ]; tags = [ "hyperv" ];
parallel = { parallel.matrix = hyperv_list;
matrix = hyperv_list;
};
script = [ script = [
"packer init sources" "packer init sources"
"packer build -only=\"hyperv-iso.amd64\" -var-file=\"\${distro}\" -var build=\${BUILD} -var cpus=2 -var memory=4096 \${EXCEPT} sources" "echo packer build -only=\"hyperv-iso.amd64\" -var-file=\"\${distro}\" -var build=\${BUILD} -var cpus=2 -var memory=4096 \${EXCEPT} sources > build.ps1"
"if (-not $?) { throw \"Error in build\" }" "echo 'if (-not $?) { throw \"Error in build\" }' >> build.ps1"
"cat .\build.ps1"
"pwsh .\build.ps1"
]; ];
}; };
"Create release" = { "Create release" = {