mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-05 12:58:45 +00:00
Let the backend engine report the current platform (#2688)
if you run woodpecker-agent on windows and connect it to an docker daemon, there could be two different platforms possible, as you can switch from linux to windows mode and visa versa --- *Sponsored by Kithara Software GmbH*
This commit is contained in:
@@ -28,7 +28,7 @@ import (
|
||||
"github.com/woodpecker-ci/woodpecker/pipeline/backend/types"
|
||||
)
|
||||
|
||||
func Pod(namespace string, step *types.Step, labels, annotations map[string]string) (*v1.Pod, error) {
|
||||
func Pod(namespace string, step *types.Step, labels, annotations map[string]string, goos string) (*v1.Pod, error) {
|
||||
var (
|
||||
vols []v1.Volume
|
||||
volMounts []v1.VolumeMount
|
||||
@@ -66,7 +66,7 @@ func Pod(namespace string, step *types.Step, labels, annotations map[string]stri
|
||||
}
|
||||
|
||||
if len(step.Commands) != 0 {
|
||||
scriptEnv, entry, cmds := common.GenerateContainerConf(step.Commands)
|
||||
scriptEnv, entry, cmds := common.GenerateContainerConf(step.Commands, goos)
|
||||
for k, v := range scriptEnv {
|
||||
step.Environment[k] = v
|
||||
}
|
||||
|
Reference in New Issue
Block a user