Cleanup logging
parent
50173aa1e8
commit
4f8aef5354
|
|
@ -478,13 +478,13 @@ class AWSBaseStack {
|
||||||
if (stackExists) {
|
if (stackExists) {
|
||||||
cloud_runner_logger_1.default.log(`Base stack exists (version: ${stackVersion}, local version: ${parametersHash})`);
|
cloud_runner_logger_1.default.log(`Base stack exists (version: ${stackVersion}, local version: ${parametersHash})`);
|
||||||
if (parametersHash !== stackVersion) {
|
if (parametersHash !== stackVersion) {
|
||||||
cloud_runner_logger_1.default.log(`Skip Updating Disabled`);
|
cloud_runner_logger_1.default.log(`Attempting update of base stack`);
|
||||||
try {
|
try {
|
||||||
yield CF.updateStack(updateInput).promise();
|
yield CF.updateStack(updateInput).promise();
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
cloud_runner_logger_1.default.log(JSON.stringify(error, undefined, 4));
|
cloud_runner_logger_1.default.log(JSON.stringify(error, undefined, 4));
|
||||||
cloud_runner_logger_1.default.log(`Update Failed, Stack name: ${baseStackName}`);
|
cloud_runner_logger_1.default.log(`Update Failed, Stack name: ${baseStackName}, Continuing anyway`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -2854,25 +2854,6 @@ exports.EphemeralGitHubRunnerWorkflow = EphemeralGitHubRunnerWorkflow;
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
||||||
if (k2 === undefined) k2 = k;
|
|
||||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
||||||
}) : (function(o, m, k, k2) {
|
|
||||||
if (k2 === undefined) k2 = k;
|
|
||||||
o[k2] = m[k];
|
|
||||||
}));
|
|
||||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
||||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
||||||
}) : function(o, v) {
|
|
||||||
o["default"] = v;
|
|
||||||
});
|
|
||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
|
||||||
if (mod && mod.__esModule) return mod;
|
|
||||||
var result = {};
|
|
||||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
||||||
__setModuleDefault(result, mod);
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
|
|
@ -2889,7 +2870,6 @@ const cloud_runner_step_state_1 = __webpack_require__(64854);
|
||||||
const download_step_1 = __webpack_require__(10359);
|
const download_step_1 = __webpack_require__(10359);
|
||||||
const custom_workflow_1 = __webpack_require__(3786);
|
const custom_workflow_1 = __webpack_require__(3786);
|
||||||
const ephemeral_github_runner_workflow_1 = __webpack_require__(37092);
|
const ephemeral_github_runner_workflow_1 = __webpack_require__(37092);
|
||||||
const core = __importStar(__webpack_require__(42186));
|
|
||||||
const build_automation_workflow_1 = __webpack_require__(94655);
|
const build_automation_workflow_1 = __webpack_require__(94655);
|
||||||
class WorkflowCompositionRoot {
|
class WorkflowCompositionRoot {
|
||||||
run(cloudRunnerStepState) {
|
run(cloudRunnerStepState) {
|
||||||
|
|
@ -2905,8 +2885,6 @@ class WorkflowCompositionRoot {
|
||||||
static runJob(baseImage) {
|
static runJob(baseImage) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
try {
|
||||||
core.info(`Remote envs ${JSON.stringify(cloud_runner_state_1.CloudRunnerState.readBuildEnvironmentVariables(), undefined, 4)} Remote secrets ${JSON.stringify(cloud_runner_state_1.CloudRunnerState.defaultSecrets, undefined, 4)}`);
|
|
||||||
core.info(`Custom build steps: ${cloud_runner_state_1.CloudRunnerState.buildParams.customBuildSteps}`);
|
|
||||||
if (cloud_runner_state_1.CloudRunnerState.buildParams.customBuildSteps === '') {
|
if (cloud_runner_state_1.CloudRunnerState.buildParams.customBuildSteps === '') {
|
||||||
yield new build_automation_workflow_1.BuildAutomationWorkflow().run(new cloud_runner_step_state_1.CloudRunnerStepState(baseImage, cloud_runner_state_1.CloudRunnerState.readBuildEnvironmentVariables(), cloud_runner_state_1.CloudRunnerState.defaultSecrets));
|
yield new build_automation_workflow_1.BuildAutomationWorkflow().run(new cloud_runner_step_state_1.CloudRunnerStepState(baseImage, cloud_runner_state_1.CloudRunnerState.readBuildEnvironmentVariables(), cloud_runner_state_1.CloudRunnerState.defaultSecrets));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -71,12 +71,12 @@ export class AWSBaseStack {
|
||||||
if (stackExists) {
|
if (stackExists) {
|
||||||
CloudRunnerLogger.log(`Base stack exists (version: ${stackVersion}, local version: ${parametersHash})`);
|
CloudRunnerLogger.log(`Base stack exists (version: ${stackVersion}, local version: ${parametersHash})`);
|
||||||
if (parametersHash !== stackVersion) {
|
if (parametersHash !== stackVersion) {
|
||||||
CloudRunnerLogger.log(`Skip Updating Disabled`);
|
CloudRunnerLogger.log(`Attempting update of base stack`);
|
||||||
try {
|
try {
|
||||||
await CF.updateStack(updateInput).promise();
|
await CF.updateStack(updateInput).promise();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
CloudRunnerLogger.log(JSON.stringify(error, undefined, 4));
|
CloudRunnerLogger.log(JSON.stringify(error, undefined, 4));
|
||||||
CloudRunnerLogger.log(`Update Failed, Stack name: ${baseStackName}`);
|
CloudRunnerLogger.log(`Update Failed, Stack name: ${baseStackName}, Continuing anyway`);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
CloudRunnerLogger.log(`No update required`);
|
CloudRunnerLogger.log(`No update required`);
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import { DownloadStep } from '../steps/download-step';
|
||||||
import { CustomWorkflow } from './custom-workflow';
|
import { CustomWorkflow } from './custom-workflow';
|
||||||
import { EphemeralGitHubRunnerWorkflow } from './ephemeral-github-runner-workflow';
|
import { EphemeralGitHubRunnerWorkflow } from './ephemeral-github-runner-workflow';
|
||||||
import { WorkflowInterface } from './workflow-interface';
|
import { WorkflowInterface } from './workflow-interface';
|
||||||
import * as core from '@actions/core';
|
|
||||||
import { BuildAutomationWorkflow } from './build-automation-workflow';
|
import { BuildAutomationWorkflow } from './build-automation-workflow';
|
||||||
|
|
||||||
export class WorkflowCompositionRoot implements WorkflowInterface {
|
export class WorkflowCompositionRoot implements WorkflowInterface {
|
||||||
|
|
@ -18,14 +17,6 @@ export class WorkflowCompositionRoot implements WorkflowInterface {
|
||||||
|
|
||||||
private static async runJob(baseImage: any) {
|
private static async runJob(baseImage: any) {
|
||||||
try {
|
try {
|
||||||
core.info(
|
|
||||||
`Remote envs ${JSON.stringify(
|
|
||||||
CloudRunnerState.readBuildEnvironmentVariables(),
|
|
||||||
undefined,
|
|
||||||
4,
|
|
||||||
)} Remote secrets ${JSON.stringify(CloudRunnerState.defaultSecrets, undefined, 4)}`,
|
|
||||||
);
|
|
||||||
core.info(`Custom build steps: ${CloudRunnerState.buildParams.customBuildSteps}`);
|
|
||||||
if (CloudRunnerState.buildParams.customBuildSteps === '') {
|
if (CloudRunnerState.buildParams.customBuildSteps === '') {
|
||||||
await new BuildAutomationWorkflow().run(
|
await new BuildAutomationWorkflow().run(
|
||||||
new CloudRunnerStepState(
|
new CloudRunnerStepState(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue