apache / apache/openwhisk-wskdeploy

scope --param to action level inputs

Open
#922 0 comments 0 reactions 0 assignees View on GitHub
enhancement priority: medium
Dominant language
Go
Stars
75
Forks
73
PR merge metrics
No merged PRs in 30d

Description

With the introduction of `--param` on CLI, we can overwrite any input in the manifest/deployment file. We would like to introduce next level of granularity by introducing overwriting inputs at the action level. For example, when we have two actions with the same inputs, `--param` should somehow only overwrite input of one action and leave the other action as is.

```
packages:
helloworldapp:
actions:
hello1:
inputs:
name:
type: string
description: "your first name"
required: false
value: Amy
place:
type: string
description: "The city name"
required: false
value: Paris
code: |
function main(params) {
return {payload: 'Hello, ' + params.name + ' from ' + params.place};
}
runtime: nodejs:6
hello2:
inputs:
name:
type: string
description: "your first name"
required: false
value: Amy
place:
type: string
description: "The city name"
required: false
value: Paris
code: |
function main(params) {
return {payload: 'Hello, ' + params.name + ' from ' + params.place};
}
runtime: nodejs:6
```

Now, only overwrite `name` in action`hello1` using `--param` on CLI:

```
wskdeploy -m manifest.yaml --param hello1:name Bob
```

thoughts @csantanapr

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.