I have below .yml and there is no compiling issues:
It's giving an error as pip3: command not found. I have installed in the above step already.
image: salesforce/cli:latest-slim
definitions:
steps:
- step: &install-build
name: Plugin Installation
script:
- apt update
- apt -y install python3-pip
artifacts:
- target**
pipelines:
branches:
master:
- step:
name: Runing for master branch
script:
- echo 'Runing For master branch'
feature/*:
- step:
name: Running For feature and validation for QA
script:
- pip3 install yq
- apt -y install jq
Error as below:
+ pip3 install yq
2
bash: pip3: command not foundHi @Milanjeet Singh and welcome to the community!
Every step in a Pipelines build runs in a separate Docker container. For every step of your build, a Docker container starts (the build container) using the image you have specified in your bitbucket-pipelines.yml file. The repo is cloned in the build container, and then the commands of the step's script are executed. When the step finishes that Docker container gets destroyed.
Tools you install in one step will not be available in other steps, since these other steps will run in a new Docker container. You will need to install tools in the step that needs them.
Please also note that the step &install-build you are defining in a YAML anchor is not used by any pipeline. This is not relevant to the error you get since you are still using a command in a step where you have not installed it. If you want to make use of YAML anchors, please check our documentation below for info on how to reference these steps:
Kind regards,
Theodora
Thanks, I used an alternative and created a script that can be run in any step.
definitions:
steps:
- script: &install-plugins |
apt update
apt -y install python3-pip
pip3 install yq
apt -y install jq
However, I want to ask you, is there any way that these plugins installed once and used later in other steps on branches, as GitLab supports that?
Having this will improve a lot of things when we define our deployment pipelines and can show different steps on the Bitbucket UI.
Having this limitation, I am not able to show multiple phases of a pipeline, such as
Cloning Repo
Validating Components
Generating Package
Deploying on QA Environment
Everything is coming under a single step, and we have to check the pipeline output screen.
Let me know if you have any alternatives. I would suggest having it, as some of the version control systems support it.
Thanks,
Milanjeet Singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.