Hello,
My pipeline return error on ssh-run step:
YML file:
image: node:latest
definitions:
steps:
- step: &build-test
name: Build and test
caches:
- node
script:
- npm install
- npm run build
artifacts:
- .next/**
- step: &deploy
name: Deploy artifacts using SCP to PROD
script:
- &deploy-script
pipe: atlassian/scp-deploy:0.3.3
variables: &deploy-variables
USER: $USER
SERVER: $SERVER
REMOTE_PATH: '/var/www/html/'
LOCAL_PATH: '${BITBUCKET_CLONE_DIR}/*'
- &ssh-script
pipe: atlassian/ssh-run:0.4.3
variables: &ssh-variables
SSH_USER: $USER
SERVER: $SERVER
COMMAND: 'cd /var/www/html && npm install && npm run build && npm run start'
pipelines:
branches:
develop:
- step:
<<: *build-test
name: Build and test on develop
- step:
<<: *deploy
production:
- step:
<<: *build-test
name: Build and test on production
- step:
<<: *deploy
deployment: production
script:
- <<: *deploy-script
variables:
<<: *deploy-variables
SERVER: $SERVER_PRODUCTION
- <<: *ssh-script
variables:
<<: *ssh-variables
SERVER: $SERVER_PRODUCTION
Thank you in advance for any assistance!
Hi @anhtruc92cr
The error does not appear to relate to Pipelines, that error is NPM specific and mentions the picocolors dependency, essentially the error means that the parser cannot interpret the code as there is an issue with the command syntax.
As you are using the latest node image, I'd suggest downgrading to a previous node version (if these commands were working in the past), or updating your version of the picocolors dependency.
Cheers!
- Ben (Bitbucket Cloud Support)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.