Docker Backend: fully support windows container (#4381)

This commit is contained in:
6543
2024-11-26 11:48:48 +01:00
committed by GitHub
parent 9fc8b40d77
commit f829c07f3a
5 changed files with 215 additions and 4 deletions

View File

@@ -18,9 +18,9 @@ import (
"encoding/base64"
)
func GenerateContainerConf(commands []string, goos, workDir string) (env map[string]string, entry []string) {
func GenerateContainerConf(commands []string, osType, workDir string) (env map[string]string, entry []string) {
env = make(map[string]string)
if goos == "windows" {
if osType == "windows" {
env["CI_SCRIPT"] = base64.StdEncoding.EncodeToString([]byte(generateScriptWindows(commands, workDir)))
env["SHELL"] = "powershell.exe"
// cspell:disable-next-line