rez-release from gitlab-ci

218 views
Skip to first unread message

Thorsten Kaufmann

unread,
Sep 11, 2017, 4:05:34 AM9/11/17
to rez-config
Heya,

i was wondering if anyone else was doing something like this and has some experience to share. We are trying to move
our release processes mostly over to continuous deployment and even plan to revoke write permissions for our tool share
even for developers. This effort is to both make deployments easier (e.g. by accepting a merge request), always documented
and remove the need for low level write access to system critical shares).

I have set up an automatic release process already using rez that essentially works like this:

- Project is in gitlab
- Development is similar to the gitflow process, so you develop in feature and bug branches, merge to develop to "share" and merge to master for releasing.
- There is a gitlab-ci runner that has been prepared for this very project (which is compiled nuke plugins) that essentially calls rez-release

The problem i encountered is, that the gitlab runner seems to do the clone in a detached way and rez-release complains:

23:17:19 ERROR ReleaseVCSError: command failed: c:\program files\git\cmd\git.exe rev-parse --abbrev-ref --symbolic-full-name @{u}
fatal: HEAD does not point to a branch

I worked around this by simply using rez-build instead as a quick fix, but i was wondering if anyone else is going down this route
and would like to share his or her experience.

btw, i do not really have a problem with using rez-build in this process besides "form" as the process ensures in itself that all code is committed
and pushed in this context.

Cheers,
Thorsten

Allan Johns

unread,
Sep 11, 2017, 6:10:23 PM9/11/17
to rez-c...@googlegroups.com
This sounds like a situation where you're taking care of everything VCS-related yourself - presumably you don't need rez-release to be tagging or anything?

If that's the case then I'd suggest we should add a --no-vcs option to rez-release.

Thx
A


--
You received this message because you are subscribed to the Google Groups "rez-config" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rez-config+unsubscribe@googlegroups.com.
To post to this group, send email to rez-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/rez-config.
For more options, visit https://groups.google.com/d/optout.

Sebastian Kral

unread,
Sep 12, 2017, 7:18:54 AM9/12/17
to rez-c...@googlegroups.com
Hey Thorsten,

we are using the exact same approach. GitLab plus CI runner which builds and deploys.
We haven't bothered with using release since we didn't find any benefits and as Allan stated the vcs part is basically covered.

In regards to "all code is committed and pushed in this context", that will always be the case if no one has access to the CI runner (which no one should have). It depends on how you configure the build step to behave but usually it will clone the repo and make sure there are no local changes before it starts building.

Some advice we can give is, try to abstract as much away from GitLab as possible because managing 100s of repos is no fun when you have to change build steps. We created our own little tool to do the default build steps which we call in every .gitlab-ci.yml, this makes changing the build steps a lot easier.

If you have any other questions about our set up feel free to reach out in a private message. Some aspects I can't put on the mailing list.

Cheers,
Sebastian 

To unsubscribe from this group and stop receiving emails from it, send an email to rez-config+...@googlegroups.com.

To post to this group, send email to rez-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/rez-config.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "rez-config" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rez-config+...@googlegroups.com.

To post to this group, send email to rez-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/rez-config.
For more options, visit https://groups.google.com/d/optout.
--
Sent from mobile device

Fede Naum

unread,
Sep 12, 2017, 9:14:20 PM9/12/17
to rez-config
Hi ,

We use Jenkins instead of GitLab CI, and I think we had the same issue. 

23:17:19 ERROR ReleaseVCSError: command failed: c:\program files\git\cmd\git.exe rev-parse --abbrev-ref --symbolic-full-name @{u}
fatal: HEAD does not point to a branch

even when using rez-build not just rez-release

From memory, I think that was only a warning I mean it did not fail the build, but I think we solved by adding an explicit step after checkout 

git checkout ${BRANCHNAME}

if you are releasing always from master then you can hardcode that to master

Cheers,
Fede
Reply all
Reply to author
Forward
0 new messages