The Bitbucket-Ocean Integration enables seamless synchronization between Bitbucket and Port's Ocean framework. It allows users to ingest Bitbucket projects, repositories, and pull requests into Port, providing a unified view of their development workflows.
This integration provides automated data synchronization between Bitbucket and Ocean. It fetches repositories, projects, and pull requests from Bitbucket and ingests them into Port, enabling streamlined visibility and management within the Ocean framework.
Before setting up the integration, ensure you have the following:
- Port Account: Access to your Port workspace.
- Bitbucket Account: Administrative access to your Bitbucket workspace.
- Ocean CLI: Installed on your local machine. Follow the Ocean CLI installation guide if not installed.
git clone https://github.com/kanmitcode/bitbucket-ocean.git
cd bitbucket-ocean
Create a .env
file in the root directory and add the following:
BITBUCKET_WORKSPACE=<your-bitbucket-workspace>
BITBUCKET_USERNAME=<your-bitbucket-username>
BITBUCKET_APP_PASSWORD=<your-bitbucket-app-password>
BITBUCKET_ACCESS_TOKEN=<your-bitbucket-app-password>
PORT_API_KEY=<your-port-api-key>
pip install -r requirements.txt
export PYTHONPATH=$(pwd)
python3 -m bitbucket_ocean.main
This fetches projects, repositories, and pull requests from Bitbucket and pushes them to Port.
If you want to run:
pytest tests/
GET https://api.bitbucket.org/2.0/workspaces/{workspace}/projects
GET https://api.bitbucket.org/2.0/repositories/{workspace}
GET https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests
Logging is configured at the DEBUG
level. If needed, modify the logging settings in bitbucket_ocean_integration.py
:
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s")
- Bitbucket-Ocean Integration (
/build-your-software-catalog/sync-data-to-catalog/git/bitbucket-ocean
)
Integration code port-labs/ocean#1407
Documentation port-labs/port-docs#2046
Port Organization ID org_afzQpUGuZsfqGqcS
The Bitbucket-Ocean integration streamlines your development workflow by syncing Bitbucket data into Port. Follow the installation steps to get started and customize it as needed for your organization.