Victoria Plugin that allows the creation and DESTRUCTION of SAAS on the cloud.
Project description
Victoria Rebuilder
Victoria Rebuilder is a V. I. C. T. O. R. I. A is a plugin that allows you to run multiple Azure DevOps release pipelines
Features
- Run a series of release pipelines based on a stages most recent successful releases in Azure DevOps.
- Run a series of release pipelines for a stage based off another stage's most recent successful releases in Azure DevOps.
Prerequisites
- Python 3.7+
- Pip
- Pipenv
Installation
pipenv install -U victoria_rebuilder
Usage
Config
There is an example configuration file provided please update it as you see fit using the guidance below.
Access Configuration
access:
access_token:
organisation: Organisation
project: Azure DevOps Project
email: user@organisation.com
access_token
: The PAT token associated to the email and organisaiton. The PAT Token must have Read and Write access to Releases.organisation
: The organisation in Azure DevOps.project
: The project in Azure DevOpsemail
: The email account associated to the PAT token.
Deployment Configuration
deployments:
stage: deploy_init_infrastructure
releases:
- name: Platform.Infrastructure
stage: deploy_kubernetes_infrastructure
releases:
- name: Platform.Kubernetes
stage
: Name of the stage. The releases in each stage are all run first before the next stage is completereleases
: List of releases and their name. The name is the name of the release in Azure DevOps
Help text
Usage: victoria rebuilder [OPTIONS] COMMAND [ARGS]...
The rebuilder allows the destruction and rebuilding of environments via
CLI.
Options:
-h, --help Show this message and exit.
Commands:
copy CLI call for rebuilding an environment based off another...
rebuild CLI call for rebuilding a specific kubernetes environment...
CLI Examples
Rebuild an an environment
Rebuild is defined as running the release pipelines associated with the stage pent
in this example.
victoria rebuilder rebuild pent
Copy an an environment
Copy is defined as running the release for a stage based of an other stage. The use case for this is if you created a new stage and want it to have the same release version as the dev stage.
python rebuilder copy qa pent perf
Would copy the status of qa to pent and perf
Contribution
Bug reports
You can submit a bug report here.
Feature requests
You can request a new feature here.
Vulnerability reports
We prefer vulnerabilities to be reported in private so as to minimise their impact (so we can fix them before they are exploited!). To this end, please email any security vulnerability reports to 'sre@glasswallsolutions.com'. We would appreciate it if you use the issue template in the link below. All vulnerabilities will be acknowledged within one business day.
You can publicly report a security vulnerability here.
Pull requests
We accept pull requests! To contribute:
-
Pick up an unassigned issue from our issue board.
Assign yourself to the issue so other people know you're working on it.
-
Work on your code in a feature branch that's got a descriptive name (like
rework-fancy-integrator
). -
Follow the Google style guide for Python.
We use pylint to lint our code. We run pylint without the 'convention' and 'refactor' message classes. You can lint your code with:
pipenv run pylint victoria_destroyer --disable="C,R"
. We use yapf to automatically format our code. We recommend having it format the code whenever you save. -
Make commits for each part of your pull request. Try not to make too many (if it's a small issue you may only need one).
We try to use the imperative mood in commit message subjects.
-
We expect all new code to have at least 80% test coverage. This is enforced by Codecov.
-
To run tests locally and check coverage, use:
pipenv run pytest tests/ --cov=victoria_rebuilder
. -
When ready to merge, create a pull request from your branch into master.
-
Make sure you link your pull request to the issue(s) it addresses.
-
The CI build will run
for your pull request. If it fails then it cannot be merged. Inspect the output, figure out why it failed, and fix the problem. The CI build will lint your code, run tests, and send coverage/code to Codecov and SonarCloud.
-
Someone will review your pull request and suggest changes if necessary.
-
When everything is signed off, your pull request will be merged! Congrats.
Development
Prerequisites
- Python 3.x
- Pipenv
Quick start
- Clone this repo.
- Run
pipenv sync
- You're good to go. You can run commands using the package inside a
pipenv shell
, and modify the code with your IDE.
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for victoria_rebuilder-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71d599e81e3f138398b19e07f89ce8d8591f0f9cb81bec7a4a82f50ee04cae77 |
|
MD5 | 370b5894010e433709c8c16529dc7c2e |
|
BLAKE2b-256 | 8bca625f51206b0e79986c70286c2ff663b42471cbc0db05bea714b37d7bdc17 |