On a SPA project, I'm using SemaphoreCI to run my tests. I've got a simple build process. Only problem is that my project uses a private NPM repository.
For that I need to setup a .npmrc
file, where a NPM_TOKEN
is set. That token is saved in Semaphore's environment variables.
Here's the setup I have:
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
yarn install
yarn test
Pretty simple. However when running the token is not applied and yarn install
fails with this message:
error Command failed. Exit code: 128 Command: git Arguments: pull Directory: /home/runner/.cache/yarn/v1/.tmp/289ca588f755e265ffc41022e0b6524e Output: *** Please tell me who you are.
The strange thing is. When I use the Launch Session tool and SSH into the server, and that I try these exact commands one by one, everything works fine. I get to install and run the tests with no issues.
What would I need to change to make this work?
Thanks
Aucun commentaire:
Enregistrer un commentaire