mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-04-14 18:42:20 +08:00
fixes
This commit is contained in:
parent
36b55e389b
commit
36041268eb
@ -8,7 +8,8 @@ export class DockerExec {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async pull(image: string, args: string[], silent?: boolean) {
|
public async pull(image: string, args: string[], silent?: boolean) {
|
||||||
image = image.trim()
|
image = image.replace(/^[ ]+/g, '') //Remove whitespace at beginning of the string
|
||||||
|
image = image.replace(/[ ]+$/g, '') //Remove whitespace at end of the string
|
||||||
const result = await this.execute(['pull', image, ...args], silent)
|
const result = await this.execute(['pull', image, ...args], silent)
|
||||||
if (result.stderr != '' || result.exitCode != 0) {
|
if (result.stderr != '' || result.exitCode != 0) {
|
||||||
throw new Error(`docker images pull failed: ${result.stderr}`)
|
throw new Error(`docker images pull failed: ${result.stderr}`)
|
||||||
|
|||||||
@ -24,11 +24,11 @@ export async function getDeploymentConfig(): Promise<DeploymentConfig> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let imageNames = core.getInput('images').split('\n') || []
|
let imageNames = core.getInput('images').split('\n') || []
|
||||||
const imageStr = imageNames.toString()
|
imageNames.forEach((element) => {
|
||||||
if (imageStr == ' ') {
|
if (element == ' ' || '') {
|
||||||
const arr: string[] = []
|
imageNames.pop()
|
||||||
imageNames = arr
|
}
|
||||||
}
|
})
|
||||||
const imageDockerfilePathMap: {[id: string]: string} = {}
|
const imageDockerfilePathMap: {[id: string]: string} = {}
|
||||||
|
|
||||||
const pullImages = !(core.getInput('pull-images').toLowerCase() === 'false')
|
const pullImages = !(core.getInput('pull-images').toLowerCase() === 'false')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user