running git lfs clone

pull/218/head
mdugdale 2021-02-14 18:24:09 +00:00
parent fe64dd135a
commit a8024abd13
3 changed files with 37 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -48,6 +48,12 @@ Parameters:
EFSMountDirectory:
Type: String
Default: /efsdata
SecretName:
Type: String
Default: 'Secret'
SecretValue:
Type: String
Default: ''
Mappings:
SubnetConfig:
VPC:
@ -94,6 +100,11 @@ Resources:
Metadata:
'AWS::CloudFormation::Designer':
id: c6f18447-b879-4696-8873-f981b2cedd2b
Secret:
Type: AWS::SecretsManager::Secret
Properties:
Name: !Ref SecretName
SecretString: !Ref SecretValue
TaskDefinition:
Type: 'AWS::ECS::TaskDefinition'
Properties:
@ -137,6 +148,9 @@ Resources:
- SourceVolume: efs-data
ContainerPath: !Ref EFSMountDirectory
ReadOnly: false
Secrets:
- Name: !Ref SecretName
ValueFrom: !Ref Secret
LogConfiguration:
LogDriver: awslogs
Options:

View File

@ -36,6 +36,7 @@ class AWS {
value: buildId,
},
],
[],
);
await this.run(
buildParameters.awsStackName,
@ -102,10 +103,22 @@ class AWS {
value: buildParameters.androidKeyaliasName,
},
],
[
{name: 'GITHUB_TOKEN',
value: base64.encode(buildParameters.githubToken),},
{name: 'UNITY_LICENSE',
value: base64.encode(process.env.UNITY_LICENSE),},
{name: 'ANDROID_KEYSTORE_BASE64',
value: base64.encode(buildParameters.androidKeystoreBase64),},
{name: 'ANDROID_KEYSTORE_PASS',
value: base64.encode(buildParameters.androidKeystorePass),},
{name: 'ANDROID_KEYALIAS_PASS',
value: base64.encode(buildParameters.androidKeyaliasPass),},
]
);
}
static async run(stackName, image, entrypoint, commands, mountdir, workingdir, environment) {
static async run(stackName, image, entrypoint, commands, mountdir, workingdir, environment, secrets) {
const ECS = new SDK.ECS();
const CF = new SDK.CloudFormation();
@ -142,6 +155,14 @@ class AWS {
ParameterKey: 'EFSMountDirectory',
ParameterValue: mountdir,
},
{
ParameterKey: 'SecretName',
ParameterValue: 'Secrets'+nanoid(),
},
{
ParameterKey: 'SecretValue',
ParameterValue: Buffer.from(JSON.stringify(secrets)).toString('base64'),
}
],
}).promise();
await CF.waitFor('stackCreateComplete', { StackName: taskDefStackName }).promise();