Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

What is the build directory after doing npm install? Edited

Hi,

I have a simple nodejs app that I want to copy to my production server after installing.

When node install is ready I want to know in which directory it is done. I thought ist was my 'artifacts' directory named 'build'. But when I check that directory with ls -la in one of the steps it does not have a node_modules directory

The yaml below gives me an error 

scp -rp -i /opt/atlassian/pipelines/agent/ssh/id_rsa_tmp build $USER@$SERVER:/home/groupdev/package/: No such file or directory

Which seems that 'build' at that point is not a valid directory. '/home/groupdev/package/' does exist and is reachable.

I also have used '$BITBUCKET_CLONE_DIR/../build/'. That does show the code from the repo but without de node_modules after npm install.

What is the right directory to copy from to my remote server?

My yaml:

image: node:15.11.0

pipelines:
branches:
charlie:
- step:
name: Build
caches:
- node
script:
- npm install
artifacts:
- build/**
- step:
name: Deploy artifacts using SCP to PROD
deployment: production
script:
- pipe: atlassian/scp-deploy:0.3.3
variables:
USER: $USER
SERVER: $SERVER
REMOTE_PATH: '/home/groupdev/package/'
LOCAL_PATH: build/*
DEBUG: 'true'

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Bitbucket Smart Commits vs. Genius Commits - What's the difference?

If you already heard about Smart Commits in Bitbucket, know that you just stumbled upon something even better (and smarter!): Genius Commits by Better DevOps Automation for Jira Data Center (+ Server...

106 views 0 2
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you