Bitbucket Migration
Moves repositories from Bitbucket to Azure DevOps. Currently fairly hard-coded to our environment as it will be a one off run.
Setup for Development
Install Python 3.7+ and setup a Virtual Environment
You only need to do the following once when you are setting up your development environment.
- Install the latest version of Python 3.7+
- Open this directory on the command line
- Create a virtual environment,
py -3 -m venv venv
Activate the Virtual Environment
You need to do this whenever you are starting development or running this project.
- Activate the virtual environment,
.\venv\Scripts\Activate.ps1
Restore Pip Packages
You only need to do this if the imported packages in requirements.txt
change. You
must have activated your environment first.
pip install -r requirements.txt
Requirements.txt
Update Required Packages in You only need to do this if you are adding dependencies to new Python packages or upgrading the existing packages. You must have activated your environment first.
- Install new packages with
pip install packagename
or update existing packages withpip update packagename
- Develop and test with the new package.
- Capture the package changes with
pip freeze > requirements.txt
Authentication
Bitbucket
- Create an App Password with full access to Teams and Repos
- Add a file
~/.bitbucketrc
with the following
[bitbucket]
username = <username>
password = <app_password>
email = <email_address>
Azure
- Create a personal access token
- Add the PAT and the Azure DevOps organization to
~/.azuredevopsrc
[azuredevops]
pat = <personal access token>
organization = <organization uri>
project = <project to use>
Git
This assumes you have git credentials cached and SSH keys setup