Following is how my pipeline yaml file looks like.
definitions:
step:
- step: &GenerateExe
name: Generate Exe
runs-on:
- self.hosted
- windows
script:
- git config --global core.autocrlf input
- git config --global --add safe.directory '*'
- git lfs pull
- mkvirtualenv temp_py310
- workon temp_py310
- python -m pip list
- python -m pip install -r requirements.txt
- python -m pip list
- python generate_versions_rc.py
- pyinstaller --log-level=DEBUG MYEXE.spec
- rmvirtualenv temp_py310
artifacts:
- dist/**
after-script:
- rmvirtualenv temp_py310
pipelines:
default:
- step: *GenerateExe
It looks like each individual step is a different "powershell" command or script. I want to run the python commands from inside the virtual environment called "temp_py310". Are there better methods available in the bitbucket to do the same?
Something similar to WithENV(Pipeline: Basic Steps) in jenkins.