本文整理匯總了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>
`,
});
});