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

Custom image not working as expected?

Hi there. I'm using a custom Docker image stored in the Docker Hub ("jimmyadaro/gitlab-ci-cd"), it's a simple Alpine image which updates itself and installs OpenSSH and LFTP. Quite simple, right? It works for me in GitLab CI/CD (I even made a simple tutorial like a year ago).

Now, I'm trying to use bash or OpenSSH and I get a pipeline fatal error. These are the commands inside my bitbucket-pipelines.yml file and the errors shown in the Bitbucket's "Pipelines" UI. What could be wrong?

Screen Shot 2019-05-13 at 16.24.35.pngScreen Shot 2019-05-13 at 16.25.16.pngScreen Shot 2019-05-13 at 16.25.43.pngScreen Shot 2019-05-13 at 16.25.58.png

2 answers

Do you found solution?

My final solution was to use `bitbucket-pipelines.yml` file to call a new one `bitbucket-pipelines.sh` where I did the whole deployment process instead of using commands/scripts in the "deployment" step, like so:

 

# ...

pipelines:
branches:
# Deploy to UAT / Test based on commit push to "develop" branch
develop:
- step:
name: Build (npm)
# Use a light Node image
image: node:10.15.3
# Cache Node
caches:
- node
# Execute npm ci and build/bundle scripts
script:
# Use npm ci instead of npm install
- npm ci
# Build my thing
- npm run-script build
- step:
# "$ pwd" for this step: "/opt/atlassian/pipelines/agent/build/", inside has all the repo files
name: Deploy to UAT
deployment: uat
# In case you want to trigger this by using Bitbucket's UI, uncomment the next line
#trigger: manual
script:
# Make the deploy file executable and run it
- chmod +x bitbucket-pipelines-uat.sh
- ./bitbucket-pipelines-uat.sh
after-script:
# Remove SSH key (even if this container should be self-destroyed)
- rm -f ~/.ssh/id_rsa

# ...

 

Hope it helps!

I have the same problem. Here is my pipeline sript. It will not download the image and use the image as the based.

 

image:
  name: XXXX.dkr.ecr.us-west-2.amazonaws.com/YYY/ZZZ:latest
    aws:
      access-key: $AWS_ACCESS_KEY_ID
      secret-key: $AWS_SECRET_ACCESS_KEY

pipelines:
  default:
    - step:
        name: testing

        deployment: testing
        script:

          # call the build command within my docker container
          - ./build.sh

 

Any idea?

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket Pipelines

What We Learned When We Researched Open Source Vulnerabilities in 7 Popular Coding Languages

...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...

1,218 views 0 3
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