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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

I'd like to run Python and PHP in a Pipelines image. Is that possible?


We're trying to setup a CI/CD pipeline from BitBucket to an AWS EC2 instance running CentOS7.  Our program is a PHP Laravel API, but the only integration examples we've been able to find are written in Python.  We'd like to run Python alongside or as a service to the Pipelines image, so we can leverage the integrations code distributed by BitBucket for AWS deployment.

1 answer

0 votes
Tom Bradshaw Atlassian Team Jun 16, 2019

Hey Daniel,

It sounds like your ultimate goal is just to deploy to EC2. The fact that you have to use python is a side effect of the fact that all the examples you've found are in python.

There are two main ways you can make this deployment easier. The first doesn't use any python and the second does.

You could use our new 'pipes' feature. Pipes are pluggable tasks you can inject into your pipelines to avoid complex scripts or repetition. To use a pipe all you need to do is call it within the script section of your bitbucket-pipelines.yml. The documentation for doing this can be found here

By using an EC2 deployment pipe you could avoid having to interact with the python code. An EC2 pipe already exists and can be found here This way you can build your application using php and just pass in the path to the code you want to deploy.

The other option is to use different steps with different images, one php step to build the code and another python step to deploy the code. By using different images for the different steps you can isolate which tools are needed for each operation.

To do this define separate steps for building and deploying the code ( Have the first step export the code you want to deploy as an artifact ( and the add the deployment code to the second step.

If you have any questions let me know.


Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence Cloud

🎨 Add some visual life to your templates

Hi Atlassian Community, My name is Avni Barman, and I am a Product Manager on the Confluence Cloud team. Based on feedback from you, we are giving admins more power to create templates that a...

92 views 1 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you