initial commit
This commit is contained in:
commit
96c1e2d1f8
14 changed files with 551 additions and 0 deletions
42
mise.toml
Normal file
42
mise.toml
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
|
||||
[tasks.lint]
|
||||
usage = '''
|
||||
arg "<dir>" help="Directory containing the Packer template to lint e.g. debian/13-trixie"
|
||||
'''
|
||||
run = '''
|
||||
packer fmt --recursive --check ${usage_dir?} \
|
||||
&& packer validate ${usage_dir?}
|
||||
'''
|
||||
|
||||
[tasks.fmt]
|
||||
usage = '''
|
||||
arg "<dir>" help="Directory containing the Packer template to format e.g. debian/13-trixie" default="."
|
||||
'''
|
||||
run = "packer fmt --recursive ${usage_dir?}"
|
||||
|
||||
[tasks.build]
|
||||
usage = '''
|
||||
arg "<dir>" help="Directory containing the Packer template to build e.g. debian/13-trixie"
|
||||
'''
|
||||
run = '''
|
||||
mise run lint ${usage_dir?} \
|
||||
&& packer build ${usage_dir?}
|
||||
'''
|
||||
|
||||
[tasks.init]
|
||||
usage = '''
|
||||
arg "<dir>" help="Directory containing the Packer template to initialize e.g. debian/13-trixie"
|
||||
'''
|
||||
run = "packer init ${usage_dir?}"
|
||||
|
||||
[tasks.setup]
|
||||
usage = '''
|
||||
arg "<distribution>" help="The Linux distribution name (e.g. debian)"
|
||||
arg "<version>" help="The Linux distribution version (e.g. 13-trixie)"
|
||||
'''
|
||||
run = '''
|
||||
mkdir -p ${usage_distribution?}/${usage_version?} \
|
||||
&& ln -s ../../credentials.auto.pkrvars.hcl ${usage_distribution?}/${usage_version?}/credentials.auto.pkrvars.hcl \
|
||||
&& ln -s ../../variables-common.pkr.hcl ${usage_distribution?}/${usage_version?}/variables-common.pkr.hcl \
|
||||
&& touch ${usage_distribution?}/${usage_version?}/${usage_distribution?}-${usage_version?}.pkr.hcl
|
||||
'''
|
||||
Loading…
Add table
Add a link
Reference in a new issue