當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript pipeline.PipelineConfigProvider類代碼示例

本文整理匯總了TypeScript中core/pipeline.PipelineConfigProvider的典型用法代碼示例。如果您正苦於以下問題:TypeScript PipelineConfigProvider類的具體用法?TypeScript PipelineConfigProvider怎麽用?TypeScript PipelineConfigProvider使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了PipelineConfigProvider類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: controller

]).config((pipelineConfigProvider: PipelineConfigProvider) => {
  pipelineConfigProvider.registerArtifactKind({
    label: 'GCS',
    description: 'A GCS object.',
    key: 'gcs',
    isDefault: false,
    isMatch: true,
    controller(artifact: IArtifact) {
      'ngInject';
      this.artifact = artifact;
      this.artifact.type = 'gcs/object';
    },
    controllerAs: 'ctrl',
    template: `
<div class="col-md-12">
  <div class="form-group row">
    <label class="col-md-2 sm-label-right">
      Object path
      <help-field key="pipeline.config.expectedArtifact.gcs.name"></help-field>
    </label>
    <div class="col-md-8">
      <input type="text"
             placeholder="gs://bucket/path/to/file"
             class="form-control input-sm"
             ng-model="ctrl.artifact.name"/>
    </div>
  </div>
</div>
`,
  });
});
開發者ID:robfletcher,項目名稱:deck,代碼行數:31,代碼來源:gcs.artifact.ts

示例2:

 .config((pipelineConfigProvider: PipelineConfigProvider) => {
   pipelineConfigProvider.registerStage({
     synthetic: true,
     key: 'applySourceServerGroupCapacity',
     executionDetailsSections: [ ApplySourceServerGroupCapacityDetails, ExecutionDetailsTasks ],
   });
 });
開發者ID:robfletcher,項目名稱:deck,代碼行數:7,代碼來源:applySourceServerGroupCapacityStage.module.ts

示例3: controller

]).config((pipelineConfigProvider: PipelineConfigProvider) => {
  pipelineConfigProvider.registerArtifactKind({
    label: 'Docker',
    isDefault: false,
    isMatch: true,
    description: 'A Docker image to be deployed.',
    key: 'docker',
    controller(artifact: IArtifact) {
      'ngInject';
      this.artifact = artifact;
      this.artifact.type = 'docker/image';
    },
    controllerAs: 'ctrl',
    template: `
<div class="col-md-12">
  <div class="form-group row">
    <label class="col-md-2 sm-label-right">
      Docker image
      <help-field key="pipeline.config.expectedArtifact.docker.name"></help-field>
    </label>
    <div class="col-md-8">
      <input type="text"
             placeholder="gcr.io/project/image"
             class="form-control input-sm"
             ng-model="ctrl.artifact.name"/>
    </div>
  </div>
</div>
`,
  });
});
開發者ID:robfletcher,項目名稱:deck,代碼行數:31,代碼來源:docker.artifact.ts

示例4: controller

]).config((pipelineConfigProvider: PipelineConfigProvider) => {
  pipelineConfigProvider.registerArtifactKind({
    label: 'GitHub',
    description: 'A file stored in git, hosted by GitHub.',
    key: 'github',
    isDefault: false,
    isMatch: true,
    controller(artifact: IArtifact) {
      'ngInject';
      this.artifact = artifact;
      this.artifact.type = 'github/file';
    },
    controllerAs: 'ctrl',
    template: `
<div class="col-md-12">
  <div class="form-group row">
    <label class="col-md-2 sm-label-right">
      File path
      <help-field key="pipeline.config.expectedArtifact.git.name"></help-field>
    </label>
    <div class="col-md-8">
      <input type="text"
             placeholder="manifests/frontend.yaml"
             class="form-control input-sm"
             ng-model="ctrl.artifact.name"/>
    </div>
  </div>
</div>
`,
  });
});
開發者ID:robfletcher,項目名稱:deck,代碼行數:31,代碼來源:github.artifact.ts

示例5:

 .config(function(pipelineConfigProvider: PipelineConfigProvider) {
   pipelineConfigProvider.registerStage({
     label: 'Restrict Execution During',
     synthetic: true,
     description: 'Restricts execution of stage during specified period of time',
     key: 'restrictExecutionDuringTimeWindow',
     executionDetailsSections: [ExecutionWindowExecutionDetails, ExecutionDetailsTasks],
   });
 })
開發者ID:robfletcher,項目名稱:deck,代碼行數:9,代碼來源:executionWindowsStage.ts

示例6: require

 .config((pipelineConfigProvider: PipelineConfigProvider) => {
   pipelineConfigProvider.registerStage({
     label: 'Script',
     description: 'Runs a script',
     key: 'script',
     restartable: true,
     controller: 'ScriptStageCtrl',
     controllerAs: 'scriptStageCtrl',
     templateUrl: require('./scriptStage.html'),
     executionDetailsSections: [ScriptExecutionDetails, ExecutionDetailsTasks],
     strategy: true,
   });
 })
開發者ID:robfletcher,項目名稱:deck,代碼行數:13,代碼來源:scriptStage.ts

示例7: controller

]).config((pipelineConfigProvider: PipelineConfigProvider) => {
  pipelineConfigProvider.registerArtifactKind({
    label: 'Docker',
    isDefault: true,
    isMatch: false,
    description: 'A Docker image to be deployed.',
    key: 'default.docker',
    controller(artifact: IArtifact) {
      'ngInject';
      this.artifact = artifact;
      this.artifact.type = 'docker/image';

      this.onReferenceChange = () => {
        const ref = this.artifact.reference;
        if (isNil(ref)) {
          return;
        }

        if (ref.indexOf('@') >= 0) {
          const split = ref.split('@');
          this.artifact.name = split[0];
          this.artifact.version = split[1];
        } else if (ref.indexOf(':') >= 0) {
          const split = ref.split(':');
          this.artifact.name = split[0];
          this.artifact.version = split[1];
        } else {
          this.artifact.name = ref;
        }
      };
    },
    controllerAs: 'ctrl',
    template: `
<div class="col-md-12">
  <div class="form-group row">
    <label class="col-md-2 sm-label-right">
      Docker image
      <help-field key="pipeline.config.expectedArtifact.defaultDocker.reference"></help-field>
    </label>
    <div class="col-md-8">
      <input type="text"
             placeholder="gcr.io/project/image@sha256:9efcc2818c9..."
             class="form-control input-sm"
             ng-change="ctrl.onReferenceChange()"
             ng-model="ctrl.artifact.reference"/>
    </div>
  </div>
</div>
`,
  });
});
開發者ID:robfletcher,項目名稱:deck,代碼行數:51,代碼來源:defaultDocker.artifact.ts

示例8: controller

]).config((pipelineConfigProvider: PipelineConfigProvider) => {
  pipelineConfigProvider.registerArtifactKind({
    label: 'GCS',
    description: 'A GCS object.',
    key: 'default.gcs',
    isDefault: true,
    isMatch: false,
    controller(artifact: IArtifact) {
      'ngInject';
      this.artifact = artifact;
      this.artifact.type = 'gcs/object';

      this.onReferenceChange = () => {
        const ref = this.artifact.reference;
        if (isNil(ref)) {
          return;
        }

        if (ref.indexOf('#') >= 0) {
          const split = ref.split('#');
          this.artifact.name = split[0];
          this.artifact.version = split[1];
        } else {
          this.artifact.name = ref;
        }
      };
    },
    controllerAs: 'ctrl',
    template: `
<div class="col-md-12">
  <div class="form-group row">
    <label class="col-md-2 sm-label-right">
      Object path
      <help-field key="pipeline.config.expectedArtifact.defaultGcs.reference"></help-field>
    </label>
    <div class="col-md-8">
      <input type="text"
             placeholder="gs://bucket/path/to/file"
             class="form-control input-sm"
             ng-change="ctrl.onReferenceChange()"
             ng-model="ctrl.artifact.reference"/>
    </div>
  </div>
</div>
`,
  });
});
開發者ID:robfletcher,項目名稱:deck,代碼行數:47,代碼來源:defaultGcs.artifact.ts

示例9: controller

]).config((pipelineConfigProvider: PipelineConfigProvider) => {
  pipelineConfigProvider.registerArtifactKind({
    label: 'GitHub',
    description: 'A file stored in git, hosted by GitHub.',
    key: 'default.github',
    isDefault: true,
    isMatch: false,
    controller(artifact: IArtifact) {
      'ngInject';
      this.artifact = artifact;
      this.artifact.type = 'github/file';
    },
    controllerAs: 'ctrl',
    template: `
<div class="col-md-12">
  <div class="form-group row">
    <label class="col-md-3 sm-label-right">
      Content URL
      <help-field key="pipeline.config.expectedArtifact.defaultGithub.reference"></help-field>
    </label>
    <div class="col-md-8">
      <input type="text"
             placeholder="https://api.github.com/repos/$ORG/$REPO/contents/$FILEPATH"
             class="form-control input-sm"
             ng-model="ctrl.artifact.reference"/>
    </div>
  </div>
  <div class="form-group row">
    <label class="col-md-3 sm-label-right">
      Commit/Branch
      <help-field key="pipeline.config.expectedArtifact.defaultGithub.version"></help-field>
    </label>
    <div class="col-md-3">
      <input type="text"
             placeholder="master"
             class="form-control input-sm"
             ng-model="ctrl.artifact.version"/>
    </div>
  </div>
</div>
`,
  });
});
開發者ID:robfletcher,項目名稱:deck,代碼行數:43,代碼來源:defaultGithub.artifact.ts


注:本文中的core/pipeline.PipelineConfigProvider類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。