c2cciutils 1.2.32__tar.gz → 1.3.26__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/LICENSE.txt +1 -1
  2. c2cciutils-1.3.26/PKG-INFO +462 -0
  3. c2cciutils-1.3.26/README.md +395 -0
  4. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/__init__.py +65 -92
  5. c2cciutils-1.3.26/c2cciutils/applications-versions.yaml +3 -0
  6. c2cciutils-1.3.26/c2cciutils/applications.yaml +11 -0
  7. c2cciutils-1.3.26/c2cciutils/applications_definition.py +46 -0
  8. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/audit.py +24 -28
  9. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/checks.py +39 -76
  10. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/configuration.py +488 -27
  11. c2cciutils-1.3.26/c2cciutils/lib/docker.py +136 -0
  12. c2cciutils-1.3.26/c2cciutils/node_modules/@pkgr/utils/lib/browser.js +113 -0
  13. c2cciutils-1.3.26/c2cciutils/node_modules/@pkgr/utils/lib/constants.js +22 -0
  14. c2cciutils-1.3.26/c2cciutils/node_modules/@pkgr/utils/lib/helpers.js +108 -0
  15. c2cciutils-1.3.26/c2cciutils/node_modules/@pkgr/utils/lib/index.cjs +281 -0
  16. c2cciutils-1.3.26/c2cciutils/node_modules/@pkgr/utils/lib/index.js +5 -0
  17. c2cciutils-1.3.26/c2cciutils/node_modules/@pkgr/utils/lib/monorepo.js +9 -0
  18. c2cciutils-1.3.26/c2cciutils/node_modules/@pkgr/utils/package.json +38 -0
  19. c2cciutils-1.3.26/c2cciutils/node_modules/@toml-tools/lexer/lib/api.js +25 -0
  20. c2cciutils-1.3.26/c2cciutils/node_modules/@toml-tools/lexer/lib/tokens.js +251 -0
  21. c2cciutils-1.3.26/c2cciutils/node_modules/@toml-tools/lexer/package.json +22 -0
  22. c2cciutils-1.3.26/c2cciutils/node_modules/@toml-tools/parser/lib/api.js +48 -0
  23. c2cciutils-1.3.26/c2cciutils/node_modules/@toml-tools/parser/lib/parser.js +181 -0
  24. c2cciutils-1.3.26/c2cciutils/node_modules/@toml-tools/parser/package.json +29 -0
  25. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/chevrotain.js +9262 -0
  26. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/chevrotain.min.js +2 -0
  27. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/api.js +77 -0
  28. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/diagrams/render_public.js +15 -0
  29. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/generate/generate.js +144 -0
  30. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/generate/generate_public.js +21 -0
  31. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/lang/lang_extensions.js +78 -0
  32. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/parse/constants.js +5 -0
  33. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/parse/cst/cst.js +140 -0
  34. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/parse/cst/cst_visitor.js +129 -0
  35. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/parse/errors_public.js +216 -0
  36. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/parse/exceptions_public.js +58 -0
  37. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/parse/gast_builder.js +450 -0
  38. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/parse/grammar/checks.js +564 -0
  39. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/parse/grammar/first.js +63 -0
  40. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/parse/grammar/follow.js +69 -0
  41. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/parse/grammar/gast/gast.js +151 -0
  42. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/parse/grammar/gast/gast_public.js +257 -0
  43. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/parse/grammar/gast/gast_resolver_public.js +40 -0
  44. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/parse/grammar/gast/gast_visitor_public.js +56 -0
  45. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/parse/grammar/interpreter.js +547 -0
  46. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/parse/grammar/keys.js +42 -0
  47. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/parse/grammar/lookahead.js +433 -0
  48. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/parse/grammar/resolver.js +59 -0
  49. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/parse/grammar/rest.js +112 -0
  50. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/parse/parser/parser.js +146 -0
  51. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/parse/parser/traits/context_assist.js +28 -0
  52. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/parse/parser/traits/error_handler.js +83 -0
  53. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/parse/parser/traits/lexer_adapter.js +74 -0
  54. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/parse/parser/traits/looksahead.js +115 -0
  55. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/parse/parser/traits/parser_traits.js +5 -0
  56. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_api.js +340 -0
  57. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_engine.js +623 -0
  58. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/parse/parser/traits/recoverable.js +305 -0
  59. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/parse/parser/traits/tree_builder.js +155 -0
  60. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/scan/lexer.js +831 -0
  61. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/scan/lexer_public.js +582 -0
  62. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/scan/reg_exp.js +216 -0
  63. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/scan/tokens.js +139 -0
  64. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/scan/tokens_constants.js +4 -0
  65. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/scan/tokens_public.js +114 -0
  66. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/text/range.js +33 -0
  67. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/utils/utils.js +440 -0
  68. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/lib/src/version.js +7 -0
  69. c2cciutils-1.3.26/c2cciutils/node_modules/chevrotain/package.json +145 -0
  70. c2cciutils-1.3.26/c2cciutils/node_modules/cross-spawn/index.js +39 -0
  71. c2cciutils-1.3.26/c2cciutils/node_modules/cross-spawn/lib/enoent.js +59 -0
  72. c2cciutils-1.3.26/c2cciutils/node_modules/cross-spawn/lib/parse.js +91 -0
  73. c2cciutils-1.3.26/c2cciutils/node_modules/cross-spawn/lib/util/escape.js +47 -0
  74. c2cciutils-1.3.26/c2cciutils/node_modules/cross-spawn/lib/util/readShebang.js +23 -0
  75. c2cciutils-1.3.26/c2cciutils/node_modules/cross-spawn/lib/util/resolveCommand.js +52 -0
  76. c2cciutils-1.3.26/c2cciutils/node_modules/cross-spawn/package.json +73 -0
  77. c2cciutils-1.3.26/c2cciutils/node_modules/define-lazy-prop/index.js +19 -0
  78. c2cciutils-1.3.26/c2cciutils/node_modules/define-lazy-prop/package.json +48 -0
  79. c2cciutils-1.3.26/c2cciutils/node_modules/globalyzer/package.json +28 -0
  80. c2cciutils-1.3.26/c2cciutils/node_modules/globalyzer/src/index.js +96 -0
  81. c2cciutils-1.3.26/c2cciutils/node_modules/globrex/index.js +271 -0
  82. c2cciutils-1.3.26/c2cciutils/node_modules/globrex/package.json +30 -0
  83. c2cciutils-1.3.26/c2cciutils/node_modules/is-docker/cli.js +5 -0
  84. c2cciutils-1.3.26/c2cciutils/node_modules/is-docker/index.js +29 -0
  85. c2cciutils-1.3.26/c2cciutils/node_modules/is-docker/package.json +42 -0
  86. c2cciutils-1.3.26/c2cciutils/node_modules/is-extglob/index.js +20 -0
  87. c2cciutils-1.3.26/c2cciutils/node_modules/is-extglob/package.json +69 -0
  88. c2cciutils-1.3.26/c2cciutils/node_modules/is-glob/index.js +150 -0
  89. c2cciutils-1.3.26/c2cciutils/node_modules/is-glob/package.json +81 -0
  90. c2cciutils-1.3.26/c2cciutils/node_modules/is-wsl/index.js +31 -0
  91. c2cciutils-1.3.26/c2cciutils/node_modules/is-wsl/package.json +45 -0
  92. c2cciutils-1.3.26/c2cciutils/node_modules/isexe/index.js +57 -0
  93. c2cciutils-1.3.26/c2cciutils/node_modules/isexe/mode.js +41 -0
  94. c2cciutils-1.3.26/c2cciutils/node_modules/isexe/package.json +31 -0
  95. c2cciutils-1.3.26/c2cciutils/node_modules/isexe/windows.js +42 -0
  96. c2cciutils-1.3.26/c2cciutils/node_modules/open/index.js +315 -0
  97. c2cciutils-1.3.26/c2cciutils/node_modules/open/package.json +61 -0
  98. c2cciutils-1.3.26/c2cciutils/node_modules/path-key/index.js +16 -0
  99. c2cciutils-1.3.26/c2cciutils/node_modules/path-key/package.json +39 -0
  100. c2cciutils-1.3.26/c2cciutils/node_modules/picocolors/package.json +25 -0
  101. c2cciutils-1.3.26/c2cciutils/node_modules/picocolors/picocolors.browser.js +4 -0
  102. c2cciutils-1.3.26/c2cciutils/node_modules/picocolors/picocolors.js +58 -0
  103. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/node_modules/prettier/cli.js +7352 -4602
  104. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/node_modules/prettier/doc.js +111 -99
  105. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/node_modules/prettier/index.js +713 -2657
  106. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/node_modules/prettier/package.json +3 -6
  107. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/node_modules/prettier/parser-angular.js +1 -1
  108. c2cciutils-1.3.26/c2cciutils/node_modules/prettier/parser-babel.js +27 -0
  109. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/node_modules/prettier/parser-espree.js +19 -19
  110. c2cciutils-1.3.26/c2cciutils/node_modules/prettier/parser-flow.js +35 -0
  111. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/node_modules/prettier/parser-glimmer.js +15 -15
  112. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/node_modules/prettier/parser-graphql.js +1 -1
  113. c2cciutils-1.3.26/c2cciutils/node_modules/prettier/parser-html.js +36 -0
  114. c2cciutils-1.3.26/c2cciutils/node_modules/prettier/parser-markdown.js +76 -0
  115. c2cciutils-1.3.26/c2cciutils/node_modules/prettier/parser-meriyah.js +19 -0
  116. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/node_modules/prettier/parser-postcss.js +42 -42
  117. c2cciutils-1.3.26/c2cciutils/node_modules/prettier/parser-typescript.js +280 -0
  118. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/node_modules/prettier/parser-yaml.js +11 -11
  119. c2cciutils-1.3.26/c2cciutils/node_modules/prettier/standalone.js +116 -0
  120. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/node_modules/prettier/third-party.js +1 -1
  121. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/node_modules/prettier-plugin-sh/lib/index.cjs +152 -114
  122. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/node_modules/prettier-plugin-sh/lib/index.js +75 -6
  123. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/node_modules/prettier-plugin-sh/lib/languages.js +69 -108
  124. c2cciutils-1.3.26/c2cciutils/node_modules/prettier-plugin-sh/lib/worker.js +4 -0
  125. c2cciutils-1.3.26/c2cciutils/node_modules/prettier-plugin-sh/package.json +78 -0
  126. c2cciutils-1.3.26/c2cciutils/node_modules/prettier-plugin-toml/lib/api.js +46 -0
  127. c2cciutils-1.3.26/c2cciutils/node_modules/prettier-plugin-toml/lib/loc.js +12 -0
  128. c2cciutils-1.3.26/c2cciutils/node_modules/prettier-plugin-toml/lib/printer-utils.js +82 -0
  129. c2cciutils-1.3.26/c2cciutils/node_modules/prettier-plugin-toml/lib/printer.js +302 -0
  130. c2cciutils-1.3.26/c2cciutils/node_modules/prettier-plugin-toml/package.json +25 -0
  131. c2cciutils-1.3.26/c2cciutils/node_modules/regexp-to-ast/lib/regexp-to-ast.js +961 -0
  132. c2cciutils-1.3.26/c2cciutils/node_modules/regexp-to-ast/package.json +64 -0
  133. c2cciutils-1.3.26/c2cciutils/node_modules/sh-syntax/lib/browser.js +4 -0
  134. c2cciutils-1.3.26/c2cciutils/node_modules/sh-syntax/lib/index.cjs +687 -0
  135. c2cciutils-1.3.26/c2cciutils/node_modules/sh-syntax/lib/index.js +20 -0
  136. c2cciutils-1.3.26/c2cciutils/node_modules/sh-syntax/lib/processor.js +75 -0
  137. c2cciutils-1.3.26/c2cciutils/node_modules/sh-syntax/lib/shim.js +18 -0
  138. c2cciutils-1.3.26/c2cciutils/node_modules/sh-syntax/lib/types.js +8 -0
  139. c2cciutils-1.3.26/c2cciutils/node_modules/sh-syntax/package.json +128 -0
  140. c2cciutils-1.3.26/c2cciutils/node_modules/sh-syntax/vendors/wasm_exec.js +514 -0
  141. c2cciutils-1.3.26/c2cciutils/node_modules/shebang-command/index.js +19 -0
  142. c2cciutils-1.3.26/c2cciutils/node_modules/shebang-command/package.json +34 -0
  143. c2cciutils-1.3.26/c2cciutils/node_modules/shebang-regex/index.js +2 -0
  144. c2cciutils-1.3.26/c2cciutils/node_modules/shebang-regex/package.json +35 -0
  145. c2cciutils-1.3.26/c2cciutils/node_modules/synckit/lib/index.cjs +308 -0
  146. c2cciutils-1.3.26/c2cciutils/node_modules/synckit/lib/index.js +258 -0
  147. c2cciutils-1.3.26/c2cciutils/node_modules/synckit/lib/types.js +2 -0
  148. c2cciutils-1.3.26/c2cciutils/node_modules/synckit/package.json +39 -0
  149. c2cciutils-1.3.26/c2cciutils/node_modules/tiny-glob/index.js +83 -0
  150. c2cciutils-1.3.26/c2cciutils/node_modules/tiny-glob/package.json +37 -0
  151. c2cciutils-1.3.26/c2cciutils/node_modules/tiny-glob/sync.js +81 -0
  152. c2cciutils-1.3.26/c2cciutils/node_modules/tslib/modules/index.js +55 -0
  153. c2cciutils-1.3.26/c2cciutils/node_modules/tslib/modules/package.json +3 -0
  154. c2cciutils-1.3.26/c2cciutils/node_modules/tslib/package.json +38 -0
  155. c2cciutils-1.3.26/c2cciutils/node_modules/tslib/tslib.es6.js +248 -0
  156. c2cciutils-1.3.26/c2cciutils/node_modules/tslib/tslib.js +317 -0
  157. c2cciutils-1.3.26/c2cciutils/node_modules/which/package.json +43 -0
  158. c2cciutils-1.3.26/c2cciutils/node_modules/which/which.js +125 -0
  159. c2cciutils-1.3.26/c2cciutils/package-lock.json +503 -0
  160. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/package.json +3 -2
  161. c2cciutils-1.3.26/c2cciutils/pr_checks.py +281 -0
  162. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/prettier.py +1 -1
  163. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/publish.py +5 -18
  164. c2cciutils-1.3.26/c2cciutils/schema-applications.json +50 -0
  165. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/schema.json +225 -28
  166. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/scripts/audit.py +2 -2
  167. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/scripts/checks.py +18 -9
  168. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/scripts/clean.py +10 -1
  169. c2cciutils-1.3.26/c2cciutils/scripts/docker_versions_gen.py +35 -0
  170. c2cciutils-1.3.26/c2cciutils/scripts/download_applications.py +109 -0
  171. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/scripts/k8s/db.py +28 -10
  172. c2cciutils-1.3.26/c2cciutils/scripts/k8s/install.py +39 -0
  173. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/scripts/main.py +1 -1
  174. c2cciutils-1.3.26/c2cciutils/scripts/pr_checks.py +75 -0
  175. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/scripts/publish.py +87 -29
  176. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/scripts/trigger_image_update.py +2 -1
  177. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/pyproject.toml +74 -47
  178. c2cciutils-1.2.32/PKG-INFO +0 -214
  179. c2cciutils-1.2.32/README.md +0 -151
  180. c2cciutils-1.2.32/c2cciutils/node_modules/prettier/parser-babel.js +0 -27
  181. c2cciutils-1.2.32/c2cciutils/node_modules/prettier/parser-flow.js +0 -26
  182. c2cciutils-1.2.32/c2cciutils/node_modules/prettier/parser-html.js +0 -36
  183. c2cciutils-1.2.32/c2cciutils/node_modules/prettier/parser-markdown.js +0 -76
  184. c2cciutils-1.2.32/c2cciutils/node_modules/prettier/parser-meriyah.js +0 -19
  185. c2cciutils-1.2.32/c2cciutils/node_modules/prettier/parser-typescript.js +0 -280
  186. c2cciutils-1.2.32/c2cciutils/node_modules/prettier/standalone.js +0 -115
  187. c2cciutils-1.2.32/c2cciutils/node_modules/prettier-plugin-sh/package.json +0 -44
  188. c2cciutils-1.2.32/c2cciutils/package-lock.json +0 -69
  189. c2cciutils-1.2.32/c2cciutils/scripts/k8s/install.py +0 -44
  190. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/branches.graphql +0 -0
  191. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/commits.graphql +0 -0
  192. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/default_branch.graphql +0 -0
  193. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/node_modules/mvdan-sh/index.js +0 -0
  194. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/node_modules/mvdan-sh/package.json +0 -0
  195. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/node_modules/prettier/bin-prettier.js +0 -0
  196. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/prettier.js +0 -0
  197. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/scripts/__init__.py +0 -0
  198. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/scripts/docker_logs.py +0 -0
  199. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/scripts/k8s/__init__.py +0 -0
  200. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/scripts/k8s/logs.py +0 -0
  201. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/scripts/k8s/wait.py +0 -0
  202. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/scripts/pin_pipenv.py +0 -0
  203. {c2cciutils-1.2.32 → c2cciutils-1.3.26}/c2cciutils/security.py +0 -0
@@ -1,4 +1,4 @@
1
- All the code in this library is provided under this licence:
1
+ All the code in this library is provided under this license:
2
2
 
3
3
  Copyright (c) 2020, Camptocamp SA
4
4
  All rights reserved.
@@ -0,0 +1,462 @@
1
+ Metadata-Version: 2.1
2
+ Name: c2cciutils
3
+ Version: 1.3.26
4
+ Summary: Common utilities for Camptocamp CI
5
+ Home-page: https://github.com/camptocamp/c2cciutils
6
+ License: FreeBSD
7
+ Keywords: ci
8
+ Author: Camptocamp
9
+ Author-email: info@camptocamp.com
10
+ Requires-Python: >=3.9.3,<3.13
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: License :: Other/Proprietary License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.8
22
+ Classifier: Programming Language :: Python :: 3.9
23
+ Classifier: Typing :: Typed
24
+ Provides-Extra: audit
25
+ Provides-Extra: checks
26
+ Provides-Extra: pr-checks
27
+ Provides-Extra: publish
28
+ Requires-Dist: EditorConfig (>=0.0.0,<1.0.0) ; extra == "checks"
29
+ Requires-Dist: Markdown (>=3.0.0,<4.0.0)
30
+ Requires-Dist: PyYAML (>=6.0.0,<7.0.0)
31
+ Requires-Dist: Pygments (>=2.0.0,<3.0.0)
32
+ Requires-Dist: black (==24.3.0) ; extra == "checks"
33
+ Requires-Dist: certifi
34
+ Requires-Dist: click (>=8.0.0,<9.0.0)
35
+ Requires-Dist: codespell (==2.2.6) ; extra == "checks" or extra == "pr-checks"
36
+ Requires-Dist: cryptography
37
+ Requires-Dist: debian-inspector (>=31.0.0,<32.0.0)
38
+ Requires-Dist: defusedxml (>=0.0.0,<1.0.0)
39
+ Requires-Dist: google-api-python-client (>=2.0.0,<3.0.0) ; extra == "publish"
40
+ Requires-Dist: google-auth-httplib2 (>=0.0.0,<1.0.0) ; extra == "publish"
41
+ Requires-Dist: google-auth-oauthlib (>=0.0.0,<1.0.0) ; extra == "publish"
42
+ Requires-Dist: idna (>=3.0,<4.0)
43
+ Requires-Dist: isort (==5.10.1) ; extra == "checks"
44
+ Requires-Dist: jinja2 (>=3.0.0,<4.0.0)
45
+ Requires-Dist: jsonschema (>=4.0.0,<5.0.0)
46
+ Requires-Dist: jsonschema-gentypes (>=1.0.0,<2.0.0)
47
+ Requires-Dist: markdown-table (>=2020.0.0,<2021.0.0)
48
+ Requires-Dist: node-vm2 (>=0.0.0,<1.0.0)
49
+ Requires-Dist: oauthlib (>=3.0.0,<4.0.0)
50
+ Requires-Dist: pipenv (==2022.9.24) ; extra == "audit"
51
+ Requires-Dist: poetry (==1.6.1) ; extra == "publish"
52
+ Requires-Dist: poetry-dynamic-versioning[plugin] (==0.21.5) ; extra == "publish"
53
+ Requires-Dist: poetry-plugin-tweak-dependencies-version (==1.5.2) ; extra == "publish"
54
+ Requires-Dist: protobuf (>=4.0.0,<5.0.0)
55
+ Requires-Dist: python-magic (>=0.0.0,<1.0.0)
56
+ Requires-Dist: requests (>=2.0.0,<3.0.0)
57
+ Requires-Dist: ruamel.yaml (>=0.0.0,<1.0.0)
58
+ Requires-Dist: safety (>=2.0.0,<3.0.0)
59
+ Requires-Dist: toml (>=0.0.0,<1.0.0)
60
+ Requires-Dist: tomlkit (>=0.0.0,<1.0.0) ; extra == "publish"
61
+ Requires-Dist: twine (>=4.0.0,<5.0.0) ; extra == "publish"
62
+ Requires-Dist: urllib3 (>=2.0.0,<3.0.0)
63
+ Requires-Dist: virtualenv (>=20.0.0,<21.0.0)
64
+ Project-URL: Repository, https://github.com/camptocamp/c2cciutils
65
+ Description-Content-Type: text/markdown
66
+
67
+ # C2C CI utils
68
+
69
+ The goals of C2C CI utils are:
70
+
71
+ - Have some global checks that's didn't request any dependency related to the application:
72
+ this commands return 3 types of results:
73
+ - Print some useful information:
74
+ - The version of some packages
75
+ - The used configuration (with default and autodetect)
76
+ - The environment variables
77
+ - The GitHub event file
78
+ - Check that some configuration where correct:
79
+ - Black configuration
80
+ - Prospector configuration
81
+ - Editor config
82
+ - Git attributes
83
+ - The GitHub workflow files
84
+ - That the stabilization version (get from the Security.md) are used everywhere it's needed
85
+ - Check the code style:
86
+ - End of files
87
+ - Black
88
+ - Isort
89
+ - Code spell
90
+ - Prettier
91
+
92
+ Every check can be disabled with the following config (the configuration is `ci/config.yaml`):
93
+
94
+ ```yaml
95
+ checks:
96
+ <check name>: false
97
+ ```
98
+
99
+ It make easier to place the following workflows:
100
+
101
+ - `audit.yaml`: Audit the stabilization branches of the application against vulnerabilities in the python and node dependency
102
+ - `auto-review.yaml`: Auto review the Renovate pull requests
103
+ - `backport.yaml`: Trigger the backports (work with labels)
104
+ - `clean.yaml`: Clean the Docker images related on a deleted feature branch
105
+ - `codeql.yaml`: Run a GitHub CodeQL check
106
+ - `main.yaml`: Main workflow especially with the c2cciutils-checks command
107
+ - `rebuild.yaml`: Daily rebuild of the Docker images on the stabilization branches.
108
+
109
+ All the provided commands:
110
+
111
+ - `c2cciutils`: some generic tools.
112
+ - `c2cciutils-checks`: Run the checks on the code (those checks don't need any project dependencies).
113
+ - `c2cciutils-audit`: Do the audit, the main difference with checks is that it can change between runs on the same code.
114
+ - `c2cciutils-publish`: Publish the project.
115
+ - `c2cciutils-clean`: Delete Docker images on Docker Hub after corresponding branch have been deleted.
116
+ - `c2cciutils-google-calendar`: Tool to test the Google credentials for calendar API and refresh them if needed. See `c2cciutils-google-calendar -h` for more information.
117
+ - `c2cciutils-k8s-install`: Install a k3d / k3s cluster, see below.
118
+ - `c2cciutils-k8s-db`: Create a database in the k8s cluster, see below.
119
+ - `c2cciutils-k8s-wait`: Wait that the application started correctly in the cluster, see below.
120
+ - `c2cciutils-k8s-logs`: Display the logs of the application in the k8s cluster, see below.
121
+ - `c2cciutils-pin-pipenv`: Display all the dependencies that's in the `Pipenv.lock` but not in the `Pipenv` to be able to pin them.
122
+ - `c2cciutils-docker-logs`: Display the logs of the application in Docker (compose).
123
+ - `c2cciutils-trigger-image-update`: Trigger the ArgoCD repository about image update on the CI (automatically done in the publishing).
124
+ - `c2cciutils-download-applications`: Download the applications with version managed by Renovate, see below.
125
+ - `c2cciutils-docker-versions-gen`: Generate the Docker package versions file (`ci/dpkg-versions.yaml`), see below.
126
+
127
+ ## New project
128
+
129
+ The content of `example-project` can be a good base for a new project.
130
+
131
+ ## Secrets
132
+
133
+ In the CI we need to have the following secrets::
134
+
135
+ - `HAS_SECRETS` to be set to 'HAS_SECRETS', to avoid error errors from external
136
+ pull requests, already set globally on Camptocamp organization.
137
+ - `GOPASS_CI_GITHUB_TOKEN` and `CI_GPG_PRIVATE_KEY` required to initialize the gopass password store,
138
+ the secrets exists in the Camptocamp organization but not shared on all project, then you should add
139
+ your project to the shared list.
140
+
141
+ ## Use locally, in the projects that use c2cciutils
142
+
143
+ Install it: `python3 -m pip install --user --requirement ci/requirements.txt`
144
+ Run the checkers: `c2cciutils-checks [--fix] [--stop] [--check CHECK]`
145
+ Dry run publish: `GITHUB_REF=... c2cciutils-publish --dry-run ...`
146
+
147
+ ## Configuration
148
+
149
+ You can get the current configuration with `c2cciutils --get-config`, the default configuration depends on your project.
150
+ Note that it didn't contain the default defined the schema and visible in the [generated documentation](./config.md).
151
+
152
+ You can override the configuration with the file `ci/config.yaml`.
153
+
154
+ At the base of the configuration you have:
155
+
156
+ - `version`: Contains some regular expressions to find the versions branches and tags, and to convert them into application versions.
157
+ - `checks`: The checker's configuration, see `c2cciutils/checks.py` for more information.
158
+ - `audit`: The audit configuration, see `c2cciutils/audit.py` for more information.
159
+ - `publish`: The publishing configuration, see `c2cciutils/publish.py` for more information.
160
+
161
+ Many actions can be disabled by setting the corresponding configuration part to `False`.
162
+
163
+ ## Checks
164
+
165
+ The configuration profile considers we use a project with:
166
+
167
+ - The following workflows:
168
+ - `Continuous integration`,
169
+ - `Rebuild` on all supported branch,
170
+ - `Audit` for security issues on all supported branches,
171
+ - `Backport` between all supported branches,
172
+ - `Clean Docker hub tags`,
173
+ - `Auto review`.
174
+ - A `SECURITY.md` file.
175
+
176
+ It will check that:
177
+
178
+ - All the workflows are conformed on what we expect,
179
+ - All the workflows are completely configured for all the versions present in `SECURITY.md` file.
180
+ - The code is conformed with the `black` and `isort` rules.
181
+ - The `gitattributes` are valid.
182
+ - All text files end with an empty line.
183
+
184
+ ## SECURITY.md
185
+
186
+ The `SECURITY.md` file should contain the security policy of the repository, especially the end of
187
+ support dates.
188
+
189
+ For compatibility with `c2cciutils` it should contain an array with at least the columns
190
+ `Version` and `Supported Until`. The `Version` column will contain the concerned version.
191
+ The `Supported Until` will contain the date of end of support `dd/mm/yyyy`.
192
+ It can also contain the following sentences:
193
+
194
+ - `Unsupported`: no longer supported => no audit, no rebuild.
195
+ - `Best effort`: the support is ended, it is still rebuilt and audited, but this can be stopped without any notice.
196
+ - `To be defined`: not yet released or the date will be set related of another project release date (like for GeoMapFish).
197
+
198
+ See also [GitHub Documentation](https://docs.github.com/en/github/managing-security-vulnerabilities/adding-a-security-policy-to-your-repository)
199
+
200
+ ## IDE
201
+
202
+ The IDE should be configured as:
203
+
204
+ - using `black` and `isort` without any arguments,
205
+ - using the `editorconfig` configuration.
206
+
207
+ ### VScode
208
+
209
+ - Recommend extensions to work well with c2cciutils:
210
+ - [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) And use EditorConfig
211
+ - [shell-format](https://marketplace.visualstudio.com/items?itemName=foxundermoon.shell-format) With the configuration
212
+ `"shellformat.flag": "-bn"`.
213
+ - [Better TOML](https://marketplace.visualstudio.com/items?itemName=bodil.prettier-toml)
214
+ - Other recommend extensions:
215
+ - [hadolint](https://marketplace.visualstudio.com/items?itemName=exiasr.hadolint)
216
+ - [Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker)
217
+
218
+ Select a formatter:
219
+
220
+ - `CTRL+MAJ+P`
221
+ - Format document With...
222
+ - Configure Default Formatter...
223
+ - Select the formatter
224
+
225
+ ## Publishing
226
+
227
+ ### To pypi
228
+
229
+ The config is like this:
230
+
231
+ ```yaml
232
+ versions:
233
+ # List of kinds of versions you want to publish, that can be:
234
+ # rebuild (specified with --type),
235
+ # version_tag, version_branch, feature_branch, feature_tag (for pull request)
236
+ ```
237
+
238
+ It we have a `setup.py` file, we will be in legacy mode:
239
+ When publishing, the version computed from arguments or `GITHUB_REF` is put in environment variable `VERSION`, thus you should use it in `setup.py`, example:
240
+
241
+ ```python
242
+ VERSION = os.environ.get("VERSION", "1.0.0")
243
+ ```
244
+
245
+ Also we consider that we use `poetry` with [poetry-dynamic-versioning](https://pypi.org/project/poetry-dynamic-versioning/) to manage the version, and [poetry-plugin-tweak-dependencies-version](https://pypi.org/project/poetry-plugin-tweak-dependencies-version/) to manage the dependencies versions.
246
+
247
+ Example of configuration:
248
+
249
+ ```toml
250
+ [tool.poetry-dynamic-versioning]
251
+ enable = true
252
+ vcs = "git"
253
+ pattern = "^(?P<base>\\d+(\\.\\d+)*)"
254
+ format-jinja = """
255
+ {%- if env.get("VERSION_TYPE") == "version_branch" -%}
256
+ {{serialize_pep440(bump_version(base, 1 if env.get("IS_MASTER") == "TRUE" else 2), dev=distance)}}
257
+ {%- elif distance == 0 -%}
258
+ {{serialize_pep440(base)}}
259
+ {%- else -%}
260
+ {{serialize_pep440(bump_version(base), dev=distance)}}
261
+ {%- endif -%}
262
+ """
263
+
264
+ ```
265
+
266
+ Note that we can access to the environment variables `VERSION`,`VERSION_TYPE` and `IS_MASTER`.
267
+
268
+ Then by default:
269
+
270
+ - Tag with `1.2.3` => release `1.2.3`
271
+ - Commit on feature branch just do a validation
272
+ - Commit on `master` branch after the tag 1.3.0 => release `1.4.0.dev1`
273
+ - Commit on `1.3` branch after the tag 1.3.0 => release `1.3.1.dev1`
274
+
275
+ To make it working in the `Dockerfile` you should have in the `poetry` stage:
276
+
277
+ ```Dockerfile
278
+ ENV POETRY_DYNAMIC_VERSIONING_BYPASS=dev
279
+ RUN poetry export --extras=checks --extras=publish --extras=audit --output=requirements.txt \
280
+ && poetry export --dev --output=requirements-dev.txt
281
+ ```
282
+
283
+ And in the `run` stage
284
+
285
+ ```Dockerfile
286
+ ARG VERSION=dev
287
+ RUN --mount=type=cache,target=/root/.cache \
288
+ POETRY_DYNAMIC_VERSIONING_BYPASS=${VERSION} python3 -m pip install --disable-pip-version-check --no-deps --editable=.
289
+ ```
290
+
291
+ And in the `Makefile`:
292
+
293
+ ```Makefile
294
+ VERSION = $(strip $(shell poetry version --short))
295
+
296
+ .PHONY: build
297
+ build: ## Build the Docker images
298
+ docker build --build-arg=VERSION=$(VERSION) --tag=$(GITHUB_REPOSITORY) .
299
+ ```
300
+
301
+ ### To Docker registry
302
+
303
+ The config is like this:
304
+
305
+ ```yaml
306
+ latest: True
307
+ images:
308
+ - name: # The base name of the image we want to publish
309
+ repository:
310
+ <internal_name>:
311
+ 'server': # The fqdn name of the server if not Docker hub
312
+ 'version':# List of kinds of versions you want to publish, that can be: rebuild (specified using --type),
313
+ # version_tag, version_branch, feature_branch, feature_tag (for pull request)
314
+ 'tags':# List of tags we want to publish interpreted with `template(version=version)`
315
+ # e.g. if you use `{version}-lite` when you publish the version `1.2.3` the source tag
316
+ # (that should be built by the application build) is `latest-lite`, and it will be published
317
+ # with the tag `1.2.3-lite`.
318
+ 'group':# If your images are published by different jobs you can separate them in different groups
319
+ # and publish them with `c2cciutils-publish --group=<group>`
320
+ ```
321
+
322
+ By default, the last line of the `SECURITY.md` file will be published (`docker`) with the tag
323
+ `latest`. Set `latest` to `False` to disable it.
324
+
325
+ With the `c2cciutils-clean` the images on Docker hub for `feature_branch` will be removed on branch removing.
326
+
327
+ ## Download applications
328
+
329
+ In case some executables or applications from GitHub releases or any other URLs are required on the CI host
330
+ and are not handled by any dependency manager, we provide a set of tools to install them and manage upgrades
331
+ through Renovate.
332
+
333
+ Create an application file (e.-g. `applications.yaml`) with:
334
+
335
+ ```yaml
336
+ # yaml-language-server: $schema=https://raw.githubusercontent.com/camptocamp/c2cciutils/master/c2cciutils/schema-applications.json
337
+
338
+ # Application from GitHub release
339
+ <organization>/<project>:
340
+ get-file-name: <file name present in the release>
341
+ to-file-name: <The file name you want to create in ~/.local/bin>
342
+ finish-command: # The command you want to run after the file is downloaded
343
+ - - chmod # To be executable (usually required)
344
+ - +x
345
+ - <to-file-name>
346
+ - - <to-file-name> # Print the version of the application
347
+ - --version
348
+ # Application from GitHub release in a tar file (or tar.gz)
349
+ <organization>/<project>:
350
+ get-file-name: <file name present in the release>
351
+ type: tar
352
+ tar-file-name: <The file name available in the tar file>
353
+ to-file-name: <The file name you want to create in ~/.local/bin>
354
+ finish-command: [...] # The command you want to run after the file is downloaded
355
+ # Application from an URL
356
+ <application reference name>:
357
+ url-pattern: <The URL used to download the application>
358
+ to-file-name: <The file name you want to create in ~/.local/bin>
359
+ finish-command: [...] # The command you want to run after the file is downloaded
360
+ ```
361
+
362
+ In the attributes `url-pattern`, `get-file-name` you can use the following variables:
363
+
364
+ - `{version}`: The version of the application present in the version file.
365
+ - `{version_quote}`: The URL encoded version.
366
+ - `{short_version}`: The version without the `v` prefix.
367
+
368
+ The `applications-versions.yaml` file is a map of applications and their versions.
369
+
370
+ Add in your Renovate configuration:
371
+
372
+ ```json5
373
+
374
+ regexManagers: [
375
+ {
376
+ fileMatch: ['^applications-versions.yaml$'],
377
+ matchStrings: [
378
+ '(?<depName>[^\\s]+): (?<currentValue>[^\\s]+) # (?<datasource>[^\\s]+)',
379
+ ],
380
+ },
381
+ ],
382
+ ```
383
+
384
+ Now you need to call `c2cciutils-download-applications --applications-file=applications.yaml --versions-file=applications-version.yaml`
385
+ to install required applications on CI host before using them (an already installed application is installed only if needed).
386
+
387
+ ## Use Renovate to trigger a new build instead of the legacy rebuild
388
+
389
+ Run the command `c2cciutils-docker-versions-gen camptocamp/image[:tag]` to generate a file that is a kind of package lock of the Debian packages in the file `ci/dpkg-versions.yaml`.
390
+
391
+ Add in your renovate configuration:
392
+
393
+ ```javascript
394
+ regexManagers: [
395
+ {
396
+ fileMatch: ['^ci/dpkg-versions.yaml$'],
397
+ matchStrings: [" *(?<depName>[^'\\s]+): '?(?<currentValue>[^'\\s/]*[0-9][^'\\s/]*)'?"],
398
+ datasourceTemplate: 'repology',
399
+ versioningTemplate: 'loose',
400
+ },
401
+ ],
402
+ ```
403
+
404
+ When a new version of a Debian package will be available:
405
+
406
+ - Renovate will automatically open a pull request to update the file `ci/dpkg-versions.yaml`.
407
+ - And the continuous integration will build a new fresh Docker image with latest versions of all Debian packages.
408
+
409
+ ## Kubernetes
410
+
411
+ C2cciutils provide some commands for Kubernetes.
412
+
413
+ You can define a workflow like that:
414
+
415
+ ```yaml
416
+ - name: Install k3s/k3d (Kubernetes cluster)
417
+ run: c2cciutils-k8s-install
418
+
419
+ - name: Create a database to do the tests
420
+ run: c2cciutils-k8s-db --script=<my_script>.sql
421
+
422
+ - name: Install the application in the Kubernetes cluster
423
+ run: kubectl apply -f <my_application>.yaml
424
+
425
+ - name: Wait that the application is ready
426
+ run: c2cciutils-k8s-wait
427
+ - name: Print the application status and logs
428
+ run: c2cciutils-k8s-logs
429
+ if: always()
430
+
431
+ - name: Uninstall the application
432
+ run: kubectl delete -f <my_application>.yaml || true
433
+
434
+ - name: Cleanup the database
435
+ run: c2cciutils-k8s-db --cleanup
436
+ ```
437
+
438
+ `c2cciutils-k8s-install` can be configured in the `ci/config.yaml` file, in section `k8s/k3d/install-commands`, default is:
439
+
440
+ ```yaml
441
+ - - k3d
442
+ cluster
443
+ create
444
+ test-cluster
445
+ --no-lb
446
+ --no-rollback
447
+ ```
448
+
449
+ See also: [K3d cluster create documentation](https://k3d.io/v4.4.8/usage/commands/k3d_cluster_create/).
450
+
451
+ `c2cciutils-k8s-db` can be configured in the `ci/config.yaml` file, in section `k8s/db/chart-options`, default is:
452
+
453
+ ```yaml
454
+ persistence.enabled: 'false'
455
+ tls.enabled: 'true'
456
+ tls.autoGenerated: 'true'
457
+ postgresqlPassword: mySuperTestingPassword
458
+ volumePermissions.enabled: 'true'
459
+ ```
460
+
461
+ See also: [Parameters documentations](https://github.com/bitnami/charts/tree/master/bitnami/postgresql#parameters).
462
+