mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-04-19 13:43:23 +08:00
updated the annotation key label
This commit is contained in:
parent
0a3b59b275
commit
1516e1430d
@ -143,7 +143,7 @@ export async function annotateAndLabelResources(
|
|||||||
const workflowFilePath = await getWorkflowFilePath(githubToken)
|
const workflowFilePath = await getWorkflowFilePath(githubToken)
|
||||||
|
|
||||||
const deploymentConfig = await getDeploymentConfig()
|
const deploymentConfig = await getDeploymentConfig()
|
||||||
const annotationKeyLabel = getWorkflowAnnotationKeyLabel(workflowFilePath)
|
const annotationKeyLabel = getWorkflowAnnotationKeyLabel()
|
||||||
|
|
||||||
await annotateResources(
|
await annotateResources(
|
||||||
files,
|
files,
|
||||||
|
|||||||
@ -27,14 +27,8 @@ export function getWorkflowAnnotations(
|
|||||||
return JSON.stringify(annotationObject)
|
return JSON.stringify(annotationObject)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getWorkflowAnnotationKeyLabel(
|
export function getWorkflowAnnotationKeyLabel(): string {
|
||||||
workflowFilePath: string
|
return `${ANNOTATION_PREFIX}/k8s-deploy`
|
||||||
): string {
|
|
||||||
const hashKey = require('crypto')
|
|
||||||
.createHash('MD5')
|
|
||||||
.update(`${ANNOTATION_PREFIX}/${workflowFilePath}`)
|
|
||||||
.digest('hex')
|
|
||||||
return `githubWorkflow_${hashKey}`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user