From 50c3fb9f5993a7458aec0e997c6c530d78d9a91c Mon Sep 17 00:00:00 2001 From: Thierry Carrez Date: Mon, 21 Oct 2019 13:58:14 +0200 Subject: [PATCH] Fix release jobs to work with prepare-workspace-git The prepare-workspace-git role recently replaced the use-cached-repos role, but its behavior is slightly different. While use-cached-repos removed the 'origin' remote, prepare-workspace-git replaces it with a zuul fake origin. Release jobs used to add an 'origin' remote to enable notes fetching. Those jobs now fail because the 'origin' remote already exists. We fix this by resetting the URL for the 'origin' remote, instead of adding a new one. Change-Id: Ifa80ff02dd06a65fd60189c97438554fc4100932 --- playbooks/release/pre.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/playbooks/release/pre.yaml b/playbooks/release/pre.yaml index 2781b60dbb..6bde408017 100644 --- a/playbooks/release/pre.yaml +++ b/playbooks/release/pre.yaml @@ -1,12 +1,12 @@ - hosts: all pre_tasks: # This is tempoarary until v2 is gone and we can rework things - - name: Add origin remote to enable notes fetching - command: "git remote add origin https://{{ item.canonical_name }}" + - name: Update origin remote to enable notes fetching + command: "git remote set-url origin https://{{ item.canonical_name }}" args: chdir: "{{ ansible_user_dir }}/src/{{ item.canonical_name }}" with_items: "{{ zuul.projects.values() | list }}" - # ANSIBLE0006: git remote add is not supported by ansible module + # ANSIBLE0006: git remote is not supported by ansible module tags: - skip_ansible_lint roles: