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
Description: "Your deployment environment: DEV, QA , PROD"
ContainerPort:
Type: Number
Default: 80
Description: What port number the application inside the docker container is binding to
# ContainerPort:
# Type: Number
# Default: 80
# Description: What port number the application inside the docker container is binding to
@ -231,6 +231,11 @@ Resources:
Statement:
- Effect: Allow
Action:
# Allow upload to S3
- s3:GetObject
- s3:GetObjectVersion
- s3:PutObject
# Allow the use of secret manager
- 'secretsmanager:GetSecretValue'
- 'kms:Decrypt'
@ -305,8 +310,11 @@ Resources:
SecurityGroups:
- !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(),
['/bin/sh'],
['-c', `
if [ $GITHUB_TOKEN == '0' ]; then unset GITHUB_TOKEN; fi;
if [ $UNITY_LICENSE == '0' ]; then unset UNITY_LICENSE; 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_KEYALIAS_PASS == '0' ]; then unset ANDROID_KEYALIAS_PASS; fi;
if [ $GITHUB_TOKEN == '0' ]; then unset GITHUB_TOKEN; fi
if [ $UNITY_LICENSE == '0' ]; then unset UNITY_LICENSE; 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_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/entrypoint.sh /entrypoint.sh;
cp -r /data/$BUILD_ID/builder/action/steps /steps;
@ -148,6 +148,8 @@ class AWS {
[
'-c',
`
apt-get update
apt install zip
zip -r output.zip ./$BUILD_ID/repo/build
ls
aws s3 cp ./$BUILD_ID/repo/build output.zip
@ -224,7 +226,11 @@ class AWS {
}
].concat(secrets),
}).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({
StackName: taskDefStackName,