blob: 10450a8f56c4bf40f72b6cefaa283984f5951971 [file] [log] [blame]
Vasyl Saienko9740a4f2023-09-22 14:48:29 +00001#!/bin/bash
2set -ex
3
4export ENVIRONMENT=${ENVIRONMENT:-'mosk-23.3'}
5
6source env/${ENVIRONMENT}.sh
7export VM_NAME=${VM_NAME:-"${ENVIRONMENT}-amd64-$(date +"%Y%m%d%H%M%S").qcow2"}
8
9export PACKER_LOG=1
10export PACKER_IMAGES_CACHE="./packer_images_cache"
11mkdir -p "${PACKER_IMAGES_CACHE}"
12
13PACKER_BINARY=${PACKER_BINARY:-"$(which packer)"}
14
15
16./config_drive.sh
17
18$PACKER_BINARY build -on-error=abort template.json