Open brianharwell opened 2 years ago
Hey @brianharwell we need to make this logging message more concrete. We are expecting this to be an environment variable not an input. If you specify it as an env var this should work.
I have the same problem and although I have added "skip_deploy_on_missing_secrets" as an environment variable (I just added it in the variables configuration), I still get the error "_The deployment_token is required for deploying content. If you'd like to continue the run without deployment, add the configuration skip_deploy_on_missingsecrets set to true in your deployment configuration file". All I want is the single page application we have to only build in the build pipeline and then in the release pipeline to not build it, but deploy it - in the same way we do it with our Azure Function Apps. I get this behavior either when I use a YAML or use the "deploy azure static web app [preview]" task... note: running on ubuntu latest. I am also not sure if I have set the environment variable correctly though - so help on how to make sure it is set would be very appreciated...
All I want is the single page application we have to only build in the build pipeline and then in the release pipeline to not build it, but deploy it - in the same way we do it with our Azure Function Apps.
That's exactly what I am trying to do
@kareldeman can you share your updated workflow file? Assuming DevOps as well based on the above.
Here is the YAML for the Static Web App (which is in preview) task I added:
steps:
- task: AzureStaticWebApp@0
displayName: 'Static Web App: '
inputs:
workingDirectory: '$(System.DefaultWorkingDirectory)/_FE_Client'
app_location: /MVP
app_build_command: 'npm run build -- web'
output_location: dist/apps/web
skip_app_build: false
verbose: false
Notice I did not provide the $(deployment_token) as I don't want the above to deploy. I added the "skip_deploy_on_missing_secrets" to the Pipeline variables and set it to true:
In the Initialize Job I can see the "skip_deploy_on_missing_secrets" in the "environment variables available are below" section:
With the above, I still get the following error:
I get the same issue today. Had you guys resolved it @kareldeman @brianharwell ?
There's not much info on the internet about this parameter. However, at least Dapr docs suggest that it should work, and I doubt they'd put it in their docs if it didn't (here).
Sure enough, I had problems getting it working as well.
One thing to notice there is that Dapr docs actually show a GitHub Action, and they work a little bit differently than Azure CICD YAML Pipelines, which I was using.
@miwebst hinted that this magic undocumented parameter should be passed as an environment variable.
I was passing it as an input
. So I tried setting it as ENV and it worked!
- task: AzureStaticWebApp@0
inputs:
app_location: ...blahblahblah
....
#skip_deploy_on_missing_secrets: true
# ABOVE: this one is documented in few places, but it's expected to be a ENV var!
#see https://github.com/Azure/static-web-apps/issues/679
env:
SKIP_DEPLOY_ON_MISSING_SECRETS: true
Maybe GitHubActions forward these params to envs automatically?
@kareldeman I noticed in your snippet that you don't define env
and that you're counting on passinv env values from a different source. Could you try out adding env
part like I pasted above?
Describe the bug
A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
Here is the error