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 found
Hi @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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.