azdevops-cli-0.3.2
توضیحات
An Azure DevOps cli tool
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | azdevops-cli-0.3.2 |
| نام | azdevops-cli |
| نسخه کتابخانه | 0.3.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Gwendall Garnier, Damien Aicheh |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/azdevops-cli/ |
| مجوز | - |
# AzDevOps CLI
[](https://github.com/gwendallg/rsql4net/blob/develop/LICENSE) []()
## I.Continuous integration
| Branch | Build | Quality Gate |
| ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| main | [](https://dev.azure.com/damienaicheh0990/azdevops-cli/_build/latest?definitionId=95&branchName=main) | |
| develop | [](https://dev.azure.com/damienaicheh0990/azdevops-cli/_build/latest?definitionId=95&branchName=develop) | |
## II.Introduction
This project is used to update all selected repositories in one single script define by a `config.yml` file.
The python script will automatically clone the repositories, modify it and propose a pull request on each repository inside Azure DevOps.
## III. Getting Started
Create a dev environment for the project:
```sh
python3 -m venv .venv
```
Activate the dev environment for Linux:
```sh
source .venv/bin/activate
```
Activate the dev environment for Windows:
```sh
.\.venv\Scripts\activate
```
Install python packages for the project:
```sh
pip install -r requirements.txt
```
Save the packages used in the project into the `requirements.txt`:
```sh
pip freeze > requirements.txt
```
Export credentials as environment variable to be able to run the API calls:
```
export AZDEVOPS_ORGANIZATION_URL='<your_azure_devops_organisation_url>'
export AZDEVOPS_PAT_TOKEN='<your_pat>'
```
## IV - Models generation
Transform the `config.yml` into json with this website for instance:
https://jsonformatter.org/yaml-to-json
Then copy the generated json and paste it inside this other website:
https://app.quicktype.io/
Choose default settings with the Python language.
## V - Install locally for testing only
```
python3 -m pip install --editable .
```
## VI - Run the CLI
```
azdevops repo-updater run --configuration-file <path-to>/config.yml -o <output-path>
```
```
azdevops release-manager changelog -p <your-project-path> -o <output-path>
```
## VII - Unit tests
### Run unit tests:
```
python3 -m unittest
```
or
```
coverage run -m unittest discover
```
### Generate covrage locally
```
coverage report
```
### Generate a changelog
```
azdevops release-manager changelog (-p <project-path>) (-o <output>)
```
Using Docker:
```shell
docker run -v $(Build.SourcesDirectory):/app \
-t aichehda/azdevops-cli:latest \
release-manager changelog \
(-p <project-path>) \
(-o <output>) \
```
### Generate a summary
```
azdevops release-manager summary -pn <project-name> (-r <regex>)
```
azdevops release-manager summary -pn 'MyProject' -r '^digital(.*)_apply'
Using Docker:
```shell
docker run -v $(Build.SourcesDirectory):/app \
-e AZDEVOPS_ORGANIZATION_URL=$AZDEVOPS_ORGANIZATION_URL \
-e AZDEVOPS_PAT_TOKEN=$AZDEVOPS_PAT_TOKEN \
-t aichehda/azdevops-cli:latest \
release-manager summary \
-r '^digital(.*)_apply' \
-pn MyProject \
(-p <project-path>) \
(-o <output>) \
```
### Generate manifest
```
azdevops release-manager manifest -an <application-name>
```
Using Docker on Azure DevOps:
```shell
docker run -v $(Build.SourcesDirectory):/app \
-e BUILD_DEFINITIONNAME=$BUILD_DEFINITIONNAME \
-e BUILD_BUILDID=$BUILD_BUILDID \
-e BUILD_BUILDNUMBER=$BUILD_BUILDNUMBER \
-e BUILD_SOURCEBRANCHNAME=$BUILD_SOURCEBRANCHNAME \
-e BUILD_REPOSITORY_NAME=$BUILD_REPOSITORY_NAME \
-t aichehda/azdevops-cli:latest \
release-manager manifest \
-an my_app
(-p <project-path>) \
(-o <output>) \
```
نیازمندی
| مقدار | نام |
|---|---|
| ==1.3.4 | Cerberus |
| ==2022.9.24 | certifi |
| ==2.1.1 | charset-normalizer |
| ==8.1.3 | click |
| ==6.5.0 | coverage |
| ==4.0.9 | gitdb |
| ==3.1.29 | GitPython |
| ==3.4 | idna |
| ==0.6.1 | isodate |
| ==0.6.21 | msrest |
| ==3.2.2 | oauthlib |
| ==6.0 | PyYAML |
| ==2.8.2 | python-dateutil |
| ==2.28.1 | requests |
| ==1.3.1 | requests-oauthlib |
| ==1.16.0 | six |
| ==5.0.0 | smmap |
| ==1.26.12 | urllib3 |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8 | Python |
نحوه نصب
نصب پکیج whl azdevops-cli-0.3.2:
pip install azdevops-cli-0.3.2.whl
نصب پکیج tar.gz azdevops-cli-0.3.2:
pip install azdevops-cli-0.3.2.tar.gz