fix: preserve port numbers in Docker registry URL extraction
Some checks failed
🚀 Build & Deploy Image / Determine Build Necessity (push) Successful in 38s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Successful in 14s
Security Vulnerability Scan / Composer Security Audit (push) Has been skipped
🚀 Build & Deploy Image / Build Docker Image (push) Successful in 14s
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been skipped
Security Vulnerability Scan / Check for Dependency Changes (push) Successful in 33s
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Failing after 58s
Some checks failed
🚀 Build & Deploy Image / Determine Build Necessity (push) Successful in 38s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Successful in 14s
Security Vulnerability Scan / Composer Security Audit (push) Has been skipped
🚀 Build & Deploy Image / Build Docker Image (push) Successful in 14s
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been skipped
Security Vulnerability Scan / Check for Dependency Changes (push) Successful in 33s
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Failing after 58s
The previous regex was removing port numbers from registry URLs. Now using sed to only remove the image name part after the slash, preserving the full registry URL including port (e.g. git.michaelschiemer.de:5000)
This commit is contained in:
@@ -233,24 +233,12 @@
|
||||
ignore_errors: yes
|
||||
changed_when: false
|
||||
|
||||
- name: Extract registry URLs from docker-compose files (preserve port if present)
|
||||
- name: Extract registry URLs with ports from docker-compose files
|
||||
ansible.builtin.shell: |
|
||||
cd {{ application_code_dest }}
|
||||
grep -h "image:" docker-compose.base.yml docker-compose.{{ application_compose_suffix }} 2>/dev/null | \
|
||||
sed -E 's/.*image:\s*([^\/]+).*/\1/' | \
|
||||
sed -E 's/:([^:]+)$//' | \
|
||||
grep -E '\.(de|com|org|net|io|dev)|:[0-9]+|localhost' | \
|
||||
sort -u || echo ""
|
||||
register: actual_registry_urls_raw
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
- name: Extract full registry URLs with ports from docker-compose files
|
||||
ansible.builtin.shell: |
|
||||
cd {{ application_code_dest }}
|
||||
grep -h "image:" docker-compose.base.yml docker-compose.{{ application_compose_suffix }} 2>/dev/null | \
|
||||
sed -E 's/.*image:\s*([^\/]+).*/\1/' | \
|
||||
sed -E 's/:([^:]+)$//' | \
|
||||
sed -E 's/\/.*$//' | \
|
||||
sort -u || echo ""
|
||||
register: actual_registry_urls_full
|
||||
changed_when: false
|
||||
|
||||
Reference in New Issue
Block a user