当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript Registry.pipeline.registerStage方法代码示例

本文整理汇总了TypeScript中core/registry.Registry.pipeline.registerStage方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Registry.pipeline.registerStage方法的具体用法?TypeScript Registry.pipeline.registerStage怎么用?TypeScript Registry.pipeline.registerStage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在core/registry.Registry.pipeline的用法示例。


在下文中一共展示了Registry.pipeline.registerStage方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: expect

 mock.inject(function() {
   Registry.pipeline.registerStage({ key: 'a', useBaseProvider: true } as IStageTypeConfig);
   Registry.pipeline.registerStage({ key: 'b', provides: 'a', cloudProvider: 'aws' } as IStageTypeConfig);
   expect(Registry.pipeline.getConfigurableStageTypes([awsProviderAccount]) as any[]).toEqual([
     { key: 'a', useBaseProvider: true, cloudProviders: ['aws'] },
   ]);
 }),
开发者ID:emjburns,项目名称:deck,代码行数:7,代码来源:PipelineRegistry.spec.ts

示例2:

 preconfiguredJobs.forEach(preconfiguredJob => {
   const { label, description, type, waitForCompletion, parameters } = preconfiguredJob;
   const defaults = {
     parameters: parameters.reduce(
       (acc, parameter) => {
         if (parameter.defaultValue) {
           acc[parameter.name] = parameter.defaultValue;
         }
         return acc;
       },
       {} as any,
     ),
   };
   Registry.pipeline.registerStage({
     label,
     description,
     key: type,
     alias: 'preconfiguredJob',
     addAliasToConfig: true,
     restartable: true,
     defaults,
     component: PreconfiguredJobStageConfig,
     executionDetailsSections: [PreconfiguredJobExecutionDetails, ExecutionDetailsTasks],
     configuration: {
       waitForCompletion,
       parameters,
     },
   });
 });
开发者ID:emjburns,项目名称:deck,代码行数:29,代码来源:preconfiguredJobStage.ts

示例3: manifest

  .config(() => {
    if (SETTINGS.feature.versionedProviders) {
      Registry.pipeline.registerStage({
        label: 'Bake (Manifest)',
        description: 'Bake a manifest (or multi-doc manifest set) using a template renderer such as Helm.',
        key: 'bakeManifest',
        templateUrl: require('./bakeManifestConfig.html'),
        controller: 'BakeManifestConfigCtrl',
        producesArtifacts: true,
        cloudProvider: 'kubernetes',
        controllerAs: 'ctrl',
        executionDetailsSections: [BakeManifestDetailsTab, ExecutionDetailsTasks, ExecutionArtifactTab],
        artifactExtractor: (fields: string[]) =>
          ExpectedArtifactService.accumulateArtifacts<IArtifact>(['inputArtifacts'])(fields).map(
            (a: IArtifact) => a.id,
          ),
        artifactRemover: (stage: IStage, artifactId: string) => {
          ArtifactReferenceService.removeArtifactFromFields(['expectedArtifactId'])(stage, artifactId);

          const artifactMatches = (artifact: IArtifact) => artifact.id === artifactId;
          stage.expectedArtifacts = get(stage, 'expectedArtifacts', []).filter(a => !artifactMatches(a));
          stage.inputArtifacts = get(stage, 'inputArtifacts', []).filter(a => !artifactMatches(a));
        },
        validators: [{ type: 'requiredField', fieldName: 'outputName', fieldLabel: 'Name' }],
      });
    }
  })
开发者ID:spinnaker,项目名称:deck,代码行数:27,代码来源:bakeManifestStage.ts

示例4: module

module(APPLY_SOURCE_SERVER_GROUP_CAPACITY_STAGE, []).config(() => {
  Registry.pipeline.registerStage({
    synthetic: true,
    key: 'applySourceServerGroupCapacity',
    executionDetailsSections: [ApplySourceServerGroupCapacityDetails, ExecutionDetailsTasks],
  });
});
开发者ID:mizzy,项目名称:deck,代码行数:7,代码来源:applySourceServerGroupCapacityStage.module.ts

示例5: module

module(UNMATCHED_STAGE_TYPE_STAGE, [UNMATCHED_STAGE_TYPE_STAGE_CTRL]).config(() => {
  Registry.pipeline.registerStage({
    key: 'unmatched',
    synthetic: true,
    templateUrl: require('./unmatchedStageTypeStage.html'),
  });
});
开发者ID:emjburns,项目名称:deck,代码行数:7,代码来源:unmatchedStageTypeStage.ts


注:本文中的core/registry.Registry.pipeline.registerStage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。