项目作者: jonybuzz

项目描述 :
Repositories dependency checker based on docker compose file
高级语言: HTML
项目地址: git://github.com/jonybuzz/repo-dependency-checker.git
创建时间: 2019-10-07T20:18:52Z
项目社区:https://github.com/jonybuzz/repo-dependency-checker

开源协议:

下载


Repo Dependency Checker

This app reads a Docker Compose YAML file, and searches organization repositories for dependencies.

Requirements:

  • Image name must be equal to app´s repository name so RDC can find it
  • Dependencies must be declared in “DEPENDENCIES.md” at the root of each repo with a Markdown table format
  • Repo´s must be tagged with version number following semver

Installation

To run locally, set this environmet variables:

  • RDC_USERNAME: Github username of an account with access to resources
  • RDC_PASSWORD: Github password of an account with access to resources
  1. git clone https://github.com/jonybuzz/repo-dependency-checker.git
  2. cd repo-dependency-checker
  3. npm install
  4. npm start

It will be running on port 3000

Usage

Get dependencies

It will list all projects with their declared dependencies

GET http://localhost:3000/api/dependencies/{organization}/{repo}/{branch or tag}/{path to compose}

  1. [
  2. {
  3. "name":"first-api",
  4. "version":"11.7.9",
  5. "dependencies":[
  6. {
  7. "name":"second-api",
  8. "version":">=4.2.0"
  9. },
  10. {
  11. "name":"other-dep",
  12. "version":"1.1.x"
  13. }
  14. ]
  15. },
  16. {
  17. "name":"second-api",
  18. "version":"4.5.0",
  19. "dependencies":[]
  20. },
  21. {
  22. "name":"other-dep",
  23. "version":"1.0.0",
  24. "dependencies":[]
  25. }
  26. ]

Validate dependencies

It lists all projects and show info about their dependency validation, using semver syntax. Possible status values are: OK, NOT_SATISFIED and NOT_FOUND

GET http://localhost:3000/api/validate/{organization}/{repo}/{branch or tag}/{path to compose}

  1. [
  2. {
  3. "name":"first-api",
  4. "version":"11.7.9",
  5. "dependencies":[
  6. {
  7. "name":"second-api",
  8. "validation":{
  9. "required":">=4.2.0",
  10. "actual":"4.5.0",
  11. "status":"OK"
  12. }
  13. },
  14. {
  15. "name":"other-dep",
  16. "validation":{
  17. "required":"1.1.x",
  18. "actual":"1.0.0",
  19. "status":"NOT_SATISFIED"
  20. }
  21. }
  22. ]
  23. },
  24. {
  25. "name":"second-api",
  26. "version":"4.5.0",
  27. "dependencies":[]
  28. },
  29. {
  30. "name":"other-dep",
  31. "version":"1.0.0",
  32. "dependencies":[]
  33. }
  34. ]