Forums

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

How can I locate my remote-script.sh on the remote server via bitbucket cloud?

Sophonie Tchoua February 20, 2024

I am trying to run my remote-script.sh on my remote server after deploying my jar on the remote server. I used the scp-deploy image 1.5.0 in combination with ssh-run: 0.8.0 both atlassian images.

The error I am getting has to do with pipeline inability to locate the file or directory, but I have both the jar file deployed by the pipeline and the remote-script in the same location on the remote server which make error more puzzling.

I will appreciate any help.

Thanks,

Sophonie.

1 answer

0 votes
Kseniia Trushnikova
Community Champion
February 25, 2024

Hey @Sophonie Tchoua,

Please share a screenshot of the error you've got?

Sophonie Tchoua February 26, 2024

pipeline-error-to-run-remote-script.JPG

Hi @Kseniia Trushnikova, above is a screenshot of the error message. it looks like the script file I have on my remote server at the same location where the jar file build and deployed by bitbucket pipeline cannot be found. I am also using the following script.

 

- step:
name: 'Deployment to Staging'
image: atlassian/default-image:3
deployment: staging
caches:
- gradle
script:
- echo "Your deployment to staging script goes here..."
- ls -lah /opt/atlassian/pipelines/agent/build/build/libs/
# - pipe: atlassian/scp-deploy:1.2.1
- pipe: atlassian/scp-deploy:1.5.0
variables:
USER: $SCP_USER
# PASSWORD: $SCP_PSSWRD
SERVER: $SCP_HOST
REMOTE_PATH: /webapps/
LOCAL_PATH: '${BITBUCKET_CLONE_DIR}/build/libs/*' #/opt/atlassian/pipelines/agent/build/build/libs/
#SSH_KEY: '/opt/atlassian/pipelines/agent/ssh/id_rsa'
DEBUG: 'true'
#EXTRA_ARGS: ["-P", "443"]
# LOCAL_PATH: /opt/atlassian/pipelines/agent/build/build/resources/main
- pipe: atlassian/ssh-run:0.8.0
variables:
SSH_USER: $SCP_USER
MODE: 'script'
SERVER: $SCP_HOST
COMMAND: 'sh /e/tomcat-internal_test/webapps/remote-script.sh'
Like Sabine Mayer likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events