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

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

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: