mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-07 20:35:33 -04:00
Compare commits
5 Commits
a1f3d9ecd4
...
8acf57570f
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8acf57570f | ||
![]() |
ba925c0e55 | ||
![]() |
47d1c5feca | ||
![]() |
4b6ca3b5a4 | ||
![]() |
3db9ec2db7 |
@ -92,6 +92,7 @@ jobs:
|
|||||||
- 'cloud-runner-kubernetes'
|
- 'cloud-runner-kubernetes'
|
||||||
- 'cloud-runner-environment'
|
- 'cloud-runner-environment'
|
||||||
- 'cloud-runner-github-checks'
|
- 'cloud-runner-github-checks'
|
||||||
|
- 'cloud-runner-rclone-core'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout (default)
|
- name: Checkout (default)
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
@ -160,6 +161,7 @@ jobs:
|
|||||||
GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
|
||||||
buildTargetTests:
|
buildTargetTests:
|
||||||
name: Local Build Target Tests
|
name: Local Build Target Tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
BIN
dist/index.js.map
generated
vendored
BIN
dist/index.js.map
generated
vendored
Binary file not shown.
3
game-ci/command-hooks/rclone-pre-build.yaml
Normal file
3
game-ci/command-hooks/rclone-pre-build.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
hook: before
|
||||||
|
commands: |
|
||||||
|
curl https://rclone.org/install.sh | bash
|
@ -33,7 +33,7 @@ commands: echo "test"`;
|
|||||||
image: 'ubuntu',
|
image: 'ubuntu',
|
||||||
cacheKey: `test-case-${uuidv4()}`,
|
cacheKey: `test-case-${uuidv4()}`,
|
||||||
};
|
};
|
||||||
CloudRunner.setup(await CreateParameters(overrides));
|
await CloudRunner.setup(await CreateParameters(overrides));
|
||||||
const stringObject = ContainerHookService.ParseContainerHooks(yamlString);
|
const stringObject = ContainerHookService.ParseContainerHooks(yamlString);
|
||||||
const stringObject2 = ContainerHookService.ParseContainerHooks(yamlString2);
|
const stringObject2 = ContainerHookService.ParseContainerHooks(yamlString2);
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ commands: echo "test"`;
|
|||||||
const getCustomStepsFromFiles = ContainerHookService.GetContainerHooksFromFiles(`before`);
|
const getCustomStepsFromFiles = ContainerHookService.GetContainerHooksFromFiles(`before`);
|
||||||
CloudRunnerLogger.log(JSON.stringify(getCustomStepsFromFiles, undefined, 4));
|
CloudRunnerLogger.log(JSON.stringify(getCustomStepsFromFiles, undefined, 4));
|
||||||
});
|
});
|
||||||
if (CloudRunnerOptions.cloudRunnerDebug && CloudRunnerOptions.providerStrategy !== `k8s`) {
|
if (CloudRunnerOptions.cloudRunnerDebug) {
|
||||||
it('Should be 1 before and 1 after hook', async () => {
|
it('Should be 1 before and 1 after hook', async () => {
|
||||||
const overrides = {
|
const overrides = {
|
||||||
versioning: 'None',
|
versioning: 'None',
|
||||||
|
@ -0,0 +1,42 @@
|
|||||||
|
import CloudRunner from '../../cloud-runner';
|
||||||
|
import { BuildParameters, ImageTag } from '../../..';
|
||||||
|
import UnityVersioning from '../../../unity-versioning';
|
||||||
|
import { Cli } from '../../../cli/cli';
|
||||||
|
import CloudRunnerLogger from '../../services/core/cloud-runner-logger';
|
||||||
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
import CloudRunnerOptions from '../../options/cloud-runner-options';
|
||||||
|
import setups from './../cloud-runner-suite.test';
|
||||||
|
|
||||||
|
async function CreateParameters(overrides: any) {
|
||||||
|
if (overrides) {
|
||||||
|
Cli.options = overrides;
|
||||||
|
}
|
||||||
|
|
||||||
|
return await BuildParameters.create();
|
||||||
|
}
|
||||||
|
|
||||||
|
describe('Cloud Runner RClone Hooks And Steps', () => {
|
||||||
|
it('Responds', () => {});
|
||||||
|
setups();
|
||||||
|
if (CloudRunnerOptions.cloudRunnerDebug) {
|
||||||
|
it('Run build with rclone steps', async () => {
|
||||||
|
const overrides = {
|
||||||
|
versioning: 'None',
|
||||||
|
projectPath: 'test-project',
|
||||||
|
unityVersion: UnityVersioning.determineUnityVersion('test-project', UnityVersioning.read('test-project')),
|
||||||
|
targetPlatform: 'StandaloneLinux64',
|
||||||
|
cacheKey: `test-case-${uuidv4()}`,
|
||||||
|
commandHookFiles: `rclone-pre-build`,
|
||||||
|
customJob: `
|
||||||
|
- name: 'step 1'
|
||||||
|
image: 'ubuntu'
|
||||||
|
commands: 'echo "my test"'
|
||||||
|
`,
|
||||||
|
};
|
||||||
|
const buildParameter2 = await CreateParameters(overrides);
|
||||||
|
const baseImage2 = new ImageTag(buildParameter2);
|
||||||
|
await CloudRunner.run(buildParameter2, baseImage2.toString());
|
||||||
|
CloudRunnerLogger.log(`rclone run succeeded`);
|
||||||
|
}, 1_000_000_000);
|
||||||
|
}
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user