pull/218/head
mdugdale 2021-02-16 21:04:55 +00:00
parent 66e4b562ad
commit abd8214155
3 changed files with 27 additions and 13 deletions

View File

@ -8,10 +8,10 @@ Parameters:
Default: development Default: development
Description: "Your deployment environment: DEV, QA , PROD" Description: "Your deployment environment: DEV, QA , PROD"
ContainerPort: # ContainerPort:
Type: Number # Type: Number
Default: 80 # Default: 80
Description: What port number the application inside the docker container is binding to # Description: What port number the application inside the docker container is binding to
@ -231,6 +231,11 @@ Resources:
Statement: Statement:
- Effect: Allow - Effect: Allow
Action: Action:
# Allow upload to S3
- s3:GetObject
- s3:GetObjectVersion
- s3:PutObject
# Allow the use of secret manager # Allow the use of secret manager
- 'secretsmanager:GetSecretValue' - 'secretsmanager:GetSecretValue'
- 'kms:Decrypt' - 'kms:Decrypt'
@ -305,8 +310,11 @@ Resources:
SecurityGroups: SecurityGroups:
- !Ref EFSServerSecurityGroup - !Ref EFSServerSecurityGroup
S3Bucket:
Type: 'AWS::S3::Bucket'
DeletionPolicy: Retain
Properties:
BucketName: GAME-CI-STORAGE

File diff suppressed because one or more lines are too long

View File

@ -51,11 +51,11 @@ class AWS {
baseImage.toString(), baseImage.toString(),
['/bin/sh'], ['/bin/sh'],
['-c', ` ['-c', `
if [ $GITHUB_TOKEN == '0' ]; then unset GITHUB_TOKEN; fi; if [ $GITHUB_TOKEN == '0' ]; then unset GITHUB_TOKEN; fi
if [ $UNITY_LICENSE == '0' ]; then unset UNITY_LICENSE; fi; if [ $UNITY_LICENSE == '0' ]; then unset UNITY_LICENSE; fi
if [ $ANDROID_KEYSTORE_BASE64 == '0' ]; then unset ANDROID_KEYSTORE_BASE64; fi; if [ $ANDROID_KEYSTORE_BASE64 == '0' ]; then unset ANDROID_KEYSTORE_BASE64; fi
if [ $ANDROID_KEYSTORE_PASS == '0' ]; then unset ANDROID_KEYSTORE_PASS; fi; if [ $ANDROID_KEYSTORE_PASS == '0' ]; then unset ANDROID_KEYSTORE_PASS; fi
if [ $ANDROID_KEYALIAS_PASS == '0' ]; then unset ANDROID_KEYALIAS_PASS; fi; if [ $ANDROID_KEYALIAS_PASS == '0' ]; then unset ANDROID_KEYALIAS_PASS; fi
cp -r /data/$BUILD_ID/builder/action/default-build-script /UnityBuilderAction; cp -r /data/$BUILD_ID/builder/action/default-build-script /UnityBuilderAction;
cp -r /data/$BUILD_ID/builder/action/entrypoint.sh /entrypoint.sh; cp -r /data/$BUILD_ID/builder/action/entrypoint.sh /entrypoint.sh;
cp -r /data/$BUILD_ID/builder/action/steps /steps; cp -r /data/$BUILD_ID/builder/action/steps /steps;
@ -148,6 +148,8 @@ class AWS {
[ [
'-c', '-c',
` `
apt-get update
apt install zip
zip -r output.zip ./$BUILD_ID/repo/build zip -r output.zip ./$BUILD_ID/repo/build
ls ls
aws s3 cp ./$BUILD_ID/repo/build output.zip aws s3 cp ./$BUILD_ID/repo/build output.zip
@ -224,7 +226,11 @@ class AWS {
} }
].concat(secrets), ].concat(secrets),
}).promise(); }).promise();
await CF.waitFor('stackCreateComplete', { StackName: taskDefStackName }).promise(); try{
await CF.waitFor('stackCreateComplete', { StackName: taskDefStackName }).promise();
}catch(error){
core.error(error);
}
const taskDefResources = await CF.describeStackResources({ const taskDefResources = await CF.describeStackResources({
StackName: taskDefStackName, StackName: taskDefStackName,