mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-06-26 14:49:26 +08:00
New traceability fields annotation changes - design changes (#89)
* New design changes
This commit is contained in:
@@ -293,8 +293,8 @@ test("deployment - deploy() - deploy force flag on", async () => {
|
||||
});
|
||||
|
||||
test("deployment - deploy() - Annotate & label resources", async () => {
|
||||
let filepathConfigs = { manifestsPaths :['manifests/deployment.yaml'], helmChartPaths : [], dockerfilePaths :{}} ;
|
||||
let annotationKeyValStr = getWorkflowAnnotationKeyLabel(process.env.GITHUB_WORKFLOW) + '=' + getWorkflowAnnotationsJson('currentCommit', '.github/workflows/workflow.yml', filepathConfigs);
|
||||
let deploymentConfig = { manifestFilePaths :['manifests/deployment.yaml'], helmChartFilePaths : [], dockerfilePaths :{}} ;
|
||||
let annotationKeyValStr = getWorkflowAnnotationKeyLabel(process.env.GITHUB_WORKFLOW) + '=' + getWorkflowAnnotationsJson('currentCommit', '.github/workflows/workflow.yml', deploymentConfig);
|
||||
const KubernetesManifestUtilityMock = mocked(KubernetesManifestUtility, true);
|
||||
KubernetesManifestUtilityMock.checkManifestStability = jest.fn().mockReturnValue("");
|
||||
const KubernetesObjectUtilityMock = mocked(KubernetesObjectUtility, true);
|
||||
@@ -302,7 +302,7 @@ test("deployment - deploy() - Annotate & label resources", async () => {
|
||||
const fileHelperMock = mocked(fileHelper, true);
|
||||
fileHelperMock.writeObjectsToFile = jest.fn().mockReturnValue(["~/Deployment_testapp_currentTimestamp"]);
|
||||
jest.spyOn(utility, 'getWorkflowFilePath').mockImplementation(() => Promise.resolve(process.env.GITHUB_WORKFLOW));
|
||||
jest.spyOn(utility, 'getFilePathsConfigs').mockImplementation(()=> Promise.resolve(filepathConfigs));
|
||||
jest.spyOn(utility, 'getDeploymentConfig').mockImplementation(()=> Promise.resolve(deploymentConfig));
|
||||
|
||||
const kubeCtl: jest.Mocked<Kubectl> = new Kubectl("") as any;
|
||||
kubeCtl.apply = jest.fn().mockReturnValue("");
|
||||
@@ -323,8 +323,8 @@ test("deployment - deploy() - Annotate & label resources", async () => {
|
||||
|
||||
test("deployment - deploy() - Annotate & label resources for a new workflow", async () => {
|
||||
process.env.GITHUB_WORKFLOW = '.github/workflows/NewWorkflow.yml';
|
||||
let filepathConfigs = { manifestsPaths :['manifests/deployment.yaml'], helmChartPaths : [], dockerfilePaths :{}} ;
|
||||
let annotationKeyValStr = getWorkflowAnnotationKeyLabel(process.env.GITHUB_WORKFLOW) + '=' + getWorkflowAnnotationsJson('NA', '.github/workflows/NewWorkflow.yml', filepathConfigs);
|
||||
let deploymentConfig = { manifestFilePaths :['manifests/deployment.yaml'], helmChartFilePaths : [], dockerfilePaths :{}} ;
|
||||
let annotationKeyValStr = getWorkflowAnnotationKeyLabel(process.env.GITHUB_WORKFLOW) + '=' + getWorkflowAnnotationsJson('NA', '.github/workflows/NewWorkflow.yml', deploymentConfig);
|
||||
const KubernetesManifestUtilityMock = mocked(KubernetesManifestUtility, true);
|
||||
KubernetesManifestUtilityMock.checkManifestStability = jest.fn().mockReturnValue("");
|
||||
const KubernetesObjectUtilityMock = mocked(KubernetesObjectUtility, true);
|
||||
|
||||
Reference in New Issue
Block a user