Forums

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

Bitbucket pipeline, unable to see scripts in docker image

Jani Ruohomaa August 15, 2019

Hi,

I am trying to run deployment scripts in my custom docker image

In the yaml running the image like this:

docker run -u root -i -w /sfdx-scripts fluido/fluidosfdx

There is a folder on the image called /sfdx-scripts where the scripts are, then in the pipeline I run for testing purposes this:

script: 
-
ls -l
-
cd /sfdx-scripts
-
./sfdx.sh deploy

the ls -l list the content of BITBUCKET_CLONE_DIR and the next line cd /sfdx-scripts results in error since the folder is not present

what am I doing wrong ?

thanks,

-Jani

1 answer

1 accepted

0 votes
Answer accepted
Graham Gatus
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 2, 2019 edited

@Jani Ruohomaa for your scenario, it sounds like you are trying to use your own docker image as a build environment (see https://confluence.atlassian.com/bitbucket/use-docker-images-as-build-environments-792298897.html ).

 

You could so something similar to:

pipelines:
default:
- step:
image:
name: fluido/fluidosfdx
username: <dockerhub username>
password: <dockerhub password>
script:
- /sfdx-scripts/sfdx.sh deploy

Alternatively if you dont want to run your pipeline with that docker image, you should user docker run or exec in your build script to execute sdfx.sh from within your docker container:

docker run -v $(pwd):<target dir> -w $(pwd) fluido/fluidosfdx /sfdx-scripts/sfdx.sh

  

Jani Ruohomaa September 3, 2019

Thanks for the info, I am getting the hang of this now

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events