Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

override git plugin config in package.py #871

Closed
alexxbb opened this issue Apr 2, 2020 · 4 comments
Closed

override git plugin config in package.py #871

alexxbb opened this issue Apr 2, 2020 · 4 comments

Comments

@alexxbb
Copy link

alexxbb commented Apr 2, 2020

What is the proper way of overriding allow_no_upstream config property in package.py?

I found this code

And tried various ways with no success:

with scope("config") as c:
    c.plugins.release_vcs.git.allow_no_upstream = True
# found this in some of the test files, it fails with an error
with scope("config") as c:
    c.override("plugins.release_vcs.git.allow_no_upstream", True)
with scope("plugins"):
  with scope("release_vcs"):
    with scope("git"):
      allow_no_upstream = True
@nerdvegas
Copy link
Contributor

Hey, I can't repro this unfortunately, it's working for me (using the first form listed). What os/rez-version? What was the specific error message you got?

@alexxbb
Copy link
Author

alexxbb commented Apr 2, 2020

Hi Allan,
I'm getting this error:

ReleaseVCSError: command failed: /usr/bin/git rev-parse --abbrev-ref --symbolic-full-name '@{u}'
fatal: HEAD does not point to a branch

rez-release --skip-repo-errors works, I thought I keep the settings within the package.py
This is needed for a release with a gitlab CI job, it checks out a tag, and therefore the HEAD is missing.

>> rez --version
Rez 2.53.1
>>python --version
Python 2.7.5
CentoOS 7

We have REZ_CONFIG_FILE point to our studio config, and there is a plugins dictionary with just the emailer plugin configured, I tried this too, but got the same error.

env REZ_CONFIG_FILE="" rez-release
# -*- coding: utf-8 -*-
name = '...'
version = '1.6.12'
authors = []

requires = []
variants = [['houdini-18.0', 'python-2']]
private_build_requires = ['fxBuildTools-4']

with scope("config") as c:
    c.release_packages_path = "/shots/fx/home/software/packages"
    c.plugins.release_hook.emailer.recipients = []
    c.plugins.release_vcs.git.allow_no_upstream = True

def commands():
    env.HOUDINI_PATH.prepend("{root}/houdini")
    env.PATH.prepend("{root}/bin")
    env.PYTHONPATH.prepend("{root}/python")


uuid = '173c976d-43f4-460f-924b-0abbb41a04e1'

@alexxbb
Copy link
Author

alexxbb commented Apr 2, 2020

Also this:

with scope("config") as c:
    print(c.plugins)
{'release_hook': {'emailer': {'recipients': ['xxx@imageworks.com']}}}

@nerdvegas
Copy link
Contributor

nerdvegas commented Apr 2, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants