@catladder/cli
Version:
Panter cli tool for cloud CI/CD and DevOps
25 lines (24 loc) • 838 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.openGoogleCloudRunDashboard = void 0;
const pipeline_1 = require("../../../../pipeline/src/index.js");
const openDashboard_1 = require("../openDashboard");
const openGoogleCloudRunDashboard = async (instance, context) => {
var _a;
if (!(0, pipeline_1.isOfDeployType)((_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config, "google-cloudrun")) {
throw new Error("deploy type is not google-cloudrun ");
}
const {
fullName
} = context.environment;
const {
region,
projectId
} = context.deploy.config;
await (0, openDashboard_1.openGoogleCloudDashboard)(instance, `run/detail/${region}/${fullName}/metrics`, {
project: projectId
});
};
exports.openGoogleCloudRunDashboard = openGoogleCloudRunDashboard;