Caching cleanup
parent
3cf63d5ffa
commit
26e4298f41
|
|
@ -811,8 +811,6 @@ const lfs_hashing_1 = __webpack_require__(47011);
|
||||||
const cloud_runner_agent_system_1 = __webpack_require__(87685);
|
const cloud_runner_agent_system_1 = __webpack_require__(87685);
|
||||||
const __1 = __webpack_require__(41359);
|
const __1 = __webpack_require__(41359);
|
||||||
const remote_client_logger_1 = __webpack_require__(68972);
|
const remote_client_logger_1 = __webpack_require__(68972);
|
||||||
const console_1 = __webpack_require__(57082);
|
|
||||||
const path_1 = __importDefault(__webpack_require__(85622));
|
|
||||||
class SetupCloudRunnerRepository {
|
class SetupCloudRunnerRepository {
|
||||||
static run() {
|
static run() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
|
@ -839,12 +837,11 @@ class SetupCloudRunnerRepository {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
try {
|
||||||
remote_client_logger_1.RemoteClientLogger.log(`Initializing source repository for cloning with caching of LFS files`);
|
remote_client_logger_1.RemoteClientLogger.log(`Initializing source repository for cloning with caching of LFS files`);
|
||||||
process.chdir(path_1.default.join(cloud_runner_state_1.CloudRunnerState.repoPathFull, `..`));
|
process.chdir(cloud_runner_state_1.CloudRunnerState.repoPathFull);
|
||||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`git config --global advice.detachedHead false`);
|
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`git config --global advice.detachedHead false`);
|
||||||
remote_client_logger_1.RemoteClientLogger.log(`Cloning the repository being built:`);
|
remote_client_logger_1.RemoteClientLogger.log(`Cloning the repository being built:`);
|
||||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`git lfs install --skip-smudge`);
|
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`git lfs install --skip-smudge`);
|
||||||
console_1.assert(!fs_1.default.existsSync(cloud_runner_state_1.CloudRunnerState.repoPathFull));
|
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`git clone ${cloud_runner_state_1.CloudRunnerState.targetBuildRepoUrl}`);
|
||||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`git clone ${cloud_runner_state_1.CloudRunnerState.targetBuildRepoUrl} ${path_1.default.basename(cloud_runner_state_1.CloudRunnerState.repoPathFull)}`);
|
|
||||||
if (__1.Input.cloudRunnerTests) {
|
if (__1.Input.cloudRunnerTests) {
|
||||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`ls -lh`);
|
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`ls -lh`);
|
||||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`tree`);
|
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`tree`);
|
||||||
|
|
@ -2647,8 +2644,10 @@ class CloudRunnerLogger {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
static Shutdown() {
|
static Shutdown() {
|
||||||
|
if (CloudRunnerLogger.child) {
|
||||||
CloudRunnerLogger.child.kill(0);
|
CloudRunnerLogger.child.kill(0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
CloudRunnerLogger.logsFile = process.env.GCP_LOG_FILE || '';
|
CloudRunnerLogger.logsFile = process.env.GCP_LOG_FILE || '';
|
||||||
exports.default = CloudRunnerLogger;
|
exports.default = CloudRunnerLogger;
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -5,8 +5,6 @@ import { LFSHashing } from './lfs-hashing';
|
||||||
import { CloudRunnerAgentSystem } from './cloud-runner-agent-system';
|
import { CloudRunnerAgentSystem } from './cloud-runner-agent-system';
|
||||||
import { Input } from '../..';
|
import { Input } from '../..';
|
||||||
import { RemoteClientLogger } from './remote-client-logger';
|
import { RemoteClientLogger } from './remote-client-logger';
|
||||||
import { assert } from 'console';
|
|
||||||
import path from 'path';
|
|
||||||
|
|
||||||
export class SetupCloudRunnerRepository {
|
export class SetupCloudRunnerRepository {
|
||||||
public static async run() {
|
public static async run() {
|
||||||
|
|
@ -40,14 +38,11 @@ export class SetupCloudRunnerRepository {
|
||||||
private static async cloneRepoWithoutLFSFiles() {
|
private static async cloneRepoWithoutLFSFiles() {
|
||||||
try {
|
try {
|
||||||
RemoteClientLogger.log(`Initializing source repository for cloning with caching of LFS files`);
|
RemoteClientLogger.log(`Initializing source repository for cloning with caching of LFS files`);
|
||||||
process.chdir(path.join(CloudRunnerState.repoPathFull, `..`));
|
process.chdir(CloudRunnerState.repoPathFull);
|
||||||
await CloudRunnerAgentSystem.Run(`git config --global advice.detachedHead false`);
|
await CloudRunnerAgentSystem.Run(`git config --global advice.detachedHead false`);
|
||||||
RemoteClientLogger.log(`Cloning the repository being built:`);
|
RemoteClientLogger.log(`Cloning the repository being built:`);
|
||||||
await CloudRunnerAgentSystem.Run(`git lfs install --skip-smudge`);
|
await CloudRunnerAgentSystem.Run(`git lfs install --skip-smudge`);
|
||||||
assert(!fs.existsSync(CloudRunnerState.repoPathFull));
|
await CloudRunnerAgentSystem.Run(`git clone ${CloudRunnerState.targetBuildRepoUrl}`);
|
||||||
await CloudRunnerAgentSystem.Run(
|
|
||||||
`git clone ${CloudRunnerState.targetBuildRepoUrl} ${path.basename(CloudRunnerState.repoPathFull)}`,
|
|
||||||
);
|
|
||||||
if (Input.cloudRunnerTests) {
|
if (Input.cloudRunnerTests) {
|
||||||
await CloudRunnerAgentSystem.Run(`ls -lh`);
|
await CloudRunnerAgentSystem.Run(`ls -lh`);
|
||||||
await CloudRunnerAgentSystem.Run(`tree`);
|
await CloudRunnerAgentSystem.Run(`tree`);
|
||||||
|
|
|
||||||
|
|
@ -76,8 +76,10 @@ class CloudRunnerLogger {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
public static Shutdown() {
|
public static Shutdown() {
|
||||||
|
if (CloudRunnerLogger.child) {
|
||||||
CloudRunnerLogger.child.kill(0);
|
CloudRunnerLogger.child.kill(0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
private static child: ChildProcess;
|
private static child: ChildProcess;
|
||||||
}
|
}
|
||||||
export default CloudRunnerLogger;
|
export default CloudRunnerLogger;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue