]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
Cut upstream releases from $BRANCH-release branch dash-release
authorDavid Galloway <dgallowa@redhat.com>
Tue, 21 Dec 2021 21:13:30 +0000 (16:13 -0500)
committerDavid Galloway <dgallowa@redhat.com>
Tue, 21 Dec 2021 21:13:30 +0000 (16:13 -0500)
This will stop the use of the ceph-releases.git repo.  This will also allow us to cut a hotfix release without doing the "branch dance."

Signed-off-by: David Galloway <dgallowa@redhat.com>
ansible/roles/ceph-release/tasks/main.yml
ceph-setup/config/definitions/ceph-setup.yml
ceph-tag/build/build
ceph/config/definitions/ceph.yml

index 11fc0d533f0d2a0561f89d98f7e6aecf2874b402..cc9596a6419b40b27192133bd0ac58a5d4955c32 100644 (file)
     accept_hostkey: yes
   when: ceph_repo.stat.exists is defined and ceph_repo.stat.exists == false
 
-- name: add origin
-  command: git remote add origin git@github.com:ceph/ceph-releases.git chdir=ceph
-  # because if the repo exists then it probably has the origin already in there
-  ignore_errors: yes
+- name: fetch upstream
+  command: git fetch upstream -v chdir=ceph
 
-- name: reset --hard to upstream
-  command: git reset --hard origin/{{ branch }} chdir=ceph
-  ignore_errors: yes
-  when: clean
+- name: "check if {{ branch }}-release branch exists"
+  command: git ls-remote --heads upstream {{ branch }}-release chdir=ceph
+  register: release_branch_exists
 
-- name: force git checkout {{ branch }} branch
-  command: git checkout -f {{ branch }} chdir=ceph
+- name: "create {{ branch }}-release branch"
+  command: git checkout -b {{ branch }}-release {{ branch }} chdir=ceph
+  when: '"{{ branch }}" not in release_branch_exists.stdout'
 
-- name: fetch upstream
-  command: git fetch upstream -v chdir=ceph
+- name: "push new {{ branch }}-release branch"
+  command: git push -f origin {{ branch }}-release chdir=ceph
+  when: '"{{ branch }}" not in release_branch_exists.stdout'
 
-- name: git submodule update
-  command: git submodule update --init chdir=ceph
+- name: "force git checkout {{ branch }}-release branch"
+  command: git checkout -f {{ branch }}-release chdir=ceph
 
-- name: check if configure.ac exists (pre-kraken)
-  stat: path=ceph/configure.ac
-  register: configure_ac
+- name: reset --hard to upstream
+  command: git reset --hard upstream/{{ branch }} chdir=ceph
+  ignore_errors: yes
+  when:
+    - clean
+    - not hotfix|bool
 
-- name: replace the version in configure.ac (pre-kraken)
-  lineinfile: dest=ceph/configure.ac
-              regexp='^AC_INIT\(\[ceph\],'
-              line='AC_INIT([ceph], [{{ version }}], [ceph-devel@vger.kernel.org])'
-  when: configure_ac.stat.exists
+- name: git submodule update
+  command: git submodule update --init chdir=ceph
 
 - name: check if CMakeLists.txt exists
   stat: path=ceph/CMakeLists.txt
@@ -69,7 +68,7 @@
   when: clean
 
 - name: clear the previous remote tag
-  command: git push origin :v{{ version }} chdir=ceph
+  command: git push upstream :v{{ version }} chdir=ceph
   ignore_errors: yes
   when: clean
 
   # official ceph repo it is ok to forcefully push "losing" changes. This may
   # come up if we need to re-do a release which means doing a fresh commit to
   # the debian changelog and rpm files and tagging.
-- name: force push changes to ceph-releases git repo
-  command: git push -f origin {{ branch }} chdir=ceph
+- name: "force push version commit to working and release {{ branch }} branch"
+  command: git push -f upstream {{ branch }}-release chdir=ceph
+
+- name: "force push the version commit to the {{ branch }} branch"
+  command: git push -f upstream {{ branch }}-release:{{ branch }} chdir=ceph
 
 - name: push the newly created tag
-  command: git push origin v{{ version }} chdir=ceph
+  command: git push upstream v{{ version }} chdir=ceph
index 73792a22dc87facf05e2cbbe95da997c5ac3d0cf..19ad997e83428b2bee2b572e8f2c918418928b18 100644 (file)
@@ -24,7 +24,7 @@
 
     scm:
       - git:
-          url: git@github.com:ceph/ceph-releases.git
+          url: git@github.com:ceph/ceph.git
           # Use the SSH key attached to the ceph-jenkins GitHub account.
           credentials-id: 'jenkins-build'
           # not really a branch, this builds the TAG that was previously
index 32b7aa6e4f6860b737e7c84ccf6836d38a21cae9..34db34ff5deacfdf6256050a2ad96636001e9992 100644 (file)
@@ -16,4 +16,4 @@ install_python_packages $TEMPVENV "pkgs[@]"
 # run ansible to do all the tagging and release specifying
 # a local connection and 'localhost' as the host where to execute
 cd "$WORKSPACE/ceph-build/ansible/"
-$VENV/ansible-playbook -i "localhost," -c local release.yml --extra-vars="version=$VERSION branch=$BRANCH force_version=$FORCE_VERSION release=stable clean=true project=ceph"
+$VENV/ansible-playbook -i "localhost," -c local release.yml --extra-vars="version=$VERSION branch=$BRANCH force_version=$FORCE_VERSION hotfix=$HOTFIX release=stable clean=true project=ceph"
index 6128f4f8ae85e7afbfc44995b258127e595f3570..1feddb1bc769ac8a61639c8dc78ddece58b36776 100644 (file)
@@ -34,6 +34,11 @@ If this is checked, then the builds will be pushed to chacra under the 'test' re
 Defaults to checked."
           default: true
 
+      - string:
+          name: HOTFIX
+          description: "When this is checked, the $BRANCH-release branch will *not* rebase on its parent $BRANCH branch like a regular release would.  This is useful for hotfixes because we can just merge a hotfix into $BRANCH-release then build that branch.  (This is a string because we pass it to `ansible-playbook` as a variable.)"
+          default: 'False'
+
       - bool:
           name: THROWAWAY
           description: "