From ec3b33f62a43a034931e5c107ab04c2ba1c08d70 Mon Sep 17 00:00:00 2001 From: Aleksandra Fedorova Date: Feb 21 2023 09:09:59 +0000 Subject: Set default release for centpkg tasks As a preparation step for enabling CentOS Stream 8 and 10 we remove hardcoded references to c9s. * Rename variable from release to release_branch to highlight that it is used in git checkout operations and should be not a number but the branch name. * By default take zuul branch as a value for the release branch. --- diff --git a/roles/centpkg-fetch-sources/defaults/main.yaml b/roles/centpkg-fetch-sources/defaults/main.yaml index fa087c2..57a0e27 100644 --- a/roles/centpkg-fetch-sources/defaults/main.yaml +++ b/roles/centpkg-fetch-sources/defaults/main.yaml @@ -1 +1 @@ -release: c9s +release_branch: {{ zuul.branch }} diff --git a/roles/centpkg-fetch-sources/tasks/main.yaml b/roles/centpkg-fetch-sources/tasks/main.yaml index 05b0980..eb48095 100644 --- a/roles/centpkg-fetch-sources/tasks/main.yaml +++ b/roles/centpkg-fetch-sources/tasks/main.yaml @@ -11,7 +11,7 @@ chdir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}" loop: - git remote set-url origin https://gitlab.com/{{ zuul.project.name }} - - git branch -u origin/{{ release }} + - git branch -u origin/{{ release_branch }} - name: Build the package SRPM command: centpkg sources diff --git a/roles/centpkg-srpm-build/defaults/main.yaml b/roles/centpkg-srpm-build/defaults/main.yaml index fa087c2..57a0e27 100644 --- a/roles/centpkg-srpm-build/defaults/main.yaml +++ b/roles/centpkg-srpm-build/defaults/main.yaml @@ -1 +1 @@ -release: c9s +release_branch: {{ zuul.branch }} diff --git a/roles/centpkg-srpm-build/tasks/main.yaml b/roles/centpkg-srpm-build/tasks/main.yaml index 151ab3b..819cf00 100644 --- a/roles/centpkg-srpm-build/tasks/main.yaml +++ b/roles/centpkg-srpm-build/tasks/main.yaml @@ -11,7 +11,7 @@ chdir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}" loop: - git remote set-url origin https://gitlab.com/{{ zuul.project.name }} - - git branch -u origin/{{ release }} + - git branch -u origin/{{ release_branch }} - name: Build the package SRPM command: centpkg srpm