utils_devops 0.1.146__tar.gz → 0.1.148__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.
- {utils_devops-0.1.146 → utils_devops-0.1.148}/PKG-INFO +1 -1
- {utils_devops-0.1.146 → utils_devops-0.1.148}/pyproject.toml +1 -1
- {utils_devops-0.1.146 → utils_devops-0.1.148}/src/utils_devops/extras/docker_ops.py +14 -0
- {utils_devops-0.1.146 → utils_devops-0.1.148}/README.md +0 -0
- {utils_devops-0.1.146 → utils_devops-0.1.148}/src/utils_devops/__init__.py +0 -0
- {utils_devops-0.1.146 → utils_devops-0.1.148}/src/utils_devops/core/__init__.py +0 -0
- {utils_devops-0.1.146 → utils_devops-0.1.148}/src/utils_devops/core/datetimes.py +0 -0
- {utils_devops-0.1.146 → utils_devops-0.1.148}/src/utils_devops/core/envs.py +0 -0
- {utils_devops-0.1.146 → utils_devops-0.1.148}/src/utils_devops/core/files.py +0 -0
- {utils_devops-0.1.146 → utils_devops-0.1.148}/src/utils_devops/core/logs.py +0 -0
- {utils_devops-0.1.146 → utils_devops-0.1.148}/src/utils_devops/core/script_helpers.py +0 -0
- {utils_devops-0.1.146 → utils_devops-0.1.148}/src/utils_devops/core/strings.py +0 -0
- {utils_devops-0.1.146 → utils_devops-0.1.148}/src/utils_devops/core/systems.py +0 -0
- {utils_devops-0.1.146 → utils_devops-0.1.148}/src/utils_devops/extras/__init__.py +0 -0
- {utils_devops-0.1.146 → utils_devops-0.1.148}/src/utils_devops/extras/aws_ops.py +0 -0
- {utils_devops-0.1.146 → utils_devops-0.1.148}/src/utils_devops/extras/git_ops.py +0 -0
- {utils_devops-0.1.146 → utils_devops-0.1.148}/src/utils_devops/extras/interaction_ops.py +0 -0
- {utils_devops-0.1.146 → utils_devops-0.1.148}/src/utils_devops/extras/metrics_ops.py +0 -0
- {utils_devops-0.1.146 → utils_devops-0.1.148}/src/utils_devops/extras/network_ops.py +0 -0
- {utils_devops-0.1.146 → utils_devops-0.1.148}/src/utils_devops/extras/nginx_ops.py +0 -0
- {utils_devops-0.1.146 → utils_devops-0.1.148}/src/utils_devops/extras/notification_ops.py +0 -0
- {utils_devops-0.1.146 → utils_devops-0.1.148}/src/utils_devops/extras/performance_ops.py +0 -0
- {utils_devops-0.1.146 → utils_devops-0.1.148}/src/utils_devops/extras/ssh_ops.py +0 -0
- {utils_devops-0.1.146 → utils_devops-0.1.148}/src/utils_devops/extras/vault_ops.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: utils_devops
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.148
|
|
4
4
|
Summary: Lightweight DevOps utilities for automation scripts: config editing (YAML/JSON/INI/.env), templating, diffing, and CLI tools
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: devops,automation,nginx,cli,jinja2,yaml,config,diff,templating,logging,docker,compose,file-ops
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "utils_devops"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.148" # Bumped for new string features + diffing
|
|
4
4
|
description = "Lightweight DevOps utilities for automation scripts: config editing (YAML/JSON/INI/.env), templating, diffing, and CLI tools"
|
|
5
5
|
authors = ["Hamed Sheikhan <sh.sheikhan.m@gmail.com>"]
|
|
6
6
|
license = "MIT"
|
|
@@ -1871,6 +1871,8 @@ def _try_environment_authentication(registry: str, registry_info: Dict, logger)
|
|
|
1871
1871
|
# Registry-specific (e.g., HARBOR_USER, HARBOR_PASSWORD)
|
|
1872
1872
|
(f"{_registry_to_env(registry)}_USER", f"{_registry_to_env(registry)}_PASSWORD"),
|
|
1873
1873
|
# Generic (e.g., DOCKER_USERNAME, DOCKER_PASSWORD)
|
|
1874
|
+
("HARBOR_USERNAME", "HARBOR_PASSWORD"),
|
|
1875
|
+
("HARBOR_USER", "HARBOR_PASSWORD"),
|
|
1874
1876
|
("DOCKER_USERNAME", "DOCKER_PASSWORD"),
|
|
1875
1877
|
("REGISTRY_USERNAME", "REGISTRY_PASSWORD"),
|
|
1876
1878
|
("CI_REGISTRY_USER", "CI_REGISTRY_PASSWORD"), # GitLab CI
|
|
@@ -3649,7 +3651,19 @@ def docker_login(
|
|
|
3649
3651
|
Success status
|
|
3650
3652
|
"""
|
|
3651
3653
|
logger = logger or DEFAULT_LOGGER
|
|
3654
|
+
cmd = ['docker', 'login', registry, '-u', username, '-p', password]
|
|
3655
|
+
if email:
|
|
3656
|
+
cmd.extend(['--email', email]) # Rare, mostly for old Docker Hub
|
|
3657
|
+
#if reauth:
|
|
3658
|
+
#cmd.append('--reauth') # Optional: Force reauth if needed
|
|
3652
3659
|
|
|
3660
|
+
try:
|
|
3661
|
+
result = systems.run(cmd, capture=True)
|
|
3662
|
+
logger.info(f"✅ Docker CLI login successful for {registry}")
|
|
3663
|
+
logger.debug(f"Output: {result.stdout}")
|
|
3664
|
+
return True
|
|
3665
|
+
except Exception as e:
|
|
3666
|
+
logger.error(f"❌ Docker CLI login error: {e}")
|
|
3653
3667
|
client = get_docker_client()
|
|
3654
3668
|
if client:
|
|
3655
3669
|
try:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|