Pipelines is not correctly executing the .bash_rc, causing several programs, that rely on bash aliases, to fail (eg. npm, grails, gem)

      this often appears as "command not found"

            [BCLOUD-13844] Bitbucket pipelines - command not found

            agrinder added a comment -

            Hey Sam,
            I disabled pipelines to avoid it failing builds over and over. I will reenable pipelines and get a screenshot of the error then open a support ticket as you suggested.
            Thanks,
            Andrew

            agrinder added a comment - Hey Sam, I disabled pipelines to avoid it failing builds over and over. I will reenable pipelines and get a screenshot of the error then open a support ticket as you suggested. Thanks, Andrew

            Hi Andrew,

            Pipelines is not enabled on the repository you linked but pip is available in the Docker image (python:3.5.1) you're using so I don't expect you to see a "command not found" error. Please open a support ticket at https://bitbucket.org/support and include a link to the error in the Pipelines build if you'd like us to investigate further.

            Sam

            StannousBaratheon added a comment - Hi Andrew, Pipelines is not enabled on the repository you linked but pip is available in the Docker image (python:3.5.1) you're using so I don't expect you to see a "command not found" error. Please open a support ticket at https://bitbucket.org/support and include a link to the error in the Pipelines build if you'd like us to investigate further. Sam

            agrinder added a comment -

            I am receiving the error on pip command. The pip command is in the documentation (https://bitbucket.org/awslabs/amazon-s3-bitbucket-pipelines-python), and pipeline yml, for setting up Amazon S3 deploy scripts using python and environment variables.

            agrinder added a comment - I am receiving the error on pip command. The pip command is in the documentation ( https://bitbucket.org/awslabs/amazon-s3-bitbucket-pipelines-python ), and pipeline yml, for setting up Amazon S3 deploy scripts using python and environment variables.

            Hi Alex and Ben,

            I tested the php images outside of Pipelines and it doesn't look like SSH is installed:

            #!bash
            $ docker run -i -t --rm --entrypoint=/bin/bash phpunit/phpunit
            bash-4.3# ssh
            bash: ssh: command not found
            
            $ docker run -i -t --rm --entrypoint=/bin/bash php:7.0.16
            root@7c340c12e84d:/# ssh
            bash: ssh: command not found
            

            You mentioned this used to work? It may be that the image itself or one of the base images it's built on top of has changed to no longer install SSH.

            If you require SSH in your build you can create your own Docker image that adds SSH to the php image, for example:

            Dockerfile:

            #!Dockerfile
            FROM php:7.0.16
            RUN apt update && apt install -y openssh-client
            

            docker build -t <your_dockerhub_username>/php-ssh:7.0.16 .

            Please see the Dockerfile reference for more information about building Docker images: https://docs.docker.com/engine/reference/builder/

            I hope this helps.

            Regards
            Sam

            StannousBaratheon added a comment - Hi Alex and Ben, I tested the php images outside of Pipelines and it doesn't look like SSH is installed: #!bash $ docker run -i -t --rm --entrypoint=/bin/bash phpunit/phpunit bash-4.3# ssh bash: ssh: command not found $ docker run -i -t --rm --entrypoint=/bin/bash php:7.0.16 root@7c340c12e84d:/# ssh bash: ssh: command not found You mentioned this used to work? It may be that the image itself or one of the base images it's built on top of has changed to no longer install SSH. If you require SSH in your build you can create your own Docker image that adds SSH to the php image, for example: Dockerfile: #!Dockerfile FROM php:7.0.16 RUN apt update && apt install -y openssh-client docker build -t <your_dockerhub_username>/php-ssh:7.0.16 . Please see the Dockerfile reference for more information about building Docker images: https://docs.docker.com/engine/reference/builder/ I hope this helps. Regards Sam

            I'm having the same problim with the php:7.0.16 image.

            #!bash
            bash: ssh: command not found
            

            Benjamin Klix (dwm) added a comment - I'm having the same problim with the php:7.0.16 image. #!bash bash: ssh: command not found

            ai0867 added a comment -

            I'm using the phpunit/phpunit image in this pipeline.

            ai0867 added a comment - I'm using the phpunit/phpunit image in this pipeline.

            Hi Alex,

            Could you let us know what Docker image you're using so we can investigate why SSH is no longer working for you?

            StannousBaratheon added a comment - Hi Alex, Could you let us know what Docker image you're using so we can investigate why SSH is no longer working for you?

            ai0867 added a comment -

            Since this change, my continuous deployment pipelines that use ssh fail:

            #!
            
            bash: ssh: command not found
            

            ai0867 added a comment - Since this change, my continuous deployment pipelines that use ssh fail: #! bash: ssh: command not found

            Matt Ryall added a comment -

            There are some minor errors in the log that need correcting, but the primary issue here is fixed.

            Matt Ryall added a comment - There are some minor errors in the log that need correcting, but the primary issue here is fixed.

            I just removed the color coding. It's far from a deal breaker for us.

            Alex Pabouctsidis added a comment - I just removed the color coding. It's far from a deal breaker for us.

              Unassigned Unassigned
              secole Sebastian Cole (Inactive)
              Affected customers:
              1 This affects my team
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: