Skip to content

Commit

Permalink
Add support for Ubuntu 16.04 (#114)
Browse files Browse the repository at this point in the history
Signed-off-by: Lauri Nevala <[email protected]>
  • Loading branch information
nevalla authored Jun 2, 2020
1 parent 0a373d3 commit 4056b8e
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 1 deletion.
20 changes: 20 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ pipeline {
}
stage("Smoke test") {
parallel {
stage("Ubuntu 16.04: apply") {
agent {
node {
label 'amd64 && ubuntu-1804 && overlay2'
}
}
steps {
sh "make smoke-test LINUX_IMAGE=quay.io/footloose/ubuntu16.04"
}
}
stage("Ubuntu 18.04: apply") {
agent {
node {
Expand Down Expand Up @@ -65,6 +75,16 @@ pipeline {
sh "make smoke-reset-test LINUX_IMAGE=quay.io/footloose/ubuntu18.04"
}
}
stage("Ubuntu 16.04: reset") {
agent {
node {
label 'amd64 && ubuntu-1804 && overlay2'
}
}
steps {
sh "make smoke-reset-test LINUX_IMAGE=quay.io/footloose/ubuntu16.04"
}
}
stage("CentOS 8: reset") {
agent {
node {
Expand Down
7 changes: 6 additions & 1 deletion pkg/configurer/linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ func (c *LinuxConfigurer) InstallEngine(engineConfig *api.EngineConfig) error {
return err
}

err = c.Host.Exec("sudo systemctl enable --now docker")
err = c.Host.Exec("sudo systemctl enable docker")
if err != nil {
return err
}

err = c.Host.Exec("sudo systemctl start docker")
if err != nil {
return err
}
Expand Down
9 changes: 9 additions & 0 deletions pkg/configurer/ubuntu/ubuntu.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ func resolveUbuntuConfigurer(h *api.Host) api.HostConfigurer {
},
}
return configurer
case "16.04":
configurer := &XenialConfigurer{
Configurer: Configurer{
LinuxConfigurer: configurer.LinuxConfigurer{
Host: h,
},
},
}
return configurer
}

return nil
Expand Down
6 changes: 6 additions & 0 deletions pkg/configurer/ubuntu/xenial.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package ubuntu

// XenialConfigurer is the Ubuntu Xenial specific host configurer implementation
type XenialConfigurer struct {
Configurer
}

0 comments on commit 4056b8e

Please sign in to comment.