diff --git a/.github/workflows/cloud-runner-aws-pipeline.yml b/.github/workflows/cloud-runner-aws-pipeline.yml index 3debe66c..0d1fc858 100644 --- a/.github/workflows/cloud-runner-aws-pipeline.yml +++ b/.github/workflows/cloud-runner-aws-pipeline.yml @@ -1,7 +1,7 @@ name: Cloud Runner - AWS Tests on: - push: { branches: [main, aws, remote-builder/unified-providers] } + push: { branches: [main, cloud-runner-develop] } env: GKE_ZONE: 'us-central1' @@ -15,7 +15,7 @@ env: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_DEFAULT_REGION: eu-west-2 AWS_BASE_STACK_NAME: game-ci-github-pipelines - CLOUD_RUNNER_BRANCH: remote-builder/unified-providers + CLOUD_RUNNER_BRANCH: ${{ github.ref }} CLOUD_RUNNER_TESTS: true DEBUG: true UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} diff --git a/.github/workflows/cloud-runner-k8s-pipeline.yml b/.github/workflows/cloud-runner-k8s-pipeline.yml index 00ad445f..b8b308e3 100644 --- a/.github/workflows/cloud-runner-k8s-pipeline.yml +++ b/.github/workflows/cloud-runner-k8s-pipeline.yml @@ -1,7 +1,7 @@ name: Cloud Runner - K8s Tests on: - push: { branches: [remote-builder/k8s, remote-builder/unified-providers] } + push: { branches: [cloud-runner-develop] } # push: { branches: [main] } # pull_request: # paths-ignore: @@ -20,7 +20,7 @@ env: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_DEFAULT_REGION: eu-west-2 AWS_BASE_STACK_NAME: game-ci-github-pipelines - CLOUD_RUNNER_BRANCH: remote-builder/unified-providers + CLOUD_RUNNER_BRANCH: ${{ github.ref }} CLOUD_RUNNER_TESTS: true DEBUG: true UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} diff --git a/dist/index.js b/dist/index.js index a514237c..d3e9d8cd 100644 Binary files a/dist/index.js and b/dist/index.js differ diff --git a/dist/index.js.map b/dist/index.js.map index 5a73f7b8..6698530b 100644 Binary files a/dist/index.js.map and b/dist/index.js.map differ diff --git a/src/model/cli/remote-client/setup-cloud-runner-repository.ts b/src/model/cli/remote-client/setup-cloud-runner-repository.ts index e8240d88..b08b9d7e 100644 --- a/src/model/cli/remote-client/setup-cloud-runner-repository.ts +++ b/src/model/cli/remote-client/setup-cloud-runner-repository.ts @@ -55,7 +55,7 @@ export class SetupCloudRunnerRepository { RemoteClientLogger.log(`Cloning the repository being built:`); await CloudRunnerSystem.Run(`git lfs install --skip-smudge`); await CloudRunnerSystem.Run( - `git clone ${CloudRunnerState.targetBuildRepoUrl} ${path.resolve( + `git clone -b ${CloudRunnerState.branchName} ${CloudRunnerState.targetBuildRepoUrl} ${path.resolve( `..`, path.basename(CloudRunnerState.repoPathFull), )}`, diff --git a/src/model/cloud-runner/steps/setup-step.ts b/src/model/cloud-runner/steps/setup-step.ts index cef427c7..b0da16da 100644 --- a/src/model/cloud-runner/steps/setup-step.ts +++ b/src/model/cloud-runner/steps/setup-step.ts @@ -21,6 +21,12 @@ export class SetupStep implements StepInterface { } } + private static getCloudRunnerBranch() { + return process.env.CLOUD_RUNNER_BRANCH?.includes('/') + ? process.env.CLOUD_RUNNER_BRANCH.split('/').reverse()[0] + : process.env.CLOUD_RUNNER_BRANCH; + } + private static async downloadRepository( image: string, environmentVariables: CloudRunnerEnvironmentVariable[], @@ -38,7 +44,7 @@ export class SetupStep implements StepInterface { ${hooks.filter((x) => x.hook.includes(`before`)).map((x) => x.commands) || ' '} export GIT_DISCOVERY_ACROSS_FILESYSTEM=1 mkdir -p ${CloudRunnerState.builderPathFull.replace(/\\/g, `/`)} - git clone -q -b ${CloudRunnerState.branchName} ${ + git clone -q -b ${SetupStep.getCloudRunnerBranch()} ${ CloudRunnerState.unityBuilderRepoUrl } "${CloudRunnerState.builderPathFull.replace(/\\/g, `/`)}" ${Input.cloudRunnerTests ? '' : '#'} tree ${CloudRunnerState.builderPathFull.replace(/\\/g, `/`)}