[ Agent ] [ App ] - 完全全部的离线安装脚本
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user