From a1c4ec1a29fd13bb1ad053bf23376fa73d832731 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?El=C5=91d=20Ill=C3=A9s?= Date: Tue, 7 Feb 2023 19:06:17 +0100 Subject: [PATCH] Remove add_master_python3_jobs.sh In Zed cycle, TC agreed to use the unversioned job template [1] (implemented in [2]), thus we don't need the script to generate the patches. This removes the script and also the lines where the script is called from, so OpenStack Bot won't propose any change regarding the series specific job templates. [1] https://etherpad.opendev.org/p/tc-zed-ptg#L360 [2] https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/856903 Change-Id: I8c8aa9ae1fc395361fa6162983feac631608032f --- .../release-tools/add_master_python3_jobs.sh | 78 ------------------- .../files/release-tools/make_branch.sh | 5 -- 2 files changed, 83 deletions(-) delete mode 100755 roles/copy-release-tools-scripts/files/release-tools/add_master_python3_jobs.sh diff --git a/roles/copy-release-tools-scripts/files/release-tools/add_master_python3_jobs.sh b/roles/copy-release-tools-scripts/files/release-tools/add_master_python3_jobs.sh deleted file mode 100755 index a2c8038d9b..0000000000 --- a/roles/copy-release-tools-scripts/files/release-tools/add_master_python3_jobs.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash -# -# Script to update the zuul python3 jobs on master branch when a -# new series is created. -# -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -# As in 2023.1 cycle, we switch to using the generic template name to update -# the unit testing, we do not need this script after Zed release. -set -ex - -if [[ $# -lt 3 ]]; then - echo "Usage: $0 oldseries newseriesname repo_dir" - echo - echo "Example: $0 stein train openstack/oslo.config" - exit 2 -fi - -OLDSERIES=$1 -SERIES=$2 -REPO=$3 -TOOLSDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# We only want the series name, make sure if a branch name is passed in that we -# strip out the part we don't want -OLDSERIES=${OLDSERIES/stable\//} - -cd $REPO - -commit_msg="Switch to 2023.1 Python3 unit tests and generic template name - -This is an automatically generated patch to ensure unit testing -is in place for all the of the tested runtimes for ${SERIES}. Also, -updating the template name to generic one. - -See also the PTI in governance [1]. - -[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html -" - -git checkout master -# Find the appropriate files -fnames=$(find . -type f -path '*zuul.d/*'; find . -type f -name '*zuul.yaml') -for fname in $fnames; do - echo "Checking ${fname}" - sed -i -e \ - "s/openstack-python3-${OLDSERIES}-jobs/openstack-python3-jobs/g" \ - $fname -done - -# Only submit patch if files were changed -changes=$(git diff-index --name-only HEAD -- | grep zuul) -if [ -n "$changes" ]; then - git checkout -b add-${SERIES}-python-jobtemplates - - # Add only the files we modified - for file in $changes; do - git add $file - done - git clean -f - - git diff --cached - git commit -m "$commit_msg" || true - git show - git review --yes -f || true -fi diff --git a/roles/copy-release-tools-scripts/files/release-tools/make_branch.sh b/roles/copy-release-tools-scripts/files/release-tools/make_branch.sh index ae8d61dac0..ad8690801e 100755 --- a/roles/copy-release-tools-scripts/files/release-tools/make_branch.sh +++ b/roles/copy-release-tools-scripts/files/release-tools/make_branch.sh @@ -80,9 +80,4 @@ if [[ $NEW_BRANCH =~ stable/ ]]; then else echo "$REPO does not use reno, no update needed" fi - # Now propose master branch changes with the new branchname - # according to PTI. - if [[ ! -z "${MASTER_BRANCH_NAME}" ]]; then - $TOOLSDIR/add_master_python3_jobs.sh ${NEW_BRANCH} ${MASTER_BRANCH_NAME} . - fi fi