Compiled
parent
b048e94e52
commit
c794bde952
|
@ -1596,6 +1596,7 @@ class AWSCloudFormationTemplates {
|
|||
}
|
||||
static getSecretDefinitionTemplate(p1, p2) {
|
||||
return `
|
||||
Secrets:
|
||||
- Name: '${p1}'
|
||||
ValueFrom: !Ref ${p2}Secret
|
||||
`;
|
||||
|
@ -1710,7 +1711,7 @@ class AWSJobStack {
|
|||
}
|
||||
taskDefCloudFormation = aws_cloud_formation_templates_1.AWSCloudFormationTemplates.insertAtTemplate(taskDefCloudFormation, 'p1 - input', aws_cloud_formation_templates_1.AWSCloudFormationTemplates.getParameterTemplate(secret.ParameterKey));
|
||||
taskDefCloudFormation = aws_cloud_formation_templates_1.AWSCloudFormationTemplates.insertAtTemplate(taskDefCloudFormation, '# template resources secrets', aws_cloud_formation_templates_1.AWSCloudFormationTemplates.getSecretTemplate(`${secret.ParameterKey}`));
|
||||
taskDefCloudFormation = aws_cloud_formation_templates_1.AWSCloudFormationTemplates.insertAtTemplate(taskDefCloudFormation, 'p3 - container def', aws_cloud_formation_templates_1.AWSCloudFormationTemplates.getSecretDefinitionTemplate(secret.EnvironmentVariable, secret.ParameterKey));
|
||||
taskDefCloudFormation = aws_cloud_formation_templates_1.AWSCloudFormationTemplates.insertAtTemplate(taskDefCloudFormation, '# template secrets p3 - container def', aws_cloud_formation_templates_1.AWSCloudFormationTemplates.getSecretDefinitionTemplate(secret.EnvironmentVariable, secret.ParameterKey));
|
||||
}
|
||||
const secretsMappedToCloudFormationParameters = secrets.map((x) => {
|
||||
return { ParameterKey: x.ParameterKey.replace(/[^\dA-Za-z]/g, ''), ParameterValue: x.ParameterValue };
|
||||
|
@ -1751,6 +1752,7 @@ class AWSJobStack {
|
|||
},
|
||||
...secretsMappedToCloudFormationParameters,
|
||||
];
|
||||
cloud_runner_logger_1.default.log(`TaskDef: ${taskDefCloudFormation}`);
|
||||
cloud_runner_logger_1.default.log(`Starting AWS job with memory: ${cloud_runner_1.default.buildParameters.containerMemory} cpu: ${cloud_runner_1.default.buildParameters.containerCpu}`);
|
||||
let previousStackExists = true;
|
||||
while (previousStackExists) {
|
||||
|
@ -1774,7 +1776,9 @@ class AWSJobStack {
|
|||
Capabilities: ['CAPABILITY_IAM'],
|
||||
Parameters: parameters,
|
||||
};
|
||||
cloud_runner_logger_1.default.log(`StackInput: ${createStackInput}`);
|
||||
try {
|
||||
cloud_runner_logger_1.default.log(`TaskDef Cloud formation: ${taskDefCloudFormation}`);
|
||||
cloud_runner_logger_1.default.log(`Creating job aws formation ${taskDefStackName}`);
|
||||
await CF.createStack(createStackInput).promise();
|
||||
await CF.waitFor('stackCreateComplete', { StackName: taskDefStackName }).promise();
|
||||
|
@ -2759,9 +2763,8 @@ Resources:
|
|||
MountPoints:
|
||||
- SourceVolume: efs-data
|
||||
ContainerPath: !Ref EFSMountDirectory
|
||||
ReadOnly: false
|
||||
Secrets:
|
||||
# template secrets p3 - container def
|
||||
ReadOnly: false
|
||||
# template secrets p3 - container def
|
||||
LogConfiguration:
|
||||
LogDriver: awslogs
|
||||
Options:
|
||||
|
@ -8012,7 +8015,7 @@ class Versioning {
|
|||
static async getVersionDescription() {
|
||||
const versionTags = (await this.git(['tag', '--list', '--merged', 'HEAD', '--sort=-creatordate']))
|
||||
.split('\n')
|
||||
.filter(tag => new RegExp(this.grepCompatibleInputVersionRegex).test(tag));
|
||||
.filter((tag) => new RegExp(this.grepCompatibleInputVersionRegex).test(tag));
|
||||
if (versionTags.length === 0) {
|
||||
core.warning('No valid version tags found. Using fallback description.');
|
||||
return this.git(['describe', '--long', '--tags', '--always', 'HEAD']);
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue