Skip to content

moverperfect/Az-DevOps-Dependency-Check

Repository files navigation

Azure DevOps Version Checker

Quality Gate Status CodeQL

A tool for checking the versions of dependencies in an Azure DevOps Organisation

Prerequisites

  • Python 3.x
  • requests
  • packaging

Installation

  1. Clone the repository
  2. Install the required packaged by running 'pip install -r requirements.txt'

Usage

  1. Create an 'environments.json' file that includes the projects, repositories, and software you want to check the version of. See environments-example.json
  2. Update the 'secrets.json' file with your Azure DevOps organisation, username, and personal access token.
  3. Run the Get Dependencies script by executing 'python get_dependencies.py'. This will produce a versions.json file. This script retrieves the version information for each software in each environment and repository specified in the environments.json file. The version information is then saved in a versions.json file.
  4. Run the Check Dependencies script by executing 'python check_dependencies.py'. . This script checks the version information in the versions.json file against the information available at https://endoflife.date. The script outputs a list of software versions that are no longer supported.

Example

environments.json

The environments.json file should be a list of objects, where each object represents information for a single software in a single environment and repository. Each object in the list should have the following fields:

Field Description Required
software The name of the software. Yes
envName The name of the environment. Yes
repo The name of the repository. Yes
project The name of the project. No
file_path The file path of the file containing the version information.(Used for automatic version retrival) No
version The version of the software.(Use this when automatic retrival is unavailable) No

secrets.json

The secrets.json file should contain the following fields:

Field Description Required
organization The name of the Azure DevOps organization. Yes
username The username for accessing the Azure DevOps API. Yes
pat_token The personal access token for accessing the Azure DevOps API. Yes

versions.json

The versions.json file contains the version information for each software in each environment and repository specified in the environments.json file. The file is generated by running the get_dependencies.py script, and should have the following fields:

Field Description
dependency The name of the software.
version The version of the software.
env The name of the environment.
repo The name of the repository.
project The name of the project.

Testing

The code does not include any unit testing

Contributions

Contributions are welcome! Please submit a pull request or report an issue for any bug fixes or new features.

License

This project is licensed under the MIT License.

About

Tool to scrape software versions used in an Azure DevOps Organisation and check them against endoflife.date

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages