The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Google App Engine Deploy Pipe: Private NPM Repository

Markus Tanner
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 2, 2020

I need to deploy a Node.js application to Google App Engine. The application depends on node modules from a private repository. Therefore I'm creating a .npmrc file in the working directory in a first step. "npm install" and "npm run test" work fine there.

The .npmrc file also needs to be uploaded to google cloud storage, which unfortunately does not seem to be the case.

image: node:12.16.1

pipelines:
branches:
master:
-
step:
name: NPM
script:
-
printf "//registry.npmjs.org/:_authToken=%s\n" "$NPM_TOKEN" >> .npmrc
-
npm install
-
npm run test

-
step:
name: Deploy
script:
-
pipe: atlassian/google-app-engine-deploy:0.2.1
variables:
KEY_FILE: $GCLOUD_KEY_FILE
PROJECT: "project-x"

 

I'm always getting the following error from Google:

Step #1: npm ERR! 404 '@xyz/some-module@1.2.3' is not in the npm registry.

And this happens because the .npmrc file is not available in the current cloud storage bucket.

How can I make sure the .npmrc created in step "NPM" will be uploaded, too?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Markus Tanner
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 2, 2020

Looks like I need to use artifacts. 🙈

TAGS
AUG Leaders

Atlassian Community Events