Skip to content

Commit

Permalink
fix(stages): accountExtractor in k8s stages should extract data from …
Browse files Browse the repository at this point in the history
  • Loading branch information
kbatalin authored Dec 20, 2024
1 parent 4040461 commit 7486d2e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Registry.pipeline.registerStage({
cloudProvider: 'kubernetes',
component: DeleteManifestStageConfig,
executionDetailsSections: [manifestExecutionDetails(STAGE_KEY), ExecutionDetailsTasks],
accountExtractor: (stage: IStage): string[] => (stage.account ? [stage.account] : []),
accountExtractor: (stage: IStage): string[] => (stage.context.account ? [stage.context.account] : []),
configAccountExtractor: (stage: any): string[] => (stage.account ? [stage.account] : []),
validators: manifestSelectorValidators(STAGE_NAME),
});
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Registry.pipeline.registerStage({
producesArtifacts: true,
supportsCustomTimeout: true,
validators: deployManifestValidators(),
accountExtractor: (stage: IStage): string[] => (stage.account ? [stage.account] : []),
accountExtractor: (stage: IStage): string[] => (stage.context.account ? [stage.context.account] : []),
configAccountExtractor: (stage: any): string[] => (stage.account ? [stage.account] : []),
artifactExtractor: ExpectedArtifactService.accumulateArtifacts(['manifestArtifactId', 'requiredArtifactIds']),
artifactRemover: ArtifactReferenceService.removeArtifactFromFields(['manifestArtifactId', 'requiredArtifactIds']),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { IStage } from '@spinnaker/core';
import { ExecutionArtifactTab, ExecutionDetailsTasks, Registry } from '@spinnaker/core';

import { FindArtifactsFromResourceConfig } from './FindArtifactsFromResourceConfig';
Expand All @@ -15,4 +16,6 @@ Registry.pipeline.registerStage({
executionDetailsSections: [ExecutionDetailsTasks, ExecutionArtifactTab],
producesArtifacts: true,
validators: manifestSelectorValidators(STAGE_NAME),
accountExtractor: (stage: IStage): string[] => (stage.context.account ? [stage.context.account] : []),
configAccountExtractor: (stage: any): string[] => (stage.account ? [stage.account] : []),
});
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { IStage } from '@spinnaker/core';
import { ExecutionDetailsTasks, Registry } from '@spinnaker/core';

import { manifestExecutionDetails } from '../ManifestExecutionDetails';
Expand All @@ -14,6 +15,8 @@ Registry.pipeline.registerStage({
cloudProvider: 'kubernetes',
component: ScaleManifestStageConfig,
executionDetailsSections: [manifestExecutionDetails(STAGE_KEY), ExecutionDetailsTasks],
accountExtractor: (stage: IStage): string[] => (stage.context.account ? [stage.context.account] : []),
configAccountExtractor: (stage: any): string[] => (stage.account ? [stage.account] : []),
validators: [
...manifestSelectorValidators(STAGE_NAME),
{ type: 'requiredField', fieldName: 'replicas', fieldLabel: 'Replicas' },
Expand Down

0 comments on commit 7486d2e

Please sign in to comment.