Forums

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

Pipeline error

razvanst
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 30, 2018

Hi, so I just started to use Pipelines. I wrote this config:

image: samueldebruyn/debian-git

pipelines:
  default:
    - step:
        script:
          - apt-get update
          - apt-get -qq install git-ftp
          - git ftp push --user $FTP_USERNAME --passwd $FTP_PASSWORD ftp://$SERVER_ADDRESS/$PATH/

But when I run it I get this:

+ umask 000

+ git clone --branch="master" --depth 50 https://x-token-auth:$REPOSITORY_OAUTH_ACCESS_TOKEN@bitbucket.org/razvanst/test.git $BUILD_DIR ; git reset --hard ec52a84d9e10d7902c846c1763efcfa3f4c681e6 ; git remote set-url origin git@bitbucket.org:razvanst/test.git
Cloning into '/opt/atlassian/pipelines/agent/build'...
HEAD is now at ec52a84 bitbucket-pipelines.yml edited online with Bitbucket

+ chmod 777 $BUILD_DIR

+ apt-get update
bash: apt-get: command not found

Searching for test report files in directories named [test-results, failsafe-reports, test-reports, surefire-reports] down to a depth of 4
Finished scanning for test reports. Found 0 test report files.
Merged test suites, total number tests is 0, with 0 failures and 0 errors.

Can you please tell me why ? Thanks! 

1 answer

0 votes
Philip Hodder
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 3, 2019

Apt-get is not installed by default on the Docker image you are using (samueldebruyn/debian-git). Depending on the base image of your image, you may have other tools available.

You can try use the 'apt' command (although it may also not be present) to perform operations, use an image that contains apt-get, or install apt-get inside of your image. 

You can run your container locally and investigate the commands available in your Docker image with the follow command

$ docker run -it --entrypoint /bin/bash <image_name>
$ docker run -it --entrypoint /bin/sh <image_name> # Try this if the first command fails.

Or you can follow the instructions here to debug the Docker image interacting with your repository: https://confluence.atlassian.com/bitbucket/debug-your-pipelines-locally-with-docker-838273569.html

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events