<commit_before>import {
  Registry,
  ExecutionDetailsTasks,
  IPipeline,
  IStage,
  IValidatorConfig,
  IStageOrTriggerTypeConfig,
  ICustomValidator,
} from '@spinnaker/core';

import { KubernetesV2RunJobStageConfig } from './KubernetesV2RunJobStageConfig';
import { RunJobExecutionDetails } from './RunJobExecutionDetails';

Registry.pipeline.registerStage({
  label: 'Run Job (Manifest)',
  description: 'Run a Kubernetes Job manifest yaml/json file.',
  key: 'runJobManifest',
  alias: 'runJob',
  addAliasToConfig: true,
  cloudProvider: 'kubernetes',
  component: KubernetesV2RunJobStageConfig,
  executionDetailsSections: [RunJobExecutionDetails, ExecutionDetailsTasks],
  supportsCustomTimeout: true,
  producesArtifacts: true,
  validators: [
    {
      type: 'custom',
      validate: (
        _pipeline: IPipeline,
        stage: IStage,
        _validator: IValidatorConfig,
        _config: IStageOrTriggerTypeConfig,
      ): string => {
        if (!stage.manifest || !stage.manifest.kind) {
          return '';
        }
        if (stage.manifest.kind !== 'Job') {
          return 'Run Job (Manifest) only accepts manifest of kind Job.';
        }
        return '';
      },
    } as ICustomValidator,
  ],
});
<commit_msg>feat(kubernetes): Add deployment status to Run Job stage UI (#8331)<commit_after>import {
  Registry,
  ExecutionDetailsTasks,
  IPipeline,
  IStage,
  IValidatorConfig,
  IStageOrTriggerTypeConfig,
  ICustomValidator,
} from '@spinnaker/core';

import { DeployStatus } from '../deployManifest/manifestStatus/DeployStatus';
import { KubernetesV2RunJobStageConfig } from './KubernetesV2RunJobStageConfig';
import { RunJobExecutionDetails } from './RunJobExecutionDetails';

Registry.pipeline.registerStage({
  label: 'Run Job (Manifest)',
  description: 'Run a Kubernetes Job manifest yaml/json file.',
  key: 'runJobManifest',
  alias: 'runJob',
  addAliasToConfig: true,
  cloudProvider: 'kubernetes',
  component: KubernetesV2RunJobStageConfig,
  executionDetailsSections: [RunJobExecutionDetails, DeployStatus, ExecutionDetailsTasks],
  supportsCustomTimeout: true,
  producesArtifacts: true,
  validators: [
    {
      type: 'custom',
      validate: (
        _pipeline: IPipeline,
        stage: IStage,
        _validator: IValidatorConfig,
        _config: IStageOrTriggerTypeConfig,
      ): string => {
        if (!stage.manifest || !stage.manifest.kind) {
          return '';
        }
        if (stage.manifest.kind !== 'Job') {
          return 'Run Job (Manifest) only accepts manifest of kind Job.';
        }
        return '';
      },
    } as ICustomValidator,
  ],
});

{'fraction_non_alphanumeric': 0.11022727272727273, 'fraction_numerical': 0.003787878787878788, 'mean_word_length': 3.476271186440678, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1220942', 'n_tokens_mistral': 773, 'n_tokens_neox': 762, 'n_words': 176}