61 lines
1.3 KiB
Groovy
61 lines
1.3 KiB
Groovy
def baseName = 'maintenance/packer'
|
|
def target_names = ['alt-server', 'alt-workstation', 'alt-kworkstation']
|
|
def vms = ['qemu', 'onebula']
|
|
def platforms = ['8.2', '8.3', '8sp', '9', 'sisyphus']
|
|
def arch = 'x86_64'
|
|
def githubProject = 'altlinuxteam/alt-packer'
|
|
def githubBranch = 'jenkins'
|
|
def packerCachePath = '/data/iso_images/template/iso' // our PVE specific path
|
|
|
|
platforms.each { p ->
|
|
target_names.each { tname ->
|
|
vms.each { v ->
|
|
def jobName = "${baseName}-${v}-${tname}-${p}-${arch}"
|
|
job(jobName) {
|
|
label('kvm && bigmem && nix')
|
|
scm {
|
|
github(githubProject, githubBranch)
|
|
}
|
|
wrappers {
|
|
colorizeOutput()
|
|
timestamps()
|
|
}
|
|
steps {
|
|
shell("""#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
set -x
|
|
|
|
rm -rf output-*
|
|
rm -rf onebula-*
|
|
rm -rf vbox-*
|
|
rm -rf qemu-*
|
|
rm -f results/*
|
|
|
|
nix-shell -p gnumake packer --run " \
|
|
make \
|
|
-e target=${tname} \
|
|
-e VM_TYPE=${v} \
|
|
-e BASE_VERSION=${p} \
|
|
-e TARGET_VERSION=${p} \
|
|
-e PACKER_CACHE_DIR=${packerCachePath} \
|
|
image"
|
|
|
|
for ext in tar.gz md5 sha1 box; do
|
|
mv results/${v}-${tname}-${p}-${arch}.\${ext} results/${tname}-${p}-${v}.\${ext}
|
|
done
|
|
""".stripIndent()
|
|
)
|
|
}
|
|
|
|
publishers {
|
|
archiveArtifacts {
|
|
pattern('results/*')
|
|
onlyIfSuccessful(true)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|