neoloc/build_incus_images (#11)
Some checks failed
Deploy / build (push) Failing after 42s

Reviewed-on: https://git.query.consul/unkin/packer-images/pulls/11
This commit is contained in:
Ben Vincent 2025-04-24 01:12:25 +10:00
parent f59b0fa199
commit 8e42e3c6b9
10 changed files with 32 additions and 10 deletions

View File

@ -50,11 +50,11 @@ build {
post-processor "shell-local" {
inline = [
"incus image alias delete local:${local.incus_base_name}/latest || true",
"incus image alias delete local:${local.incus_base_name}/${var.date} || true",
"incus image info local:${local.incus_output_image} | grep Fingerprint | awk '{print $2}'",
"incus image alias create local:${local.incus_base_name}/latest $(incus image info local:${local.incus_output_image} | grep Fingerprint | awk '{print $2}')",
"incus image alias create local:${local.incus_base_name}/${var.date} $(incus image info local:${local.incus_output_image} | grep Fingerprint | awk '{print $2}')"
"incus image alias delete $(incus remote get-default):${local.incus_base_name}/latest || true",
"incus image alias delete $(incus remote get-default):${local.incus_base_name}/${var.date} || true",
"incus image info $(incus remote get-default):${local.incus_output_image} | grep Fingerprint | awk '{print $2}'",
"incus image alias create $(incus remote get-default):${local.incus_base_name}/latest $(incus image info $(incus remote get-default):${local.incus_output_image} | grep Fingerprint | awk '{print $2}')",
"incus image alias create $(incus remote get-default):${local.incus_base_name}/${var.date} $(incus image info $(incus remote get-default):${local.incus_output_image} | grep Fingerprint | awk '{print $2}')"
]
}
}

View File

@ -12,7 +12,7 @@ fi
# Run `make all` if there are changes in builds/
if [ -n "$builds_changes" ]; then
echo "Changes detected in builds/. Running 'make all'..."
make all
make all && exit 0 || exit 1
fi
# Run specific `make` commands for each changed file in images/

View File

@ -1,7 +1,6 @@
# almalinux/8.10/base
deploy_files_from_image = true
deploy_files_from_common = true
use_incus = false
packages = [
"git",
"jq",
@ -10,6 +9,7 @@ packages = [
"python3.11-pip",
"python3.12",
"python3.12-pip",
"unkin-ca-certificates",
"uv",
"wget",
]

View File

@ -1 +1,2 @@
docker
incus

View File

@ -1,7 +1,7 @@
# almalinux/9.5/base
deploy_files_from_image = true
deploy_files_from_common = true
use_incus = false
use_incus = true
packages = [
"git",
"jq",
@ -10,6 +10,7 @@ packages = [
"python3.11-pip",
"python3.12",
"python3.12-pip",
"unkin-ca-certificates",
"uv",
"wget",
]

View File

@ -0,0 +1 @@
incus

View File

@ -0,0 +1,4 @@
[puppet]
name=puppet repository
baseurl=https://packagerepo.service.consul/puppet7/el/9-daily/x86_64/os/
gpgkey=https://packagerepo.service.consul/puppet7/el/9-daily/x86_64/os/RPM-GPG-KEY-puppet-20250406

View File

@ -0,0 +1,16 @@
# almalinux/9.5/puppet-base
incus_source = "almalinux9/base/latest"
deploy_files_from_image = true
use_incus = true
packages = [
"puppet-agent",
"puppet-initial"
]
scripts_pre_packages = [
"dnf makecache",
"dnf update -y",
]
scripts_final = [
"dnf clean all",
"rm -rf /var/cache/dnf"
]

View File

@ -7,5 +7,5 @@ source "docker" "os" {
source "incus" "os" {
image = var.incus_source
output_image = local.incus_output_image
publish_remote_name = "local"
profile = "build"
}

View File

@ -121,7 +121,6 @@ variable "git_branch" {
type = string
default = env("GIT_BRANCH")
}
variable "include_incus_client_certs" {
type = bool
default = false