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:
parent
e39b89957d
commit
c13685c9a3
@ -14,6 +14,9 @@ type Docker struct {
|
|||||||
// Hostname (also known as `--hostname` option)
|
// Hostname (also known as `--hostname` option)
|
||||||
// Could be set only if Docker is running in privileged mode
|
// Could be set only if Docker is running in privileged mode
|
||||||
Hostname *string `yaml:"hostname,omitempty"`
|
Hostname *string `yaml:"hostname,omitempty"`
|
||||||
|
|
||||||
|
// Allocate a pseudo-TTY (also known as `--tty` option)
|
||||||
|
TTY bool `yaml:"tty,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// DockerNetworkMode returns DefaultNetworkMode
|
// DockerNetworkMode returns DefaultNetworkMode
|
||||||
@ -37,3 +40,12 @@ func DockerHostname(d *Docker) string {
|
|||||||
}
|
}
|
||||||
return *d.Hostname
|
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
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user