56 lines
1.1 KiB
Groovy
56 lines
1.1 KiB
Groovy
def baseName = 'maintenance/packer'
|
|
def vms = ['qemu']
|
|
def platforms = ['8.2', 'sisyphus']
|
|
def baseDistrVersion = '8.2'
|
|
def distrs = ['srv', 'ws', 'kws']
|
|
def githubProject = 'altlinuxteam/alt-packer'
|
|
def githubBranch = 'jenkins'
|
|
def packerCachePath = '/data/iso_images/template/iso' // our PVE specific path
|
|
|
|
platforms.each { p ->
|
|
distrs.each { d ->
|
|
vms.each { v ->
|
|
def jobName = "${baseName}-${v}-${d}-${p}"
|
|
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 -f results/*
|
|
|
|
nix-shell -p gnumake packer --run " \
|
|
make \
|
|
-e VM_TYPE=${v} \
|
|
-e BASE_VERSION=${baseDistrVersion} \
|
|
-e TARGET_VERSION=${p} \
|
|
-e PACKER_CACHE_DIR=${packerCachePath} \
|
|
${d}"
|
|
|
|
for ext in tar.gz md5 sha1; do
|
|
mv results/${d}.${v}.\${ext} results/alt-${d}-${p}-${v}.\${ext}
|
|
done
|
|
""".stripIndent()
|
|
)
|
|
}
|
|
|
|
publishers {
|
|
archiveArtifacts {
|
|
pattern('results/*')
|
|
onlyIfSuccessful(true)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|