custom step secrets
parent
21cb4562cc
commit
c80b47473b
|
|
@ -2235,12 +2235,20 @@ class RemoteBuilder {
|
||||||
this.buildParams.postBuildSteps = yaml_1.default.parse(this.buildParams.postBuildSteps);
|
this.buildParams.postBuildSteps = yaml_1.default.parse(this.buildParams.postBuildSteps);
|
||||||
core.info(`Post build steps ${JSON.stringify(this.buildParams.postBuildSteps, undefined, 4)}`);
|
core.info(`Post build steps ${JSON.stringify(this.buildParams.postBuildSteps, undefined, 4)}`);
|
||||||
for (const step of this.buildParams.postBuildSteps) {
|
for (const step of this.buildParams.postBuildSteps) {
|
||||||
|
const stepSecrets = step.secrets.map((x) => {
|
||||||
|
const secret = {
|
||||||
|
ParameterKey: x.name,
|
||||||
|
EnvironmentVariable: x.name,
|
||||||
|
ParameterValue: x.value,
|
||||||
|
};
|
||||||
|
return secret;
|
||||||
|
});
|
||||||
yield this.RemoteBuilderProviderPlatform.runBuildTask(this.buildGuid, step['image'], step['commands'], `/${buildVolumeFolder}`, `/${buildVolumeFolder}`, [
|
yield this.RemoteBuilderProviderPlatform.runBuildTask(this.buildGuid, step['image'], step['commands'], `/${buildVolumeFolder}`, `/${buildVolumeFolder}`, [
|
||||||
{
|
{
|
||||||
name: 'GITHUB_SHA',
|
name: 'GITHUB_SHA',
|
||||||
value: process.env.GITHUB_SHA || '',
|
value: process.env.GITHUB_SHA || '',
|
||||||
},
|
},
|
||||||
], this.defaultSecrets);
|
], [...this.defaultSecrets, ...stepSecrets]);
|
||||||
}
|
}
|
||||||
yield RemoteBuilder.CompressionStep();
|
yield RemoteBuilder.CompressionStep();
|
||||||
yield RemoteBuilder.UploadArtifacts();
|
yield RemoteBuilder.UploadArtifacts();
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -61,6 +61,14 @@ class RemoteBuilder {
|
||||||
this.buildParams.postBuildSteps = YAML.parse(this.buildParams.postBuildSteps);
|
this.buildParams.postBuildSteps = YAML.parse(this.buildParams.postBuildSteps);
|
||||||
core.info(`Post build steps ${JSON.stringify(this.buildParams.postBuildSteps, undefined, 4)}`);
|
core.info(`Post build steps ${JSON.stringify(this.buildParams.postBuildSteps, undefined, 4)}`);
|
||||||
for (const step of this.buildParams.postBuildSteps) {
|
for (const step of this.buildParams.postBuildSteps) {
|
||||||
|
const stepSecrets: RemoteBuilderSecret[] = step.secrets.map((x) => {
|
||||||
|
const secret: RemoteBuilderSecret = {
|
||||||
|
ParameterKey: x.name,
|
||||||
|
EnvironmentVariable: x.name,
|
||||||
|
ParameterValue: x.value,
|
||||||
|
};
|
||||||
|
return secret;
|
||||||
|
});
|
||||||
await this.RemoteBuilderProviderPlatform.runBuildTask(
|
await this.RemoteBuilderProviderPlatform.runBuildTask(
|
||||||
this.buildGuid,
|
this.buildGuid,
|
||||||
step['image'],
|
step['image'],
|
||||||
|
|
@ -73,7 +81,7 @@ class RemoteBuilder {
|
||||||
value: process.env.GITHUB_SHA || '',
|
value: process.env.GITHUB_SHA || '',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
this.defaultSecrets,
|
[...this.defaultSecrets, ...stepSecrets],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
await RemoteBuilder.CompressionStep();
|
await RemoteBuilder.CompressionStep();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue