I have recently started working with CI using Bitbucket Pipelines. I have managed to connect using my SFTP server, creating API public & private keys and adding them to my server using SSH.
Now, when I run the build it will upload all my files to the correct folder. But I am having a problem that running a package.json command from the script "yarn build" is doing absolutely nothing.. nothing is in the root folder.
What am I missing or doing wrong? Locally everything works just fine same goes for uploading files.
My bitbucket-pipeline.yaml:
# This is a sample build configuration for JavaScript.
# Check our guides at https://confluence.atlassian.com/x/14UWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: node:10.15.3
pipelines:
branches:
develop:
- step:
name: Lets push the data to the Server.
caches:
- node
script:
- pipe: atlassian/sftp-deploy:0.4.1
variables:
USER: $SFTP_username
PASSWORD: $SFTP_password
SERVER: $SFTP_host
REMOTE_PATH: /var/www/html/pipeline-http/test-website/
DEBUG: 'true'
- step:
name: Build and test website and deploy.
caches:
- node
script:
- yarn install
- yarn test-build
artifacts:
- assets/**