mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-06-21 10:39:26 +08:00
Compare commits
3 Commits
v6
...
hari/beautify-logs
| Author | SHA1 | Date | |
|---|---|---|---|
| 6627812069 | |||
| 9390dc6380 | |||
| 8da762e272 |
+10
-5
@@ -26,7 +26,7 @@ export async function deploy(
|
||||
core.debug('Input manifest files: ' + inputManifestFiles)
|
||||
|
||||
// deploy manifests
|
||||
core.info('Deploying manifests')
|
||||
core.startGroup('Deploying manifests')
|
||||
const trafficSplitMethod = parseTrafficSplitMethod(
|
||||
core.getInput('traffic-split-method', {required: true})
|
||||
)
|
||||
@@ -36,10 +36,11 @@ export async function deploy(
|
||||
kubectl,
|
||||
trafficSplitMethod
|
||||
)
|
||||
core.endGroup()
|
||||
core.debug('Deployed manifest files: ' + deployedManifestFiles)
|
||||
|
||||
// check manifest stability
|
||||
core.info('Checking manifest stability')
|
||||
core.startGroup('Checking manifest stability')
|
||||
const resourceTypes: Resource[] = getResources(
|
||||
deployedManifestFiles,
|
||||
models.DEPLOYMENT_TYPES.concat([
|
||||
@@ -47,17 +48,19 @@ export async function deploy(
|
||||
])
|
||||
)
|
||||
await checkManifestStability(kubectl, resourceTypes)
|
||||
core.endGroup()
|
||||
|
||||
if (deploymentStrategy == DeploymentStrategy.BLUE_GREEN) {
|
||||
core.info('Routing blue green')
|
||||
core.startGroup('Routing blue green')
|
||||
const routeStrategy = parseRouteStrategy(
|
||||
core.getInput('route-method', {required: true})
|
||||
)
|
||||
await routeBlueGreen(kubectl, inputManifestFiles, routeStrategy)
|
||||
core.endGroup()
|
||||
}
|
||||
|
||||
// print ingresses
|
||||
core.info('Printing ingresses')
|
||||
core.startGroup('Printing ingresses')
|
||||
const ingressResources: Resource[] = getResources(deployedManifestFiles, [
|
||||
KubernetesConstants.DiscoveryAndLoadBalancerResource.INGRESS
|
||||
])
|
||||
@@ -67,9 +70,10 @@ export async function deploy(
|
||||
ingressResource.name
|
||||
)
|
||||
}
|
||||
core.endGroup()
|
||||
|
||||
// annotate resources
|
||||
core.info('Annotating resources')
|
||||
core.startGroup('Annotating resources')
|
||||
let allPods
|
||||
try {
|
||||
allPods = JSON.parse((await kubectl.getAllPods()).stdout)
|
||||
@@ -82,4 +86,5 @@ export async function deploy(
|
||||
resourceTypes,
|
||||
allPods
|
||||
)
|
||||
core.endGroup()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user