mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-07-01 01:39:26 +08:00
added logging
This commit is contained in:
+11
-4
@@ -70,13 +70,20 @@ export class Kubectl {
|
|||||||
let newReplicaSet = ''
|
let newReplicaSet = ''
|
||||||
if (result?.stdout) {
|
if (result?.stdout) {
|
||||||
const stdout = result.stdout.split('\n')
|
const stdout = result.stdout.split('\n')
|
||||||
|
core.debug('stdout from getNewReplicaSet is ' + JSON.stringify(stdout))
|
||||||
stdout.forEach((line: string) => {
|
stdout.forEach((line: string) => {
|
||||||
const newreplicaset = 'newreplicaset'
|
const newreplicaset = 'newreplicaset'
|
||||||
if (line && line.toLowerCase().indexOf(newreplicaset) > -1)
|
if (line && line.toLowerCase().indexOf(newreplicaset) > -1)
|
||||||
newReplicaSet = line
|
core.debug(
|
||||||
.substring(newreplicaset.length)
|
`found string of interest for replicaset, line is ${line}`
|
||||||
.trim()
|
)
|
||||||
.split(' ')[0]
|
core.debug(
|
||||||
|
`substring is ${line.substring(newreplicaset.length).trim()}`
|
||||||
|
)
|
||||||
|
newReplicaSet = line
|
||||||
|
.substring(newreplicaset.length)
|
||||||
|
.trim()
|
||||||
|
.split(' ')[0]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user