custom steps may leave value undefined, will be pulled from env vars
parent
3d0a8417bb
commit
37fbf7b8ae
|
|
@ -4449,7 +4449,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.CustomStep = exports.CloudRunnerCustomSteps = void 0;
|
||||
exports.CloudRunnerCustomSteps = void 0;
|
||||
const yaml_1 = __importDefault(__nccwpck_require__(44603));
|
||||
const cloud_runner_1 = __importDefault(__nccwpck_require__(79144));
|
||||
const core = __importStar(__nccwpck_require__(42186));
|
||||
|
|
@ -4574,7 +4574,7 @@ class CloudRunnerCustomSteps {
|
|||
});
|
||||
}
|
||||
static ParseSteps(steps) {
|
||||
var _a;
|
||||
var _a, _b;
|
||||
if (steps === '') {
|
||||
return [];
|
||||
}
|
||||
|
|
@ -4594,7 +4594,10 @@ class CloudRunnerCustomSteps {
|
|||
else {
|
||||
for (const secret of step.secrets) {
|
||||
if (secret.ParameterValue === undefined && process.env[secret.EnvironmentVariable] !== undefined) {
|
||||
secret.ParameterValue === process.env[secret.EnvironmentVariable];
|
||||
if ((_b = cloud_runner_1.default.buildParameters) === null || _b === void 0 ? void 0 : _b.cloudRunnerDebug) {
|
||||
cloud_runner_logger_1.default.log(`Injecting custom step ${step.name} from env var ${secret.ParameterKey}`);
|
||||
}
|
||||
secret.ParameterValue === process.env[secret.ParameterKey];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -4643,13 +4646,6 @@ class CloudRunnerCustomSteps {
|
|||
}
|
||||
}
|
||||
exports.CloudRunnerCustomSteps = CloudRunnerCustomSteps;
|
||||
class CustomStep {
|
||||
constructor() {
|
||||
this.secrets = new Array();
|
||||
this.image = `ubuntu`;
|
||||
}
|
||||
}
|
||||
exports.CustomStep = CustomStep;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,4 @@
|
|||
import YAML from 'yaml';
|
||||
import CloudRunnerSecret from './cloud-runner-secret';
|
||||
import CloudRunner from '../cloud-runner';
|
||||
import * as core from '@actions/core';
|
||||
import { CustomWorkflow } from '../workflows/custom-workflow';
|
||||
|
|
@ -9,6 +8,7 @@ import * as fs from 'fs';
|
|||
import Input from '../../input';
|
||||
import CloudRunnerOptions from '../cloud-runner-options';
|
||||
import CloudRunnerLogger from './cloud-runner-logger';
|
||||
import { CustomStep } from './custom-step';
|
||||
|
||||
export class CloudRunnerCustomSteps {
|
||||
static GetCustomStepsFromFiles(hookLifecycle: string): CustomStep[] {
|
||||
|
|
@ -153,7 +153,10 @@ export class CloudRunnerCustomSteps {
|
|||
} else {
|
||||
for (const secret of step.secrets) {
|
||||
if (secret.ParameterValue === undefined && process.env[secret.EnvironmentVariable] !== undefined) {
|
||||
secret.ParameterValue === process.env[secret.EnvironmentVariable];
|
||||
if (CloudRunner.buildParameters?.cloudRunnerDebug) {
|
||||
CloudRunnerLogger.log(`Injecting custom step ${step.name} from env var ${secret.ParameterKey}`);
|
||||
}
|
||||
secret.ParameterValue === process.env[secret.ParameterKey];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -207,10 +210,3 @@ export class CloudRunnerCustomSteps {
|
|||
return output;
|
||||
}
|
||||
}
|
||||
export class CustomStep {
|
||||
public commands;
|
||||
public secrets: CloudRunnerSecret[] = new Array<CloudRunnerSecret>();
|
||||
public name;
|
||||
public image: string = `ubuntu`;
|
||||
public hook!: string;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
import CloudRunnerSecret from './cloud-runner-secret';
|
||||
|
||||
export class CustomStep {
|
||||
public commands;
|
||||
public secrets: CloudRunnerSecret[] = new Array<CloudRunnerSecret>();
|
||||
public name;
|
||||
public image: string = `ubuntu`;
|
||||
public hook!: string;
|
||||
}
|
||||
|
|
@ -2,7 +2,8 @@ import CloudRunnerLogger from '../services/cloud-runner-logger';
|
|||
import CloudRunnerSecret from '../services/cloud-runner-secret';
|
||||
import { CloudRunnerFolders } from '../services/cloud-runner-folders';
|
||||
import CloudRunnerEnvironmentVariable from '../services/cloud-runner-environment-variable';
|
||||
import { CloudRunnerCustomSteps, CustomStep } from '../services/cloud-runner-custom-steps';
|
||||
import { CloudRunnerCustomSteps } from '../services/cloud-runner-custom-steps';
|
||||
import { CustomStep } from '../services/custom-step';
|
||||
import CloudRunner from '../cloud-runner';
|
||||
|
||||
export class CustomWorkflow {
|
||||
|
|
|
|||
Loading…
Reference in New Issue