running git lfs clone
parent
bcecc1fbec
commit
d22b61f966
File diff suppressed because one or more lines are too long
|
|
@ -63,6 +63,9 @@ Parameters:
|
||||||
AndroidKeyAliasPass:
|
AndroidKeyAliasPass:
|
||||||
Type: String
|
Type: String
|
||||||
Default: 'Secret'
|
Default: 'Secret'
|
||||||
|
BUILDID:
|
||||||
|
Type: String
|
||||||
|
Default: 'noid'
|
||||||
Mappings:
|
Mappings:
|
||||||
SubnetConfig:
|
SubnetConfig:
|
||||||
VPC:
|
VPC:
|
||||||
|
|
@ -113,31 +116,31 @@ Resources:
|
||||||
GithubTokenSecret:
|
GithubTokenSecret:
|
||||||
Type: AWS::SecretsManager::Secret
|
Type: AWS::SecretsManager::Secret
|
||||||
Properties:
|
Properties:
|
||||||
Name: !Join [ "", [ 'GithubToken', !Ref BUILD_ID ] ]
|
Name: !Join [ "", [ 'GithubToken', !Ref BUILDID ] ]
|
||||||
SecretString: !Ref GithubToken
|
SecretString: !Ref GithubToken
|
||||||
|
|
||||||
UnityLicenseSecret:
|
UnityLicenseSecret:
|
||||||
Type: AWS::SecretsManager::Secret
|
Type: AWS::SecretsManager::Secret
|
||||||
Properties:
|
Properties:
|
||||||
Name: !Join [ "", [ 'UnityLicense', !Ref BUILD_ID ] ]
|
Name: !Join [ "", [ 'UnityLicense', !Ref BUILDID ] ]
|
||||||
SecretString: !Ref UnityLicense
|
SecretString: !Ref UnityLicense
|
||||||
|
|
||||||
AndroidKeystoreBase64Secret:
|
AndroidKeystoreBase64Secret:
|
||||||
Type: AWS::SecretsManager::Secret
|
Type: AWS::SecretsManager::Secret
|
||||||
Properties:
|
Properties:
|
||||||
Name: !Join [ "", [ 'AndroidKeystoreBase64', !Ref BUILD_ID ] ]
|
Name: !Join [ "", [ 'AndroidKeystoreBase64', !Ref BUILDID ] ]
|
||||||
SecretString: !Ref AndroidKeystoreBase64
|
SecretString: !Ref AndroidKeystoreBase64
|
||||||
|
|
||||||
AndroidKeystorePassSecret:
|
AndroidKeystorePassSecret:
|
||||||
Type: AWS::SecretsManager::Secret
|
Type: AWS::SecretsManager::Secret
|
||||||
Properties:
|
Properties:
|
||||||
Name: !Join [ "", [ 'AndroidKeystorePass', !Ref BUILD_ID ] ]
|
Name: !Join [ "", [ 'AndroidKeystorePass', !Ref BUILDID ] ]
|
||||||
SecretString: !Ref AndroidKeystorePass
|
SecretString: !Ref AndroidKeystorePass
|
||||||
|
|
||||||
AndroidKeyAliasPassSecret:
|
AndroidKeyAliasPassSecret:
|
||||||
Type: AWS::SecretsManager::Secret
|
Type: AWS::SecretsManager::Secret
|
||||||
Properties:
|
Properties:
|
||||||
Name: !Join [ "", [ 'AndroidKeyAliasPass', !Ref BUILD_ID ] ]
|
Name: !Join [ "", [ 'AndroidKeyAliasPass', !Ref BUILDID ] ]
|
||||||
SecretString: !Ref AndroidKeyAliasPass
|
SecretString: !Ref AndroidKeyAliasPass
|
||||||
|
|
||||||
TaskDefinition:
|
TaskDefinition:
|
||||||
|
|
@ -184,28 +187,28 @@ Resources:
|
||||||
ContainerPath: !Ref EFSMountDirectory
|
ContainerPath: !Ref EFSMountDirectory
|
||||||
ReadOnly: false
|
ReadOnly: false
|
||||||
Secrets:
|
Secrets:
|
||||||
- Name: !Join [ "", [ 'GITHUB_TOKEN_', !Ref BUILD_ID ] ]
|
- Name: !Join [ "", [ 'GITHUB_TOKEN_', !Ref BUILDID ] ]
|
||||||
ValueFrom: !Ref GithubTokenSecret
|
ValueFrom: !Ref GithubTokenSecret
|
||||||
- Name: !Join [ "", [ 'UNITY_LICENSE_', !Ref BUILD_ID ] ]
|
- Name: !Join [ "", [ 'UNITY_LICENSE_', !Ref BUILDID ] ]
|
||||||
ValueFrom: !Ref UnityLicenseSecret
|
ValueFrom: !Ref UnityLicenseSecret
|
||||||
- Name: !Join [ "", [ 'ANDROID_KEYSTORE_BASE64_', !Ref BUILD_ID ] ]
|
- Name: !Join [ "", [ 'ANDROID_KEYSTORE_BASE64_', !Ref BUILDID ] ]
|
||||||
ValueFrom: !Ref AndroidKeystoreBase64Secret
|
ValueFrom: !Ref AndroidKeystoreBase64Secret
|
||||||
- Name: !Join [ "", [ 'ANDROID_KEYSTORE_PASS_', !Ref BUILD_ID ] ]
|
- Name: !Join [ "", [ 'ANDROID_KEYSTORE_PASS_', !Ref BUILDID ] ]
|
||||||
ValueFrom: !Ref AndroidKeystorePassSecret
|
ValueFrom: !Ref AndroidKeystorePassSecret
|
||||||
- Name: !Join [ "", [ 'ANDROID_KEYALIAS_PASS_', !Ref BUILD_ID ] ]
|
- Name: !Join [ "", [ 'ANDROID_KEYALIAS_PASS_', !Ref BUILDID ] ]
|
||||||
ValueFrom: !Ref AndroidKeyAliasPassSecret
|
ValueFrom: !Ref AndroidKeyAliasPassSecret
|
||||||
LogConfiguration:
|
LogConfiguration:
|
||||||
LogDriver: awslogs
|
LogDriver: awslogs
|
||||||
SecretOptions:
|
SecretOptions:
|
||||||
- Name: !Join [ "", [ 'GITHUB_TOKEN_', !Ref BUILD_ID ] ]
|
- Name: !Join [ "", [ 'GITHUB_TOKEN_', !Ref BUILDID ] ]
|
||||||
ValueFrom: !Ref GithubTokenSecret
|
ValueFrom: !Ref GithubTokenSecret
|
||||||
- Name: !Join [ "", [ 'UNITY_LICENSE_', !Ref BUILD_ID ] ]
|
- Name: !Join [ "", [ 'UNITY_LICENSE_', !Ref BUILDID ] ]
|
||||||
ValueFrom: !Ref UnityLicenseSecret
|
ValueFrom: !Ref UnityLicenseSecret
|
||||||
- Name: !Join [ "", [ 'ANDROID_KEYSTORE_BASE64_', !Ref BUILD_ID ] ]
|
- Name: !Join [ "", [ 'ANDROID_KEYSTORE_BASE64_', !Ref BUILDID ] ]
|
||||||
ValueFrom: !Ref AndroidKeystoreBase64Secret
|
ValueFrom: !Ref AndroidKeystoreBase64Secret
|
||||||
- Name: !Join [ "", [ 'ANDROID_KEYSTORE_PASS_', !Ref BUILD_ID ] ]
|
- Name: !Join [ "", [ 'ANDROID_KEYSTORE_PASS_', !Ref BUILDID ] ]
|
||||||
ValueFrom: !Ref AndroidKeystorePassSecret
|
ValueFrom: !Ref AndroidKeystorePassSecret
|
||||||
- Name: !Join [ "", [ 'ANDROID_KEYALIAS_PASS_', !Ref BUILD_ID ] ]
|
- Name: !Join [ "", [ 'ANDROID_KEYALIAS_PASS_', !Ref BUILDID ] ]
|
||||||
ValueFrom: !Ref AndroidKeyAliasPassSecret
|
ValueFrom: !Ref AndroidKeyAliasPassSecret
|
||||||
Options:
|
Options:
|
||||||
awslogs-group: !Ref ServiceName
|
awslogs-group: !Ref ServiceName
|
||||||
|
|
|
||||||
|
|
@ -144,8 +144,9 @@ class AWS {
|
||||||
static async run(stackName, image, entrypoint, commands, mountdir, workingdir, environment, secrets) {
|
static async run(stackName, image, entrypoint, commands, mountdir, workingdir, environment, secrets) {
|
||||||
const ECS = new SDK.ECS();
|
const ECS = new SDK.ECS();
|
||||||
const CF = new SDK.CloudFormation();
|
const CF = new SDK.CloudFormation();
|
||||||
|
const jobId = nanoid();
|
||||||
|
|
||||||
const taskDefStackName = `${stackName}-taskDef-${image}-${nanoid()}`
|
const taskDefStackName = `${stackName}-taskDef-${image}-${jobId}`
|
||||||
.toString()
|
.toString()
|
||||||
.replace(/[^\da-z]/gi, '');
|
.replace(/[^\da-z]/gi, '');
|
||||||
core.info('Creating build job resources');
|
core.info('Creating build job resources');
|
||||||
|
|
@ -177,6 +178,10 @@ class AWS {
|
||||||
{
|
{
|
||||||
ParameterKey: 'EFSMountDirectory',
|
ParameterKey: 'EFSMountDirectory',
|
||||||
ParameterValue: mountdir,
|
ParameterValue: mountdir,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ParameterKey: 'BUILDID',
|
||||||
|
ParameterValue: jobId,
|
||||||
}
|
}
|
||||||
].concat(secrets),
|
].concat(secrets),
|
||||||
}).promise();
|
}).promise();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue