Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
TamimiGitHub committed Apr 4, 2024
1 parent d5f5b2e commit fb7f160
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27252,12 +27252,13 @@ class EventPortal {
async getApplicationDeploymentPlan({
applicationVersionId = null,
eventBrokerId = null,
action = null
} = {} ) {
try{
if (applicationVersionId == null | eventBrokerId == null) throw new Error("Application Version ID AND Event Broker IDs must be defined")
if (applicationVersionId == null | eventBrokerId == null | action == null) throw new Error("Application Version ID, Action, AND Event Broker IDs must be defined")
let params = {}
let data = {
action: "deploy",
action: action,
applicationVersionId: applicationVersionId,
eventBrokerId: eventBrokerId
}
Expand All @@ -27273,12 +27274,13 @@ class EventPortal {
async createApplicationDeployment({
applicationVersionId = null,
eventBrokerId = null,
action = null
} = {} ) {
try{
if (applicationVersionId == null | eventBrokerId == null) throw new Error("Application Version ID AND Event Broker IDs must be defined")
if (applicationVersionId == null | eventBrokerId == null | action == null) throw new Error("Application Version ID, Action, AND Event Broker IDs must be defined")
let params = {}
let data = {
action: "deploy",
action: action,
applicationVersionId: applicationVersionId,
eventBrokerId: eventBrokerId
}
Expand Down Expand Up @@ -33601,6 +33603,7 @@ async function configPush() {
const APPLICATION_VERSION_ID = core.getInput('APPLICATION_VERSION_ID')
const EVENT_MESH_NAME = core.getInput('EVENT_MESH_NAME')
const PREVIEW_ONLY = core.getInput('PREVIEW_ONLY')
const ACTION = core.getInput('ACTION').toLowerCase()

// Get event mesh object
let {data: mesh} = await ep.getEventMeshes({
Expand All @@ -33615,17 +33618,18 @@ async function configPush() {
// Get Preview Application Deployment Plan
if (PREVIEW_ONLY != "false") {
let plan = await ep.getApplicationDeploymentPlan({
action: ACTION,
applicationVersionId: APPLICATION_VERSION_ID,
eventBrokerId: messagingService[0].id
})
core.setOutput("deployment_plan", JSON.stringify(plan, null, 2));
} else {
// Create Application Deployment
let deployment_result = await ep.createApplicationDeployment({
await ep.createApplicationDeployment({
action: ACTION,
applicationVersionId: APPLICATION_VERSION_ID,
eventBrokerId: [messagingService[0].id]
eventBrokerId: messagingService[0].id
})
core.setOutput("deployment_plan", JSON.stringify(deployment_result, null, 2));
}
} catch (error) {
core.setFailed(error.message);
Expand Down

0 comments on commit fb7f160

Please sign in to comment.