[ Agent ] [ App ] - 完全全部的离线安装脚本

This commit is contained in:
zeaslity
2023-12-12 17:21:42 +08:00
parent 16bb653254
commit a56ed7e612
4 changed files with 348 additions and 25 deletions

View File

@@ -115,6 +115,36 @@ func BasicGrepItemInFile(item string, fileName string) bool {
return false
}
func BasicDockerImageExists(imageName, imageVersion string) bool {
if !BasicCommandExistByPath("docker") {
return false
}
ok, _ := PipelineCommandExecutor([][]string{
{
"docker",
"image",
"ls",
},
{
"grep",
imageName,
},
{
"grep",
"-q",
imageVersion,
},
})
if !ok {
return false
}
return true
}
func BasicInstallSoftwares(installPrefix []string, isStrict bool, softwares ...string) (bool, []string) {
var installLog []string