Skip to content

Commit

Permalink
Pass deploy params to status check command
Browse files Browse the repository at this point in the history
  • Loading branch information
fmarek-kindred committed Dec 17, 2024
1 parent 167cb68 commit 1c6950f
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions brownie/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion brownie/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "brownie",
"version": "1.4.2-dev",
"version": "1.5.0",
"description": "The resource cleanup application of PIT toolkit",
"type": "module",
"main": "dist/index.js",
Expand Down
36 changes: 18 additions & 18 deletions k8s-deployer/src/deployer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,29 +90,29 @@ export const deployApplication = async (
options?: DeployOptions) => {
await isExecutable(`${ appDirectory }/${ instructions.command }`)

const fnCmdWithParams = (cmd: string, pitfileParams?: Array<string>, deployOptions?: DeployOptions) => {
let result = cmd
const allParams = new Array()
// first pass params delcared in the pitfile
if (pitfileParams) {
pitfileParams.forEach(v => allParams.push(v))
}
// then pass additional params computed by deployer
if (deployOptions?.deployerParams) {
deployOptions.deployerParams.forEach(v => allParams.push(v))
}
for (let param of allParams) {
result = `${result} ${param}`
}

return result
}

try {
// Invoke deployment script
logger.info("Invoking: '%s/%s'", appDirectory, instructions.command)
let command = instructions.command
if (options?.namespace) command = `${ command } ${ options.namespace }`

const fnCmdWithParams = (cmd: string, pitfileParams?: Array<string>, deployOptions?: DeployOptions) => {
let result = cmd
const allParams = new Array()
// first pass params delcared in the pitfile
if (pitfileParams) {
pitfileParams.forEach(v => allParams.push(v))
}
// then pass additional params computed by deployer
if (deployOptions?.deployerParams) {
deployOptions.deployerParams.forEach(v => allParams.push(v))
}
for (let param of allParams) {
result = `${result} ${param}`
}

return result
}

command = fnCmdWithParams(command, instructions.params, options)

Expand Down
4 changes: 2 additions & 2 deletions lock-manager/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lock-manager/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lock-manager",
"version": "1.4.2-dev",
"version": "1.5.0",
"description": "The lock manager application of PIT toolkit",
"type": "module",
"main": "dist/index.js",
Expand Down

0 comments on commit 1c6950f

Please sign in to comment.