Skip to content

Commit 07e51b4

Browse files
retlehsclaude
andauthored
Remove Ubuntu 18.04 and 20.04 support (#664)
Both versions are end-of-life. Only 22.04 and 24.04 are supported. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1457c90 commit 07e51b4

4 files changed

Lines changed: 6 additions & 30 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ Current supported settings:
228228
| Setting | Description | Type | Default |
229229
| --- | --- | -- | -- |
230230
| `manager` | VM manager (Options: `auto` (depends on OS), `lima`)| string | "auto" |
231-
| `ubuntu` | Ubuntu OS version (Options: `18.04`, `20.04`, `22.04`, `24.04`)| string |
231+
| `ubuntu` | Ubuntu OS version (Options: `22.04`, `24.04`)| string |
232232
| `hosts_resolver` | VM hosts resolver (Options: `hosts_file`)| string |
233233
| `instance_name` | Custom name for the VM instance | string | First site name alphabetically |
234234
| `images` | Custom OS image | object | Set based on `ubuntu` version |

cli_config/cli_config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ func (c *Config) LoadFile(path string) error {
6666
return fmt.Errorf("%w: unsupported value for `vm.manager`. Must be one of: auto, lima", InvalidConfigErr)
6767
}
6868

69-
if c.Vm.Ubuntu != "" && c.Vm.Ubuntu != "18.04" && c.Vm.Ubuntu != "20.04" && c.Vm.Ubuntu != "22.04" && c.Vm.Ubuntu != "24.04" {
70-
return fmt.Errorf("%w: unsupported value for `vm.ubuntu`. Must be one of: 18.04, 20.04, 22.04, 24.04", InvalidConfigErr)
69+
if c.Vm.Ubuntu != "" && c.Vm.Ubuntu != "22.04" && c.Vm.Ubuntu != "24.04" {
70+
return fmt.Errorf("%w: unsupported value for `vm.ubuntu`. Must be one of: 22.04, 24.04", InvalidConfigErr)
7171
}
7272

7373
if c.Vm.HostsResolver != "" && c.Vm.HostsResolver != "hosts_file" {

pkg/lima/manager_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func TestNewInstanceUbuntuVersion(t *testing.T) {
127127
t.Fatal(err)
128128
}
129129

130-
trellis.CliConfig.Vm.Ubuntu = "20.04"
130+
trellis.CliConfig.Vm.Ubuntu = "22.04"
131131

132132
t.Setenv("TRELLIS_BYPASS_LIMA_REQUIREMENTS", "1")
133133

@@ -152,8 +152,8 @@ func TestNewInstanceUbuntuVersion(t *testing.T) {
152152
t.Errorf("expected instance config to have 2 images, got %d", len(instance.Config.Images))
153153
}
154154

155-
if instance.Config.Images[0].Alias != "focal" {
156-
t.Errorf("expected instance config to have focal image, got %q", instance.Config.Images[0].Alias)
155+
if instance.Config.Images[0].Alias != "jammy" {
156+
t.Errorf("expected instance config to have jammy image, got %q", instance.Config.Images[0].Alias)
157157
}
158158

159159
if len(instance.Config.PortForwards) != 1 {

pkg/lima/ubuntu.go

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,6 @@
11
package lima
22

33
var UbuntuImages = map[string][]Image{
4-
"18.04": {
5-
{
6-
Alias: "bionic",
7-
Location: "https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img",
8-
Arch: "x86_64",
9-
},
10-
{
11-
Alias: "bionic",
12-
Location: "https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-arm64.img",
13-
Arch: "aarch64",
14-
},
15-
},
16-
"20.04": {
17-
{
18-
Alias: "focal",
19-
Location: "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img",
20-
Arch: "x86_64",
21-
},
22-
{
23-
Alias: "focal",
24-
Location: "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-arm64.img",
25-
Arch: "aarch64",
26-
},
27-
},
284
"22.04": {
295
{
306
Alias: "jammy",

0 commit comments

Comments
 (0)