mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-04-12 01:15:09 +08:00
Fixes for docker with no image
This commit is contained in:
parent
c97519147a
commit
e456a366fc
@ -8,6 +8,7 @@ export class DockerExec {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async pull(image: string, args: string[], silent?: boolean) {
|
public async pull(image: string, args: string[], silent?: boolean) {
|
||||||
|
image = image.trim()
|
||||||
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}`)
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import {DeploymentConfig} from '../types/deploymentConfig'
|
|||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import {DockerExec} from '../types/docker'
|
import {DockerExec} from '../types/docker'
|
||||||
import {getNormalizedPath} from './githubUtils'
|
import {getNormalizedPath} from './githubUtils'
|
||||||
|
import {parse} from 'path'
|
||||||
|
|
||||||
export async function getDeploymentConfig(): Promise<DeploymentConfig> {
|
export async function getDeploymentConfig(): Promise<DeploymentConfig> {
|
||||||
let helmChartPaths: string[] =
|
let helmChartPaths: string[] =
|
||||||
@ -24,6 +25,9 @@ export async function getDeploymentConfig(): Promise<DeploymentConfig> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const imageNames = core.getInput('images').split('\n') || []
|
const imageNames = core.getInput('images').split('\n') || []
|
||||||
|
if (imageNames.length == 1 && imageNames[0] == '') {
|
||||||
|
imageNames[0] = '[]'
|
||||||
|
}
|
||||||
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