mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-04-12 09:22:19 +08:00
Fixing annotations
This commit is contained in:
parent
764402d855
commit
d8b8394d0c
@ -26,7 +26,7 @@ exports.deploymentTypes = ['deployment', 'replicaset', 'daemonset', 'pod', 'stat
|
|||||||
exports.workloadTypes = ['deployment', 'replicaset', 'daemonset', 'pod', 'statefulset', 'job', 'cronjob'];
|
exports.workloadTypes = ['deployment', 'replicaset', 'daemonset', 'pod', 'statefulset', 'job', 'cronjob'];
|
||||||
exports.workloadTypesWithRolloutStatus = ['deployment', 'daemonset', 'statefulset'];
|
exports.workloadTypesWithRolloutStatus = ['deployment', 'daemonset', 'statefulset'];
|
||||||
function getWorkflowAnnotationsJson(lastSuccessRunSha, workflowFilePath, filePathConfigs) {
|
function getWorkflowAnnotationsJson(lastSuccessRunSha, workflowFilePath, filePathConfigs) {
|
||||||
return `{`
|
return JSON.stringify(`{`
|
||||||
+ `'run': '${process.env.GITHUB_RUN_ID}',`
|
+ `'run': '${process.env.GITHUB_RUN_ID}',`
|
||||||
+ `'repository': '${process.env.GITHUB_REPOSITORY}',`
|
+ `'repository': '${process.env.GITHUB_REPOSITORY}',`
|
||||||
+ `'workflow': '${process.env.GITHUB_WORKFLOW}',`
|
+ `'workflow': '${process.env.GITHUB_WORKFLOW}',`
|
||||||
@ -41,7 +41,7 @@ function getWorkflowAnnotationsJson(lastSuccessRunSha, workflowFilePath, filePat
|
|||||||
+ `'manifestsPaths': '${filePathConfigs.manifestFilePaths}',`
|
+ `'manifestsPaths': '${filePathConfigs.manifestFilePaths}',`
|
||||||
+ `'dockerfilePaths': '${filePathConfigs.buildConfigs}',`
|
+ `'dockerfilePaths': '${filePathConfigs.buildConfigs}',`
|
||||||
+ `'provider': 'GitHub'`
|
+ `'provider': 'GitHub'`
|
||||||
+ `}`;
|
+ `}`);
|
||||||
}
|
}
|
||||||
exports.getWorkflowAnnotationsJson = getWorkflowAnnotationsJson;
|
exports.getWorkflowAnnotationsJson = getWorkflowAnnotationsJson;
|
||||||
function getWorkflowAnnotationKeyLabel(workflowFilePath) {
|
function getWorkflowAnnotationKeyLabel(workflowFilePath) {
|
||||||
|
|||||||
@ -26,7 +26,7 @@ export const workloadTypes: string[] = ['deployment', 'replicaset', 'daemonset',
|
|||||||
export const workloadTypesWithRolloutStatus: string[] = ['deployment', 'daemonset', 'statefulset'];
|
export const workloadTypesWithRolloutStatus: string[] = ['deployment', 'daemonset', 'statefulset'];
|
||||||
|
|
||||||
export function getWorkflowAnnotationsJson(lastSuccessRunSha: string, workflowFilePath: string, filePathConfigs: any): string {
|
export function getWorkflowAnnotationsJson(lastSuccessRunSha: string, workflowFilePath: string, filePathConfigs: any): string {
|
||||||
return `{`
|
return JSON.stringify(`{`
|
||||||
+ `'run': '${process.env.GITHUB_RUN_ID}',`
|
+ `'run': '${process.env.GITHUB_RUN_ID}',`
|
||||||
+ `'repository': '${process.env.GITHUB_REPOSITORY}',`
|
+ `'repository': '${process.env.GITHUB_REPOSITORY}',`
|
||||||
+ `'workflow': '${process.env.GITHUB_WORKFLOW}',`
|
+ `'workflow': '${process.env.GITHUB_WORKFLOW}',`
|
||||||
@ -41,7 +41,7 @@ export function getWorkflowAnnotationsJson(lastSuccessRunSha: string, workflowFi
|
|||||||
+ `'manifestsPaths': '${filePathConfigs.manifestFilePaths}',`
|
+ `'manifestsPaths': '${filePathConfigs.manifestFilePaths}',`
|
||||||
+ `'dockerfilePaths': '${filePathConfigs.buildConfigs}',`
|
+ `'dockerfilePaths': '${filePathConfigs.buildConfigs}',`
|
||||||
+ `'provider': 'GitHub'`
|
+ `'provider': 'GitHub'`
|
||||||
+ `}`;
|
+ `}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getWorkflowAnnotationKeyLabel(workflowFilePath: string): string {
|
export function getWorkflowAnnotationKeyLabel(workflowFilePath: string): string {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user