1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-12-06 08:16:19 +02:00

Enable pseudo tty setting

This commit is contained in:
Brad Rydzewski 2015-07-02 14:50:17 -07:00 committed by Dwayne Jones
parent e39b89957d
commit c13685c9a3

View File

@ -14,6 +14,9 @@ type Docker struct {
// Hostname (also known as `--hostname` option)
// Could be set only if Docker is running in privileged mode
Hostname *string `yaml:"hostname,omitempty"`
// Allocate a pseudo-TTY (also known as `--tty` option)
TTY bool `yaml:"tty,omitempty"`
}
// DockerNetworkMode returns DefaultNetworkMode
@ -37,3 +40,12 @@ func DockerHostname(d *Docker) string {
}
return *d.Hostname
}
// DockerTty returns true if the build
// should allocate a pseudo tty
func DockerTty(d *Docker) string {
if d == nil {
return false
}
return d.TTY
}