Uploaded image for project: 'IT: Release Engineering'
  1. IT: Release Engineering
  2. RELENG-4545

Migrate Automerge script Python2x code to Python3x

Issue XMLXMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • lftools
    • None
    • OpenDaylight (ODL)

      The python script that works with PyGerrit to merge all changes within a given topic/branch. This is a useful tool for merging a set of autorelease changes or version bump patches during for self-managed projects in ODL. 

      Ex: This takes input of a Gerrit user (for auth), branch, topic etc.

      python merge_changes_in_topic.py -u askb -o jenkins-releng@opendaylight.org -to Phosphorus-SR2 -br stable/phosphorus

      This python script automates a part of the release workflow used for merging
      patches during the version bumping process for a new release.

      The script takes the input file `merge-order.log`. The list of changes are
      obtained from a topic and a merge is initiated when the parent project
      has been merged successfully, determined while listening on stream-events.

      The output is list of changes successfully merged.

      The script requires 'pygerrit' module installed within the virtualenv.

      usage: merge_changes.py [-h] [-g HOSTNAME] [-p PORT] [-u USERNAME] [-b]
                                 [-t SECONDS] [-v] [-i] [-f MERGELOG] [-to TOPIC]
                                 [-br BRANCH] [-o OWNER]

      Ref: https://review.openstack.org/Documentation/cmd-set-reviewers.html

      Steps to test:
      virtualenv ~/.virtualenvs/testpy
      source ~/.virtualenvs/testpy/bin/activate
      pip install --upgrade pygerrit
      python merge_changes_in_topic.py -u askb -o jenkins-releng@opendaylight.org -to Oxygen-SR3 -br stable/oxygen
       

      Code: https://git.opendaylight.org/gerrit/c/releng/builder/+/103678 

      1. Migrate the code to Python3x, it needs to use an updated version of Pygerrit3?.
      2. (optional) Integrate this into lftools

      Note: This tool is only used for automation, so do not run/test this on any of the production Gerrits. 

              bthuree Bengt Thuree
              askb Anil Belur
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: