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:
@@ -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),
|
||||
)}`,
|
||||
|
||||
@@ -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, `/`)}
|
||||
|
||||
Reference in New Issue
Block a user