Add Ubuntu 22.04 image
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
Tyler 2023-06-03 22:35:11 -04:00
parent 848b8f2fb8
commit 8b43210a26
2 changed files with 119 additions and 1 deletions

View File

@ -1,6 +1,6 @@
kind: pipeline
type: exec
name: packer-ubuntu
name: packer-ubuntu20.04
platform:
os: linux
@ -21,6 +21,27 @@ steps:
---
kind: pipeline
type: exec
name: packer-ubuntu22.04
platform:
os: linux
arch: amd64
steps:
- name: ubuntu
commands:
- packer build ubuntu/ubuntu-22.04-amd64.json
- wget -O mc https://dl.min.io/client/mc/release/linux-amd64/mc && chmod +x mc
- ./mc mirror --overwrite builds/ STORAGE/$MC_BUCKET/ubuntu
- rm -f mc
environment:
MC_HOST_STORAGE:
from_secret: s3_url
MC_BUCKET:
from_secret: s3_bucket
---
kind: pipeline
type: exec
name: packer-debian
platform:

View File

@ -0,0 +1,97 @@
{
"builders": [
{
"boot_command": [
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"<tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><wait>",
"c<wait5>",
"set gfxpayload=keep<enter><wait5>",
"linux /casper/vmlinuz <wait5>",
"autoinstall quiet fsck.mode=skip <wait5>",
"net.ifnames=0 biosdevname=0 systemd.unified_cgroup_hierarchy=0 <wait5>",
"ds=\"nocloud-net;s=http://{{.HTTPIP}}:{{.HTTPPort}}/\" <wait5>",
"---<enter><wait5>",
"initrd /casper/initrd<enter><wait5>",
"boot<enter>"
],
"boot_wait": "1s",
"cpus": "{{ user `cpus` }}",
"disk_size": "{{user `disk_size`}}",
"headless": "{{ user `headless` }}",
"http_directory": "{{user `http_directory`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
"memory": "{{ user `memory` }}",
"output_directory": "{{ user `build_directory` }}/packer-{{user `template`}}-qemu",
"shutdown_command": "echo 'ubuntu' | sudo -S shutdown -P now",
"ssh_password": "ubuntu",
"ssh_port": 22,
"ssh_timeout": "10000s",
"ssh_username": "ubuntu",
"type": "qemu",
"vm_name": "{{ user `template` }}",
"vnc_bind_address": "{{ user `vnc_bind_address` }}",
"qemuargs": [
[ "-m", "{{ user `memory` }}" ],
[ "-display", "{{ user `qemu_display` }}" ]
]
}
],
"post-processors": [
{
"type": "compress",
"output": "{{ user `build_directory` }}/{{user `box_basename`}}.img.gz"
}
],
"provisioners": [
{
"environment_vars": [
"HOME_DIR=/home/ubuntu",
"http_proxy={{user `http_proxy`}}",
"https_proxy={{user `https_proxy`}}",
"no_proxy={{user `no_proxy`}}"
],
"execute_command": "echo 'ubuntu' | {{.Vars}} sudo -S -E sh -eux '{{.Path}}'",
"expect_disconnect": true,
"scripts": [
"{{template_dir}}/scripts/update.sh",
"{{template_dir}}/scripts/networking.sh",
"{{template_dir}}/scripts/cleanup.sh",
"{{template_dir}}/../common/minimize.sh"
],
"type": "shell"
}
],
"variables": {
"box_basename": "ubuntu-22.04",
"build_directory": "builds",
"build_timestamp": "{{isotime \"20060102150405\"}}",
"cpus": "2",
"disk_size": "65536",
"guest_additions_url": "",
"headless": "",
"http_directory": "{{template_dir}}/http",
"http_proxy": "{{env `http_proxy`}}",
"https_proxy": "{{env `https_proxy`}}",
"iso_checksum": "5e38b55d57d94ff029719342357325ed3bda38fa80054f9330dc789cd2d43931",
"iso_name": "ubuntu-22.04.2-live-server-amd64.iso",
"memory": "2048",
"mirror": "http://releases.ubuntu.com",
"mirror_directory": "22.04.2",
"name": "ubuntu-22.04-amd64",
"no_proxy": "{{env `no_proxy`}}",
"preseed_path": "preseed.cfg",
"qemu_display": "none",
"template": "ubuntu-22.04-amd64.img",
"version": "TIMESTAMP",
"vnc_bind_address": "127.0.0.1"
}
}