Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
arch-boxes
Commits
0ab2c528
Commit
0ab2c528
authored
Jun 30, 2020
by
juadde
Committed by
Christian Rebischke
Jun 30, 2020
Browse files
JSON packer update for new packer format + cloud.json validation
parent
6e2a8e07
Changes
5
Hide whitespace changes
Inline
Side-by-side
.github/workflows/main.yml
View file @
0ab2c528
...
...
@@ -17,6 +17,9 @@ jobs:
-
name
:
verify vagrant.json
run
:
./generic-ci.sh verify-official
-
name
:
verify cloud.json
run
:
./generic-ci.sh verify-cloud
python-syntax-validation
:
runs-on
:
ubuntu-latest
...
...
cloud.json
View file @
0ab2c528
...
...
@@ -2,7 +2,6 @@
"variables"
:
{
"iso_url"
:
"https://mirror.pkgbuild.com/iso/latest/archlinux-{{isotime
\"
2006.01
\"
}}.01-x86_64.iso"
,
"iso_checksum_url"
:
"https://mirror.pkgbuild.com/iso/latest/sha1sums.txt"
,
"iso_checksum_type"
:
"sha1"
,
"disk_size"
:
"20480"
,
"memory"
:
"1024"
,
"cpus"
:
"2"
,
...
...
@@ -19,8 +18,7 @@
"boot_wait"
:
"{{user `boot_wait`}}"
,
"http_directory"
:
"http"
,
"disk_size"
:
"{{user `disk_size`}}"
,
"iso_checksum_url"
:
"{{user `iso_checksum_url`}}"
,
"iso_checksum_type"
:
"{{user `iso_checksum_type`}}"
,
"iso_checksum"
:
"file:{{user `iso_checksum_url`}}"
,
"iso_url"
:
"{{user `iso_url`}}"
,
"ssh_username"
:
"arch"
,
"ssh_password"
:
"arch"
,
...
...
@@ -66,19 +64,19 @@
],
"post-processors"
:
[
[
{
{
"type"
:
"checksum"
,
"checksum_types"
:
[
"sha256"
"sha256"
],
"output"
:
"Arch-Linux-cloudimg-amd64-{{isotime
\"
2006-01-02
\"
}}.SHA256"
},
{
"type"
:
"shell-local"
,
"inline"
:
[
"mv release/packer-Arch-Linux-cloudimg-amd64-{{isotime
\"
2006-01-02
\"
}}.img release/Arch-Linux-cloudimg-amd64-{{isotime
\"
2006-01-02
\"
}}.img"
,
"sed -i 's/packer-//' Arch-Linux-cloudimg-amd64-{{isotime
\"
2006-01-02
\"
}}.SHA256"
,
"gpg --sign --detach-sign Arch-Linux-cloudimg-amd64-{{isotime
\"
2006-01-02
\"
}}.SHA256"
"mv release/packer-Arch-Linux-cloudimg-amd64-{{isotime
\"
2006-01-02
\"
}}.img release/Arch-Linux-cloudimg-amd64-{{isotime
\"
2006-01-02
\"
}}.img"
,
"sed -i 's/packer-//' Arch-Linux-cloudimg-amd64-{{isotime
\"
2006-01-02
\"
}}.SHA256"
,
"gpg --sign --detach-sign Arch-Linux-cloudimg-amd64-{{isotime
\"
2006-01-02
\"
}}.SHA256"
]
}
]
...
...
generic-ci.sh
View file @
0ab2c528
...
...
@@ -46,6 +46,10 @@ case $1 in
./packer validate local.json
;;
verify-cloud
)
./packer validate cloud.json
;;
# We use + instead of \; here because find doesn't pass
# the exit code through when used with \;
shellcheck
)
...
...
local.json
View file @
0ab2c528
{
"variables"
:
{
"iso_url"
:
"https://mirror.pkgbuild.com/iso/latest/archlinux-{{isotime
\"
2006.01
\"
}}.01-x86_64.iso"
,
"iso_checksum_url"
:
"https://mirror.pkgbuild.com/iso/latest/sha1sums.txt"
,
"iso_checksum_type"
:
"sha1"
,
"disk_size"
:
"20480"
,
"memory"
:
"1024"
,
"cpus"
:
"2"
,
"headless"
:
"true"
,
"write_zeroes"
:
""
,
"boot_wait"
:
"60s"
,
"mirror"
:
""
"iso_url"
:
"https://mirror.pkgbuild.com/iso/latest/archlinux-{{isotime
\"
2006.01
\"
}}.01-x86_64.iso"
,
"iso_checksum_url"
:
"https://mirror.pkgbuild.com/iso/latest/sha1sums.txt"
,
"disk_size"
:
"20480"
,
"memory"
:
"1024"
,
"cpus"
:
"2"
,
"headless"
:
"true"
,
"write_zeroes"
:
""
,
"boot_wait"
:
"60s"
,
"mirror"
:
""
},
"builders"
:
[
{
...
...
@@ -19,8 +17,7 @@
"http_directory"
:
"http"
,
"disk_size"
:
"{{user `disk_size`}}"
,
"guest_os_type"
:
"ArchLinux_64"
,
"iso_checksum_url"
:
"{{user `iso_checksum_url`}}"
,
"iso_checksum_type"
:
"{{user `iso_checksum_type`}}"
,
"iso_checksum"
:
"file:{{user `iso_checksum_url`}}"
,
"iso_url"
:
"{{user `iso_url`}}"
,
"ssh_username"
:
"vagrant"
,
"ssh_password"
:
"vagrant"
,
...
...
@@ -48,13 +45,13 @@
"curl -O 'http://{{.HTTPIP}}:{{.HTTPPort}}/install{,-common,-chroot}.sh'<enter><wait>"
,
"MIRROR='{{user `mirror`}}' bash install.sh < <(cat install-{chroot,common}.sh) && systemctl reboot<enter>"
]
},
{
},
{
"type"
:
"qemu"
,
"boot_wait"
:
"{{user `boot_wait`}}"
,
"http_directory"
:
"http"
,
"disk_size"
:
"{{user `disk_size`}}"
,
"iso_checksum_url"
:
"{{user `iso_checksum_url`}}"
,
"iso_checksum_type"
:
"{{user `iso_checksum_type`}}"
,
"iso_checksum"
:
"file:{{user `iso_checksum_url`}}"
,
"iso_url"
:
"{{user `iso_url`}}"
,
"ssh_username"
:
"vagrant"
,
"ssh_password"
:
"vagrant"
,
...
...
@@ -77,13 +74,13 @@
"curl -O 'http://{{.HTTPIP}}:{{.HTTPPort}}/install{,-common,-chroot}.sh'<enter><wait>"
,
"MIRROR='{{user `mirror`}}' bash install.sh < <(cat install-{chroot,common}.sh) && systemctl reboot<enter>"
]
},
{
},
{
"type"
:
"vmware-iso"
,
"boot_wait"
:
"{{user `boot_wait`}}"
,
"http_directory"
:
"http"
,
"disk_size"
:
"{{user `disk_size`}}"
,
"iso_checksum_url"
:
"{{user `iso_checksum_url`}}"
,
"iso_checksum_type"
:
"{{user `iso_checksum_type`}}"
,
"iso_checksum"
:
"file:{{user `iso_checksum_url`}}"
,
"iso_url"
:
"{{user `iso_url`}}"
,
"ssh_username"
:
"vagrant"
,
"ssh_password"
:
"vagrant"
,
...
...
@@ -99,7 +96,6 @@
"MIRROR='{{user `mirror`}}' bash install.sh < <(cat install-{chroot,common}.sh) && systemctl reboot<enter>"
]
}
],
"provisioners"
:
[
{
...
...
@@ -110,7 +106,9 @@
"provision/cleanup.sh"
],
"execute_command"
:
"echo 'vagrant'|sudo -S sh '{{.Path}}'"
,
"only"
:
[
"virtualbox-iso"
]
"only"
:
[
"virtualbox-iso"
]
},
{
"type"
:
"shell"
,
...
...
@@ -120,7 +118,9 @@
"provision/cleanup.sh"
],
"execute_command"
:
"echo 'vagrant'|sudo -S sh '{{.Path}}'"
,
"only"
:
[
"qemu"
]
"only"
:
[
"qemu"
]
},
{
"type"
:
"shell"
,
...
...
@@ -130,7 +130,9 @@
"provision/cleanup.sh"
],
"execute_command"
:
"echo 'vagrant'|sudo -S sh '{{.Path}}'"
,
"only"
:
[
"vmware-iso"
]
"only"
:
[
"vmware-iso"
]
},
{
"type"
:
"shell"
,
...
...
vagrant.json
View file @
0ab2c528
...
...
@@ -2,7 +2,6 @@
"variables"
:
{
"iso_url"
:
"file:///srv/ftp/iso/latest/archlinux-{{isotime
\"
2006.01
\"
}}.01-x86_64.iso"
,
"iso_checksum_url"
:
"file:///srv/ftp/iso/latest/sha1sums.txt"
,
"iso_checksum_type"
:
"sha1"
,
"disk_size"
:
"20480"
,
"memory"
:
"1024"
,
"cpus"
:
"2"
,
...
...
@@ -19,8 +18,7 @@
"http_directory"
:
"http"
,
"disk_size"
:
"{{user `disk_size`}}"
,
"guest_os_type"
:
"ArchLinux_64"
,
"iso_checksum_url"
:
"{{user `iso_checksum_url`}}"
,
"iso_checksum_type"
:
"{{user `iso_checksum_type`}}"
,
"iso_checksum"
:
"file:{{user `iso_checksum_url`}}"
,
"iso_url"
:
"{{user `iso_url`}}"
,
"ssh_username"
:
"vagrant"
,
"ssh_password"
:
"vagrant"
,
...
...
@@ -48,13 +46,13 @@
"curl -O 'http://{{.HTTPIP}}:{{.HTTPPort}}/install{,-common,-chroot}.sh'<enter><wait>"
,
"MIRROR='{{user `mirror`}}' bash install.sh < <(cat install-{chroot,common}.sh) && systemctl reboot<enter>"
]
},
{
},
{
"type"
:
"qemu"
,
"boot_wait"
:
"{{user `boot_wait`}}"
,
"http_directory"
:
"http"
,
"disk_size"
:
"{{user `disk_size`}}"
,
"iso_checksum_url"
:
"{{user `iso_checksum_url`}}"
,
"iso_checksum_type"
:
"{{user `iso_checksum_type`}}"
,
"iso_checksum"
:
"file:{{user `iso_checksum_url`}}"
,
"iso_url"
:
"{{user `iso_url`}}"
,
"ssh_username"
:
"vagrant"
,
"ssh_password"
:
"vagrant"
,
...
...
@@ -77,13 +75,13 @@
"curl -O 'http://{{.HTTPIP}}:{{.HTTPPort}}/install{,-common,-chroot}.sh'<enter><wait>"
,
"MIRROR='{{user `mirror`}}' bash install.sh < <(cat install-{chroot,common}.sh) && systemctl reboot<enter>"
]
},
{
},
{
"type"
:
"vmware-iso"
,
"boot_wait"
:
"{{user `boot_wait`}}"
,
"http_directory"
:
"http"
,
"disk_size"
:
"{{user `disk_size`}}"
,
"iso_checksum_url"
:
"{{user `iso_checksum_url`}}"
,
"iso_checksum_type"
:
"{{user `iso_checksum_type`}}"
,
"iso_checksum"
:
"file:{{user `iso_checksum_url`}}"
,
"iso_url"
:
"{{user `iso_url`}}"
,
"ssh_username"
:
"vagrant"
,
"ssh_password"
:
"vagrant"
,
...
...
@@ -99,7 +97,6 @@
"MIRROR='{{user `mirror`}}' bash install.sh < <(cat install-{chroot,common}.sh) && systemctl reboot<enter>"
]
}
],
"provisioners"
:
[
{
...
...
@@ -110,7 +107,9 @@
"provision/cleanup.sh"
],
"execute_command"
:
"echo 'vagrant'|sudo -S sh '{{.Path}}'"
,
"only"
:
[
"virtualbox-iso"
]
"only"
:
[
"virtualbox-iso"
]
},
{
"type"
:
"shell"
,
...
...
@@ -120,7 +119,9 @@
"provision/cleanup.sh"
],
"execute_command"
:
"echo 'vagrant'|sudo -S sh '{{.Path}}'"
,
"only"
:
[
"qemu"
]
"only"
:
[
"qemu"
]
},
{
"type"
:
"shell"
,
...
...
@@ -130,7 +131,9 @@
"provision/cleanup.sh"
],
"execute_command"
:
"echo 'vagrant'|sudo -S sh '{{.Path}}'"
,
"only"
:
[
"vmware-iso"
]
"only"
:
[
"vmware-iso"
]
},
{
"type"
:
"shell"
,
...
...
@@ -149,21 +152,27 @@
},
{
"type"
:
"vagrant-cloud"
,
"only"
:
[
"virtualbox-iso"
],
"only"
:
[
"virtualbox-iso"
],
"access_token"
:
"{{user `vagrant_cloud_token`}}"
,
"box_tag"
:
"archlinux/archlinux"
,
"version"
:
"{{isotime
\"
2006.01.02
\"
}}"
},
{
"type"
:
"vagrant-cloud"
,
"only"
:
[
"qemu"
],
"only"
:
[
"qemu"
],
"access_token"
:
"{{user `vagrant_cloud_token`}}"
,
"box_tag"
:
"archlinux/archlinux"
,
"version"
:
"{{isotime
\"
2006.01.02
\"
}}"
},
{
"type"
:
"vagrant-cloud"
,
"only"
:
[
"vmware-iso"
],
"only"
:
[
"vmware-iso"
],
"access_token"
:
"{{user `vagrant_cloud_token`}}"
,
"box_tag"
:
"archlinux/archlinux"
,
"version"
:
"{{isotime
\"
2006.01.02
\"
}}"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment