handle cleanup errors

pull/235/head
mdugdale 2021-04-03 20:59:01 +01:00
parent a1fd1308e5
commit 291e241898
3 changed files with 12 additions and 5 deletions

6
dist/index.js vendored
View File

@ -258,10 +258,14 @@ class AWS {
if [ ! -z $latest ]; then
echo "Library cache exists from build $latest from ${branchName}"
mkdir /data/${buildUid}/repo/${buildParameters.projectPath}/Library
unzip -q $latest -d /data/${buildUid}/repo/${buildParameters.projectPath}/Library/.
unzip -q "$latest" -d /data/${buildUid}/repo/${buildParameters.projectPath}/Library/.
echo ' '
ls /data/${buildUid}/repo/
echo ' '
ls /data/${buildUid}/repo/${buildParameters.projectPath}
echo ' '
ls /data/${buildUid}/repo/${buildParameters.projectPath}/Library/
echo ' '
else
echo "Cache does not exist"
fi

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -46,10 +46,14 @@ class AWS {
if [ ! -z $latest ]; then
echo "Library cache exists from build $latest from ${branchName}"
mkdir /data/${buildUid}/repo/${buildParameters.projectPath}/Library
unzip -q $latest -d /data/${buildUid}/repo/${buildParameters.projectPath}/Library/.
unzip -q "$latest" -d /data/${buildUid}/repo/${buildParameters.projectPath}/Library/.
echo ' '
ls /data/${buildUid}/repo/
echo ' '
ls /data/${buildUid}/repo/${buildParameters.projectPath}
echo ' '
ls /data/${buildUid}/repo/${buildParameters.projectPath}/Library/
echo ' '
else
echo "Cache does not exist"
fi
@ -463,8 +467,7 @@ class AWS {
if (exitCode !== 0) {
try {
await this.cleanupResources(CF, taskDef);
}
catch (error) {
} catch (error) {
core.warning(`failed to cleanup ${error}`);
}
core.error(`job failed with exit code ${exitCode}`);