Minor tweaks and corrections for cloud runner pipeline and branch parameter (#351)

* Update cloud-runner-aws-pipeline.yml

* Update cloud-runner-k8s-pipeline.yml

* yarn build

* yarn build

* correct branch ref

* correct branch ref passed to target repo

* Create k8s-tests.yml

* Delete k8s-tests.yml

* correct branch ref passed to target repo

* correct branch ref passed to target repo
This commit is contained in:
Frostebite 2022-03-04 19:42:24 +00:00 committed by GitHub
parent 693ff829de
commit d975f3b80f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 6 deletions

View File

@ -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 }}

View File

@ -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 }}

BIN
dist/index.js generated vendored

Binary file not shown.

BIN
dist/index.js.map generated vendored

Binary file not shown.

View File

@ -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),
)}`,

View File

@ -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, `/`)}