mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-04 12:25:19 -04:00
Add Cloud Runner Pipeline to Main (#472)
* fix: k8s error handling (cherry picked from commit f633a3efb42432a6d2492712aead865a950c8dca) * include main in main cloud-runner pipeline (cherry picked from commit a40fbe941bba1ba4593c83c754b37363a969bfe5)
This commit is contained in:
parent
4cca069ebb
commit
f300dd27bb
@ -85,12 +85,11 @@ jobs:
|
||||
- run: |
|
||||
mv ./cloud-runner-cache/${{ steps.unity-build.outputs.CACHE_KEY }}/build/build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4 build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4
|
||||
ls
|
||||
- run: yarn run cli -m list-resources
|
||||
###########################
|
||||
# Upload #
|
||||
###########################
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: AWS Build (${{ matrix.targetPlatform }})
|
||||
name: Local Build (${{ matrix.targetPlatform }})
|
||||
path: build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4
|
||||
retention-days: 14
|
||||
|
2
.github/workflows/cloud-runner-pipeline.yml
vendored
2
.github/workflows/cloud-runner-pipeline.yml
vendored
@ -1,7 +1,7 @@
|
||||
name: Cloud Runner CI Pipeline
|
||||
|
||||
on:
|
||||
push: { branches: [cloud-runner-develop, cloud-runner-preview] }
|
||||
push: { branches: [cloud-runner-develop, cloud-runner-preview, main] }
|
||||
|
||||
env:
|
||||
GKE_ZONE: 'us-central1'
|
||||
|
BIN
dist/index.js
generated
vendored
BIN
dist/index.js
generated
vendored
Binary file not shown.
BIN
dist/index.js.map
generated
vendored
BIN
dist/index.js.map
generated
vendored
Binary file not shown.
@ -16,6 +16,7 @@ export class TaskService {
|
||||
return output;
|
||||
}
|
||||
public static async awsListStacks(perResultCallback: any = false) {
|
||||
CloudRunnerLogger.log(`List Stacks`);
|
||||
process.env.AWS_REGION = Input.region;
|
||||
const CF = new AWS.CloudFormation();
|
||||
const stacks =
|
||||
@ -55,6 +56,7 @@ export class TaskService {
|
||||
}
|
||||
}
|
||||
public static async awsListTasks(perResultCallback: any = false) {
|
||||
CloudRunnerLogger.log(`List Tasks`);
|
||||
process.env.AWS_REGION = Input.region;
|
||||
const ecs = new AWS.ECS();
|
||||
const clusters = (await ecs.listClusters().promise()).clusterArns || [];
|
||||
@ -88,6 +90,7 @@ export class TaskService {
|
||||
}
|
||||
}
|
||||
public static async awsListJobs(perResultCallback: any = false) {
|
||||
CloudRunnerLogger.log(`List Jobs`);
|
||||
process.env.AWS_REGION = Input.region;
|
||||
const CF = new AWS.CloudFormation();
|
||||
const stacks =
|
||||
|
@ -155,8 +155,14 @@ class Kubernetes implements ProviderInterface {
|
||||
CloudRunnerLogger.log('Pod still running, recovering stream...');
|
||||
}
|
||||
} catch (error: any) {
|
||||
const reason = error.response?.body?.reason || error.reason || ``;
|
||||
const errorMessage = error.message || ``;
|
||||
let errorParsed;
|
||||
try {
|
||||
errorParsed = JSON.parse(error);
|
||||
} catch {
|
||||
errorParsed = error;
|
||||
}
|
||||
const reason = errorParsed.reason || errorParsed.response?.body?.reason || ``;
|
||||
const errorMessage = errorParsed.message || ``;
|
||||
|
||||
const continueStreaming = reason === `NotFound` || errorMessage.includes(`dial timeout, backstop`);
|
||||
if (continueStreaming) {
|
||||
|
Loading…
Reference in New Issue
Block a user