Open Tyngstast opened 2 years ago
Okey, so I tried node:lts-bullseye-slim
, node:lts-buster
and node:lts-bullseye
and the unexpected behavior only occurs on -slim
distros. Not sure why, but it works fine on both regular bullseye
and buster
.
Hey @Tyngstast , if you're using the Gitlab for deploying the Static Web App, we have the CI/CD support for doing that here . Please check if this helps, meanwhile we'll also investigate why you're facing this issue.
I've just encountered another problem, which manifested the same way, though.
Generally, there is a bug with how JS wrapper spawns native binary and hides underlying errors, so it is difficult to see what exactly is going on. Interestingly, process only exits immediately after "Preparing deployment. Please wait..." in non-interactive mode, while in interactive mode it will just keep spinning forever.
@Tyngstast, as for the actual problem you have with -slim
images, I believe the hidden error can be fixed by setting DOTNET_SYSTEM_GLOBALIZATION_INVARIANT
to 1
before call to swa
.
My own problem, if anyone is interested, though, was that the native binary that swa
downloads is x64
, so does not work inside arm
image. Looks like there is currently no mention of platform architecture dependence in the docs.
And with -alpine
the problem is due to musl
use, but I'm surprised @Tyngstast got a real error, as I observe exactly the same behavior as with any other binary compat problems.
We observed the problem on a GitHub self-hosted runner as well.
Runner version: v2.292.0 Runner env:
$ uname -a
Linux github-runner-1cee68b414 5.15.0-1012-azure #15-Ubuntu SMP Fri Jun 10 11:30:26 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
$ node -v
v16.15.1
github-ci.yml
deploy:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Deploy
run: |
npm install -g @azure/static-web-apps-cli
swa deploy ./dist -d $API_TOKEN -w ./ --env production
We observed the problem on a GitHub self-hosted runner as well.
Runner version: v2.292.0 Runner env:
$ uname -a Linux github-runner-1cee68b414 5.15.0-1012-azure #15-Ubuntu SMP Fri Jun 10 11:30:26 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux $ node -v v16.15.1
github-ci.yml
deploy: runs-on: self-hosted steps: - name: Checkout uses: actions/checkout@v3 - name: Deploy run: | npm install -g @azure/static-web-apps-cli swa deploy ./dist -d $API_TOKEN -w ./ --env production
Downgrading the VM to Linux github-runner-1cee68b414 5.15.0-1014-azure #17~20.04.1-Ubuntu SMP Thu Jun 23 20:01:51 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
(Ubuntu 20.04-LTS) solved the problem
Okey, so I tried
node:lts-bullseye-slim
,node:lts-buster
andnode:lts-bullseye
and the unexpected behavior only occurs on-slim
distros. Not sure why, but it works fine on both regularbullseye
andbuster
.
Thanks for this! I was using slim and this caught me out.
@sgollapudi77 Hi, hope you are doing great. I've tried using native way detailed here to deploy nextjs application which is already in my gitlab repository so no need to import it from github but I always get deployment_token provided was invalid. although the token is valid without any double quotes or other characters. The same application I was able to deploy manually using swa cli. I made sure the token is being retrieved from variables and getting displayed onto gitlab stage but still see same token invalid error. I have checked a lot in internet but no use so it would be really helpful if you can help me in resolving this issue.
Below is my gitlab yml. I have followed exact steps detailed here but no luck :( . I have even tried without build stage but same error.
stages:
variables: API_TOKEN: $DEPLOYMENT_TOKEN APP_PATH: '$CI_PROJECT_DIR/apps/testProject/src'
build: stage: build tags:
deploy: stage: deploy tags:
SWA Version: 1.0.2
Are you accessing the CLI from the default port
:4280
?--port
) and accessing the CLI from that port:4280
Describe the bug Installing SWA and deploying through gitlab-ci with
node:lts-bullseye-slim
image gets to- Preparing deployment. Please wait...
and then just finishes without any errors, and the code is not deployed.gitlab-ci.yml
Output with --verbose=silly
To Reproduce Set up a project with the above specified
gitlab-ci.yml
and run the pipeline.Expected behavior Expected process to complete and deploy the code.
EDIT / UPDATE The issue is only present on
-slim
distros. (alpine
does not work, but that produces a real error so it's more clear)