Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pre-commit-hooks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nimrod
pre-commit-hooks
Commits
1d2851f1
Commit
1d2851f1
authored
3 years ago
by
nimrod
Browse files
Options
Downloads
Patches
Plain Diff
fixup! Packer hooks.
parent
b4a1f804
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
test_files/template.pkr.hcl
+27
-37
27 additions, 37 deletions
test_files/template.pkr.hcl
with
27 additions
and
37 deletions
test_files/template.pkr.hcl
+
27
−
37
View file @
1d2851f1
packer
{
build
{
required_plugins
{
name
=
"alpine"
amazon
=
{
description
=
<<
EOF
version
=
">= 0.0.2"
This
build
creates
alpine
images
for
versions
:
source
=
"github.com/hashicorp/amazon"
*
v3
.
12
For
the
following
builders
:
*
virtualbox-iso
EOF
// the common fields of the source blocks are defined in the
// source.builder-type.pkr.hcl files, here we only set the fields specific to
// the different versions of ubuntu.
source
"source.virtualbox-iso.base-alpine-amd64"
{
name
=
"3.12"
iso_url
=
local
.
iso_url_alpine_312
iso_checksum
=
"file:${local.iso_checksum_url_alpine_312}"
output_directory
=
"virtualbox_iso_alpine_312_amd64"
boot_command
=
local
.
alpine_312_floppy_boot_command
boot_wait
=
"10s"
}
}
source
"source.vsphere-iso.base-alpine-amd64"
{
name
=
"3.12"
vm_name
=
"alpine-3.12"
iso_url
=
local
.
iso_url_alpine_312
iso_checksum
=
"file:${local.iso_checksum_url_alpine_312}"
boot_command
=
local
.
alpine_312_floppy_boot_command_vsphere
boot_wait
=
"10s"
}
}
source
"source.vmware-iso.esxi-base-alpine-amd64"
{
name
=
"3.12-from-esxi"
iso_url
=
local
.
iso_url_alpine_312
iso_checksum
=
"file:${local.iso_checksum_url_alpine_312}"
boot_command
=
local
.
alpine_312_floppy_boot_command_vsphere
}
}
provisioner
"shell"
{
source
"amazon-ebs"
"ubuntu"
{
inline
=
[
"echo hi"
]
ami_name
=
"learn-packer-linux-aws"
instance_type
=
"t2.micro"
region
=
"us-west-2"
source_ami_filter
{
filters
=
{
name
=
"ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*"
root-device-type
=
"ebs"
virtualization-type
=
"hvm"
}
}
most_recent
=
true
owners
=
[
"099720109477"
]
}
}
ssh_username
=
"ubuntu"
}
build
{
name
=
"learn-packer"
sources
=
[
"source.amazon-ebs.ubuntu"
]
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment