本文整理汇总了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>
`,
});
});
示例2:
.config((pipelineConfigProvider: PipelineConfigProvider) => {
pipelineConfigProvider.registerStage({
synthetic: true,
key: 'applySourceServerGroupCapacity',
executionDetailsSections: [ ApplySourceServerGroupCapacityDetails, ExecutionDetailsTasks ],
});
});
示例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>
`,
});
});
示例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>
`,
});
});
示例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],
});
})
示例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,
});
})
示例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>
`,
});
});
示例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>
`,
});
});
示例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>
`,
});
});