Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,460,904
Community Members
 
Community Events
176
Community Groups

Using `poetry` with pipelines

I have tried a few different ways to install poetry:

Here, with pipx:

image: python:3.9

pipelines:
default:
- step:
caches:
- pip
script:
- python3 -m pip install --user pipx
- python3 -m pipx ensurepath
- pipx install poetry
- poetry install
- poetry run pytest -v tests/* --junitxml=test-reports/report.xml
This fails with
bash: pipx: command not found
image: python:3.9

pipelines:
default:
- step:
script:
- curl -sSL https://install.python-poetry.org | python3 -
- export PATH="$HOME/.poetry/bin:$PATH"
- poetry install
This also fails with:
bash: poetry: command not found
Clearly there's something I don't understand about the environment. How can I execute poetry commands in a pipeline script?

1 answer

0 votes

Hi @Scott Fay,

Can you try the following commands? I was able to install poetry using these commands.

- curl -sSL https://install.python-poetry.org | python3 -
- export PATH="$HOME/.local/bin:$PATH"
- poetry --version

Bitbucket Pipelines builds run in Docker containers with Linux platform, so I used the instructions detailed below for Linux:

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS

Atlassian Community Events