Exception during checking autoupdater configuration
Check-configuration kończy się wyjątkiem, gdy nie ma żadnego taga pasującego do version_pattern
:
$ autoupdater check-configuration
2020-12-16 08:27:13,469 [INFO]: Checking autoupdater configuration
Traceback (most recent call last):
File "/usr/local/bin/autoupdater", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.8/site-packages/autoupdater/commander.py", line 37, in main
autoupdater.projects.update.check_project_configuration(
File "/usr/local/lib/python3.8/site-packages/autoupdater/projects/update.py", line 25, in check_project_configuration
repository.check_project_configuration(path)
File "/usr/local/lib/python3.8/site-packages/autoupdater/gitlab/update.py", line 136, in check_project_configuration
LocalProject(path, self.__gitlab).check_configuration()
File "/usr/local/lib/python3.8/site-packages/autoupdater/gitlab/update.py", line 354, in check_configuration
self.__check_package_configuration(package_configuration)
File "/usr/local/lib/python3.8/site-packages/autoupdater/gitlab/update.py", line 387, in __check_package_configuration
autoupdater.software.update.get_the_newest_version(package_configuration.origin, self.__gitlab)
File "/usr/local/lib/python3.8/site-packages/autoupdater/software/update.py", line 89, in get_the_newest_version
return handlers[package_source_configuration.source_type](package_source_configuration)
File "/usr/local/lib/python3.8/site-packages/autoupdater/software/update.py", line 115, in _get_gitlab_registry_image_newest_tag
return _get_docker_image_newest_tag(package_source_configuration, container_registry_url, BASE_GITLAB_REGISTRY_USER, gitlab_repository.private_token)
File "/usr/local/lib/python3.8/site-packages/autoupdater/software/update.py", line 103, in _get_docker_image_newest_tag
return _get_the_newest_tag(tags_names, package_source_configuration.version_pattern)
File "/usr/local/lib/python3.8/site-packages/autoupdater/software/update.py", line 140, in _get_the_newest_tag
return max(versions, key=packaging.version.parse)
ValueError: max() arg is an empty sequence
autoupdater.yml:
---
- name: "containers/openresty"
repository_file:
path: "vars/main.yml"
pattern: '_apigateway_nginx_container_image:\s"containers/openresty:(\d+\.\d+\.\d+)"'
origin:
source_type: "gitlab_registry"
source: "containers/openresty"
version_pattern: "\\d+\\.\\d+\\.\\d+"
- name: "pipeline-worker"
repository_file:
path: ".gitlab-ci.yml"
pattern: 'pipeline-worker:(\d{2}\.\d{2}(?:-\d+)?)'
origin:
source_type: "gitlab"
source: "containers/pipeline-worker"
version_pattern: '(\d{2}\.\d{2}(?:-\d+)?)'
Lista tagów w containers/openresty:
8.0-1.15.8.2-3