When creating an action, how do you set the environment variables for the container?
- Dominant language
- Scala
- Stars
- 6.8k
- Forks
- 1.2k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 2
Description
I am creating an action using Rust, and I found /bin/compile.py in the default image used by OpenWhisk, which is openwhisk/action-rust-v1.34:nightly. Upon inspecting the code, I noticed that the RELEASE environment variable must be set in os.environ for the compile option to use the release build. However, I don't know how to set this environment variable.
```
def build(tgt_dir):
# support RELEASE
cmd = ["cargo", "build"]
bin_dir = "debug"
if "RELEASE" in os.environ:
cmd += "--release"
bin_dir = "release"
```
How do I set this environment variable?
Contributor guide
Research direction
Start with /bin/compile.py in the action-rust-v1.34:nightly image and the OpenWhisk action configuration documentation. Determine where container environment variables are configured, then verify that setting RELEASE makes the Rust action use the release build. No test or other entry point is mentioned in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, rust
- Domain
- cloud
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100