mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-03-12 14:22:16 +08:00
Hari/beautify logs (#206)
* Logging changes for deploy * Logging Changes with group * format check changes
This commit is contained in:
parent
ecec5912ba
commit
7b11ddb1d5
@ -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()
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user