mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-06-23 13:09:27 +08:00
switch none deployment strategy to basic (#204)
* switch none deployment strategy to basic * update readme * update deployment strategy fallthrough logic * comment fixed * add disclaimer for basic strategy only supporting deploy action
This commit is contained in:
@@ -70,10 +70,7 @@ export async function deployManifests(
|
||||
return newFilePaths
|
||||
}
|
||||
|
||||
case undefined: {
|
||||
core.warning('Deployment strategy is not recognized.')
|
||||
}
|
||||
default: {
|
||||
case DeploymentStrategy.BASIC: {
|
||||
const trafficSplitMethod = parseTrafficSplitMethod(
|
||||
core.getInput('traffic-split-method', {required: true})
|
||||
)
|
||||
@@ -94,6 +91,10 @@ export async function deployManifests(
|
||||
|
||||
return files
|
||||
}
|
||||
|
||||
default: {
|
||||
throw new Error('Deployment strategy is not recognized.')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ describe('Deployment strategy type', () => {
|
||||
const vals = <any>Object.values(DeploymentStrategy)
|
||||
expect(vals.includes('canary')).toBe(true)
|
||||
expect(vals.includes('blue-green')).toBe(true)
|
||||
expect(vals.includes('basic')).toBe(true)
|
||||
})
|
||||
|
||||
test('it can parse valid values from a string', () => {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
export enum DeploymentStrategy {
|
||||
BASIC = 'basic',
|
||||
CANARY = 'canary',
|
||||
BLUE_GREEN = 'blue-green'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user