Uploaded image for project: 'Qt Cloud'
  1. Qt Cloud
  2. CLOUD-74

Git push with options - ci.variable is not recognized via gitpython

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • None
    • Some future release
    • Backend , Git

      We are using gitpython to manage the local git repository. We are also using git push with options to pass on CI build variables during PUSH. However, the following is not working:

      import git
      repo = git.Repo ('/path/to/repo')
      repo.remotes.origin.push("-o ci.variable='env_1=env_value_1'")
      

      This might not be a bug in our code but with gitpython because when we use

      git push -o ci.variable='env_1=env_value_1'
      

      then, it works fine.

      Another point to be noted is that when using

      repo.remotes.origin.push("-o ci.variable='env_1=env_value_1'")
      

      the build is not triggerred at all. However, when we replace the `o` with `-push-option` the build is triggered.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            as33ms Aseem Shakuntal
            as33ms Aseem Shakuntal
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes