ls ephemeral runner at start
parent
15c5de62c3
commit
7f2f4312ea
|
|
@ -1110,8 +1110,8 @@ const cloud_runner_logger_1 = __importDefault(__webpack_require__(22855));
|
||||||
const build_step_1 = __webpack_require__(91491);
|
const build_step_1 = __webpack_require__(91491);
|
||||||
const compression_step_1 = __webpack_require__(6400);
|
const compression_step_1 = __webpack_require__(6400);
|
||||||
const download_repository_step_1 = __webpack_require__(12929);
|
const download_repository_step_1 = __webpack_require__(12929);
|
||||||
const custom_step_1 = __webpack_require__(58079);
|
const custom_step_1 = __webpack_require__(14377);
|
||||||
const ephemeral_github_runner_step_1 = __webpack_require__(54135);
|
const ephemeral_github_runner_step_1 = __webpack_require__(23795);
|
||||||
const cloud_runner_step_state_1 = __webpack_require__(64854);
|
const cloud_runner_step_state_1 = __webpack_require__(64854);
|
||||||
class CloudRunner {
|
class CloudRunner {
|
||||||
static setup(buildParameters) {
|
static setup(buildParameters) {
|
||||||
|
|
@ -2292,52 +2292,6 @@ class CompressionStep {
|
||||||
exports.CompressionStep = CompressionStep;
|
exports.CompressionStep = CompressionStep;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 58079:
|
|
||||||
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
|
||||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
||||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
||||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
||||||
});
|
|
||||||
};
|
|
||||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
exports.CustomStep = void 0;
|
|
||||||
const cloud_runner_logger_1 = __importDefault(__webpack_require__(22855));
|
|
||||||
const cloud_runner_state_1 = __webpack_require__(70912);
|
|
||||||
const yaml_1 = __importDefault(__webpack_require__(13552));
|
|
||||||
class CustomStep {
|
|
||||||
static runCustomJob(buildSteps) {
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
cloud_runner_logger_1.default.log(`Cloud Runner is running in custom job mode`);
|
|
||||||
buildSteps = yaml_1.default.parse(buildSteps);
|
|
||||||
for (const step of buildSteps) {
|
|
||||||
const stepSecrets = step.secrets.map((x) => {
|
|
||||||
const secret = {
|
|
||||||
ParameterKey: x.name,
|
|
||||||
EnvironmentVariable: x.name,
|
|
||||||
ParameterValue: x.value,
|
|
||||||
};
|
|
||||||
return secret;
|
|
||||||
});
|
|
||||||
yield cloud_runner_state_1.CloudRunnerState.CloudRunnerProviderPlatform.runBuildTask(cloud_runner_state_1.CloudRunnerState.buildGuid, step['image'], step['commands'], `/${cloud_runner_state_1.CloudRunnerState.buildVolumeFolder}`, `/${cloud_runner_state_1.CloudRunnerState.buildVolumeFolder}`, cloud_runner_state_1.CloudRunnerState.defaultGitShaEnvironmentVariable, [...cloud_runner_state_1.CloudRunnerState.defaultSecrets, ...stepSecrets]);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
exports.CustomStep = CustomStep;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 12929:
|
/***/ 12929:
|
||||||
|
|
@ -2395,7 +2349,53 @@ exports.DownloadRepositoryStep = DownloadRepositoryStep;
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 54135:
|
/***/ 14377:
|
||||||
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||||
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||||
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||||
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||||
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
|
});
|
||||||
|
};
|
||||||
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||||
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
|
};
|
||||||
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
exports.CustomStep = void 0;
|
||||||
|
const cloud_runner_logger_1 = __importDefault(__webpack_require__(22855));
|
||||||
|
const cloud_runner_state_1 = __webpack_require__(70912);
|
||||||
|
const yaml_1 = __importDefault(__webpack_require__(13552));
|
||||||
|
class CustomStep {
|
||||||
|
static runCustomJob(buildSteps) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
cloud_runner_logger_1.default.log(`Cloud Runner is running in custom job mode`);
|
||||||
|
buildSteps = yaml_1.default.parse(buildSteps);
|
||||||
|
for (const step of buildSteps) {
|
||||||
|
const stepSecrets = step.secrets.map((x) => {
|
||||||
|
const secret = {
|
||||||
|
ParameterKey: x.name,
|
||||||
|
EnvironmentVariable: x.name,
|
||||||
|
ParameterValue: x.value,
|
||||||
|
};
|
||||||
|
return secret;
|
||||||
|
});
|
||||||
|
yield cloud_runner_state_1.CloudRunnerState.CloudRunnerProviderPlatform.runBuildTask(cloud_runner_state_1.CloudRunnerState.buildGuid, step['image'], step['commands'], `/${cloud_runner_state_1.CloudRunnerState.buildVolumeFolder}`, `/${cloud_runner_state_1.CloudRunnerState.buildVolumeFolder}`, cloud_runner_state_1.CloudRunnerState.defaultGitShaEnvironmentVariable, [...cloud_runner_state_1.CloudRunnerState.defaultSecrets, ...stepSecrets]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.CustomStep = CustomStep;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 23795:
|
||||||
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
@ -2426,7 +2426,7 @@ class EphemeralGitHubRunnerStep {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
cloud_runner_logger_1.default.log(`Cloud Runner is running in ephemeral GitHub runner mode`);
|
cloud_runner_logger_1.default.log(`Cloud Runner is running in ephemeral GitHub runner mode`);
|
||||||
const installAndStartRunner = 'ls && mkdir actions-runner && cd actions-runner && curl -O -L https://github.com/actions/runner/releases/download/v2.283.1/actions-runner-linux-x64-2.283.1.tar.gz && tar xzf ./actions-runner-linux-x64-2.283.1.tar.gz';
|
const installAndStartRunner = 'ls && mkdir actions-runner && cd actions-runner && curl -O -L https://github.com/actions/runner/releases/download/v2.283.1/actions-runner-linux-x64-2.283.1.tar.gz && tar xzf ./actions-runner-linux-x64-2.283.1.tar.gz';
|
||||||
yield cloud_runner_state_1.CloudRunnerState.CloudRunnerProviderPlatform.runBuildTask(cloud_runner_state_1.CloudRunnerState.buildGuid, image, [installAndStartRunner], `/runner`, `/runner`, environmentVariables, secrets);
|
yield cloud_runner_state_1.CloudRunnerState.CloudRunnerProviderPlatform.runBuildTask(cloud_runner_state_1.CloudRunnerState.buildGuid, image, [installAndStartRunner], `../runner`, `../runner`, environmentVariables, secrets);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -8,8 +8,8 @@ import CloudRunnerLogger from './services/cloud-runner-logger';
|
||||||
import { BuildStep } from './steps/build-step';
|
import { BuildStep } from './steps/build-step';
|
||||||
import { CompressionStep } from './steps/compression-step';
|
import { CompressionStep } from './steps/compression-step';
|
||||||
import { DownloadRepositoryStep } from './steps/download-repository-step';
|
import { DownloadRepositoryStep } from './steps/download-repository-step';
|
||||||
import { CustomStep } from './steps/custom-step';
|
import { CustomStep } from './workflows/custom-step';
|
||||||
import { EphemeralGitHubRunnerStep } from './steps/ephemeral-github-runner-step';
|
import { EphemeralGitHubRunnerStep } from './workflows/ephemeral-github-runner-step';
|
||||||
import { CloudRunnerStepState } from './state/cloud-runner-step-state';
|
import { CloudRunnerStepState } from './state/cloud-runner-step-state';
|
||||||
|
|
||||||
class CloudRunner {
|
class CloudRunner {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import CloudRunnerLogger from '../services/cloud-runner-logger';
|
||||||
import CloudRunnerSecret from '../services/cloud-runner-secret';
|
import CloudRunnerSecret from '../services/cloud-runner-secret';
|
||||||
import { CloudRunnerState } from '../state/cloud-runner-state';
|
import { CloudRunnerState } from '../state/cloud-runner-state';
|
||||||
import { CloudRunnerStepState } from '../state/cloud-runner-step-state';
|
import { CloudRunnerStepState } from '../state/cloud-runner-step-state';
|
||||||
import { StandardStepInterface } from './standard-step-interface';
|
import { StandardStepInterface } from '../steps/standard-step-interface';
|
||||||
|
|
||||||
export class EphemeralGitHubRunnerStep implements StandardStepInterface {
|
export class EphemeralGitHubRunnerStep implements StandardStepInterface {
|
||||||
async run(cloudRunnerStepState: CloudRunnerStepState) {
|
async run(cloudRunnerStepState: CloudRunnerStepState) {
|
||||||
|
|
@ -26,8 +26,8 @@ export class EphemeralGitHubRunnerStep implements StandardStepInterface {
|
||||||
CloudRunnerState.buildGuid,
|
CloudRunnerState.buildGuid,
|
||||||
image,
|
image,
|
||||||
[installAndStartRunner],
|
[installAndStartRunner],
|
||||||
`/runner`,
|
`../runner`,
|
||||||
`/runner`,
|
`../runner`,
|
||||||
environmentVariables,
|
environmentVariables,
|
||||||
secrets,
|
secrets,
|
||||||
);
|
);
|
||||||
Loading…
Reference in New Issue