diff --git a/apps/koku-ui-hccm/package.json b/apps/koku-ui-hccm/package.json index c9767a3fc..0d44ff194 100644 --- a/apps/koku-ui-hccm/package.json +++ b/apps/koku-ui-hccm/package.json @@ -12,6 +12,10 @@ "npm": ">=11.6.2" }, "scripts": { + "branch:deploy:stage": "sh ../../scripts/branch-deploy.sh -s", + "branch:deploy:prod": "sh ../../scripts/branch-deploy.sh -p", + "branch:merge:stage": "sh ../../scripts/branch-merge.sh -s", + "branch:merge:prod": "sh ../../scripts/branch-merge.sh -p", "build": "npm run build:prod", "build:prod": "fec build", "check:dependencies": "npx npm-check-updates", @@ -19,13 +23,9 @@ "check:messages": "sh scripts/unused-messages.sh", "clean": "rimraf dist .cache .swc", "codemods": "npx @patternfly/pf-codemods@latest src", - "deploy:stage": "sh ../../scripts/deploy-branch.sh -s", - "deploy:prod": "sh ../../scripts/deploy-branch.sh -p", "lint": "npm-run-all lint:*", "lint:ts": "eslint src", "lint:ts:fix": "eslint src --fix", - "merge:stage": "sh ../../scripts/merge-branch.sh -s", - "merge:prod": "sh ../../scripts/merge-branch.sh -p", "patch:hosts": "fec patch-etc-hosts", "postinstall": "ts-patch install && rm -rf .cache", "start": "fec dev", @@ -54,10 +54,10 @@ "ts-node": "ts-node -O '{\"module\":\"commonjs\"}'" }, "scripts-info": { - "deploy:stage": "Creates an MR to deploy app-interface with latest SHA ref from stage-hccm branch", - "deploy:prod": "Creates an MR to deploy app-interface with latest SHA ref from prod-hccm branch", - "merge:stage": "Creates a PR to merge main to the stage-hccm branch", - "merge:prod": "Creates a PR to merge stage-hccm to the prod-hccm branch", + "branch:deploy:stage": "Creates an MR to deploy app-interface with latest SHA ref from stage-hccm branch", + "branch:deploy:prod": "Creates an MR to deploy app-interface with latest SHA ref from prod-hccm branch", + "branch:merge:stage": "Creates a PR to merge main to the stage-hccm branch", + "branch:merge:prod": "Creates a PR to merge stage-hccm to the prod-hccm branch", "start": "Run Koku UI", "start:csb": "Run Koku UI with local Cloud Services Backend", "start:csb:ros": "Run Koku UI with local Cloud Services Backend, while ROS runs statically (for running both UIs with CSB)", diff --git a/apps/koku-ui-ros/package.json b/apps/koku-ui-ros/package.json index 4334a1fe9..cb3ef9b4c 100644 --- a/apps/koku-ui-ros/package.json +++ b/apps/koku-ui-ros/package.json @@ -12,6 +12,10 @@ "npm": ">=11.6.2" }, "scripts": { + "branch:deploy:stage": "sh ../../scripts/branch-deploy.sh -q", + "branch:deploy:prod": "sh ../../scripts/branch-deploy.sh -r", + "branch:merge:stage": "sh ../../scripts/branch-merge.sh -q", + "branch:merge:prod": "sh ../../scripts/branch-merge.sh -r", "build": "npm run build:prod", "build:prod": "fec build", "check:dependencies": "npx npm-check-updates", @@ -19,13 +23,9 @@ "check:messages": "sh scripts/unused-messages.sh", "clean": "rimraf dist .cache", "codemods": "npx @patternfly/pf-codemods@latest src", - "deploy:stage": "sh ../../scripts/deploy-branch.sh -q", - "deploy:prod": "sh ../../scripts/deploy-branch.sh -r", "lint": "npm-run-all lint:*", "lint:ts": "eslint src", "lint:ts:fix": "eslint src --fix", - "merge:stage": "sh ../../scripts/merge-branch.sh -q", - "merge:prod": "sh ../../scripts/merge-branch.sh -r", "patch:hosts": "fec patch-etc-hosts", "postinstall": "ts-patch install && rm -rf .cache", "start": "fec dev", @@ -51,10 +51,10 @@ "ts-node": "ts-node -O '{\"module\":\"commonjs\"}'" }, "scripts-info": { - "deploy:stage": "Creates an MR to deploy app-interface with latest SHA ref from stage-ros branch", - "deploy:prod": "Creates an MR to deploy app-interface with latest SHA ref from prod-ros branch", - "merge:stage": "Creates a PR to merge main to the stage-ros branch", - "merge:prod": "Creates a PR to merge stage-ros to the prod-ros branch", + "branch:deploy:stage": "Creates an MR to deploy app-interface with latest SHA ref from stage-ros branch", + "branch:deploy:prod": "Creates an MR to deploy app-interface with latest SHA ref from prod-ros branch", + "branch:merge:stage": "Creates a PR to merge main to the stage-ros branch", + "branch:merge:prod": "Creates a PR to merge stage-ros to the prod-ros branch", "start": "Run ROS UI", "start:csb": "Run ROS UI with local Cloud Services Backend", "start:ephemeral": "Run ROS UI with ephemeral env", diff --git a/package.json b/package.json index 309ace980..e1750b8ce 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "./libs/*" ], "scripts": { + "branch:release": "node scripts/branch-release.js", "build": "npm exec --workspaces -- npm run build", "build:onprem": "npm run -w @koku-ui/koku-ui-ros build:onprem && npm run -w @koku-ui/koku-ui-hccm build:onprem && npm run -w @koku-ui/koku-ui-onprem build", "check:dependencies": "npx npm-check-updates", @@ -27,15 +28,14 @@ "lint": "npm exec --workspaces -- npm run lint", "lint:fix": "npm exec --workspaces -- npm run lint:ts:fix", "test": "npm exec --workspaces -- npm run test --", - "release": "node scripts/release.js", "start:hccm": "npm run -w @koku-ui/koku-ui-hccm start", "start:ros": "npm run -w @koku-ui/koku-ui-ros start", "start:onprem": "concurrently -k --names \"HOST,HCCM,ROS\" --prefix-colors \"yellow,cyan,magenta\" \"npm run -w @koku-ui/koku-ui-onprem start\" \"npm run -w @koku-ui/koku-ui-hccm start:onprem\" \"npm run -w @koku-ui/koku-ui-ros start:onprem\"" }, "scripts-info": { + "branch:release": "Used to merge stage/prod branches and deploy app-interface with the latest SHA refs from same branches", "check:dependencies": "Checks for outdated dependencies", "check:dependencies:all": "Checks for outdated dependencies in each workspace", - "release": "Used to merge stage/prod branches and deploy app-interface with the latest SHA refs from same branches", "start:hccm": "Run Koku UI", "start:ros": "Run ROS UI", "start:onprem": "Run onprem UI" diff --git a/scripts/deploy-branch.sh b/scripts/branch-deploy.sh similarity index 100% rename from scripts/deploy-branch.sh rename to scripts/branch-deploy.sh diff --git a/scripts/merge-branch.sh b/scripts/branch-merge.sh similarity index 100% rename from scripts/merge-branch.sh rename to scripts/branch-merge.sh diff --git a/scripts/release.js b/scripts/branch-release.js similarity index 96% rename from scripts/release.js rename to scripts/branch-release.js index f1edbc158..fde4c63a5 100644 --- a/scripts/release.js +++ b/scripts/branch-release.js @@ -91,7 +91,7 @@ async function run() { allArgs.push('-x'); } - allArgs.push(process.env.APP_INTERFACE === 'true' ? 'deploy-branch.sh' : 'merge-branch.sh'); + allArgs.push(process.env.APP_INTERFACE === 'true' ? 'branch-deploy.sh' : 'branch-merge.sh'); const argVars = ['HCCM_STAGE_ARG', 'HCCM_PROD_ARG', 'ROS_STAGE_ARG', 'ROS_PROD_ARG']; const deploymentArgs = argVars.map(v => process.env[v]).filter(Boolean);