Azure / Azure/static-web-apps-cli
swa deploy fails in Bazel
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 668
- Forks
- 155
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
I am trying to move the swa deploy command to Bazel. But I consistently get an unknown error.
Everything works without Bazel.
I suppose it could be related to the strict path to binary folders. But I am not fully sure about it.
It looks like the issue happens during creating a child process.
To Reproduce
- Setup calling
swa clias binary in Bazel config. Like this:
swa_bin.swa_binary(
name = "release",
args = ["deploy"],
data = ["/.out"],
env = {
"SWA_CLI_OUTPUT_LOCATION": "./out",
"SWA_CLI_DEPLOY_ENV": "production",
},
chdir = native.package_name(),
)
- Call
bazel run release
Screenshots
With Bazel:
Without:
Desktop (please complete the following information):
- OS: MacOS
- Version 14.5
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided Bazel target with bazel run release, then compare its output with a direct swa deploy run on macOS. Trace the child-process failure and the strict binary-path or working-directory behavior; done means the same deployment succeeds through Bazel without the unknown error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, typescript
- Domain
- build-system, cli, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100