<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 18, 2016 at 9:03 PM, Vojtech Szocs <span dir="ltr"><<a href="mailto:vszocs@redhat.com" target="_blank">vszocs@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Hello folks,<br>
<br>
this was discussed some time ago, but we're gonna make oVirt Dashboard<br>
build-artifacts.sh tag-sensitive (if the commit is tagged, it indicates<br>
release build, so we'll drop the {date}git{commit} part of RPM release).<br>
<br>
The relevant Dashboard patch is here: <a href="https://gerrit.ovirt.org/#/c/60988/" rel="noreferrer" target="_blank">https://gerrit.ovirt.org/#/c/60988/</a><br>
<br>
Question: is it possible to execute build-artifacts.sh after a tag gets<br>
pushed into Gerrit repo? (or at least make it opt-in via the Jenkins job<br>
config somehow?)<br>
<br>
Or should we just use Jenkins / Gerrit manual trigger to re-build from<br>
given commit once it's tagged in Gerrit repo?<br></blockquote><div><br></div><div>I think the best way will be to add logic to build artifacts code (post merge)</div><div>Same as you're doing in the patch, so once you merge a tag, its same as you would have a merge a code change, </div><div>build-artifacts.sh will trigger a new build and create the rpm based on the logic you will tell him.</div><div><br></div><div>Another option will be to add new file called build-official-artifacts.sh which will only build from tags</div><div>and then we can collect it to stable repos instead of snapshot repos, I will need to see what</div><div>does it mean to add another 'build artifacts' job to standard CI, but I don't believe it should be complicated, probably another stage like we have check-patch and check-merged. </div><div><br>I actually wanted to suggest this option as a first attempt to automate the official builds and stop using the manual way of tar.gz,</div><div>One more thing you might want to do in the official build artifacts is to sign the RPM.</div><div><br></div><div>As for manual trigger, you can do it today with build-artifacts, just give it the tag refspec:</div><div><a href="http://jenkins.ovirt.org/job/ovirt-engine-dashboard_4.0_build-artifacts-el7-x86_64/build?delay=0sec">http://jenkins.ovirt.org/job/ovirt-engine-dashboard_4.0_build-artifacts-el7-x86_64/build?delay=0sec</a><br></div><div><br></div><div>instead of: refs/heads/ovirt-engine-dashboard-1.0</div><div>put: refs/tags/ovirt-dashboard-tag (replace with real tag)</div><div><br></div><div>But i'm not sure this will change the rpm name, you probably will need to change the job or create the official job for that...</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<br>
Thanks,<br>
Vojtech<br>
<span class="im"><br>
<br>
----- Original Message -----<br>
> From: "Vojtech Szocs" <<a href="mailto:vszocs@redhat.com">vszocs@redhat.com</a>><br>
> To: "David Caro" <<a href="mailto:dcaro@redhat.com">dcaro@redhat.com</a>><br>
> Cc: "infra" <<a href="mailto:infra@ovirt.org">infra@ovirt.org</a>><br>
</span><div class=""><div class="h5">> Sent: Wednesday, June 22, 2016 7:04:19 PM<br>
> Subject: Re: [Jenkins] Passing parameters to build-artifacts.sh<br>
><br>
><br>
><br>
> ----- Original Message -----<br>
> > From: "David Caro" <<a href="mailto:dcaro@redhat.com">dcaro@redhat.com</a>><br>
> > To: "Nir Soffer" <<a href="mailto:nsoffer@redhat.com">nsoffer@redhat.com</a>><br>
> > Cc: "infra" <<a href="mailto:infra@ovirt.org">infra@ovirt.org</a>><br>
> > Sent: Wednesday, June 22, 2016 6:31:44 PM<br>
> > Subject: Re: [Jenkins] Passing parameters to build-artifacts.sh<br>
> ><br>
> > On 06/22 19:21, Nir Soffer wrote:<br>
> > > On Wed, Jun 22, 2016 at 6:47 PM, Barak Korren <<a href="mailto:bkorren@redhat.com">bkorren@redhat.com</a>> wrote:<br>
> > > > This could be done, but not trival to do, and also requires you to<br>
> > > > know,<br>
> > > > before merging, that this is the patch you are gonna release.<br>
> > > ><br>
> > > > A differnt but somewhat common practice is to use git tagging and 'git<br>
> > > > describe' to set the package version.<br>
> > > > We can make build_artifacts trigger when a tag is pushed, AFAIK Lago<br>
> > > > already<br>
> > > > does that...<br>
> > > ><br>
> > > > בתאריך 22 ביוני 2016 18:39, "Vojtech Szocs" <<a href="mailto:vszocs@redhat.com">vszocs@redhat.com</a>> כתב:<br>
> > > ><br>
> > > >> Hi,<br>
> > > >><br>
> > > >> I'm just curious whether it's possible to do the following:<br>
> > > >><br>
> > > >> Let's say we have a project (ovirt-engine-dashboard) built by Jenkins,<br>
> > > >> which means there's a Jenkins job that runs build-artifacts.sh script<br>
> > > >> whenever a patch gets merged via gerrit.<br>
> > > >><br>
> > > >> Can we somehow pass custom parameters to build-artifacts.sh for such<br>
> > > >> (Jenkins CI) builds?<br>
> > > >><br>
> > > >> For example, putting something like this into commit message:<br>
> > > >><br>
> > > >> My-Param 123<br>
> > > >><br>
> > > >> would reflect into `My-Param` env. variable when running the script?<br>
> > > >><br>
> > > >> Motivation: for release builds (which shouldn't contain the "snapshot"<br>
> > > >> part [*] in RPM release string), pass parameter to build-artifacts.sh<br>
> > > >> that ensures the "snapshot" part is empty. This way, we don't need to<br>
> > > >> patch the project prior to release (remove "snapshot" in spec) & then<br>
> > > >> patch it again after the release (re-add "snapshot" in spec).<br>
> > > >><br>
> > > >> [*] {date}git{commit}<br>
> > ><br>
> > > How about adding a flag to the project yaml?<br>
> > ><br>
> > > For example:<br>
> > ><br>
> > > version:<br>
> > > - master:<br>
> > > branch: master<br>
> > > - 0.16:<br>
> > > branch: ioprocess-0.16<br>
> > > release: true<br>
> > ><br>
> > > Then run build-artifacts with RELEASE=1 environment variable, so we can<br>
> > > tell that this is a release build, and create release friendly rpms?<br>
> ><br>
> > That's not better than adding a commit to the project for each release imo.<br>
> ><br>
> > I'd go for the tag thingie actually, just detecting that you are in a tag<br>
> > to<br>
> > control if the extra 'snapshot' should be added or not.<br>
><br>
> Yes, this sounds like the most correct approach. We'll need to tag anyway :)<br>
><br>
> As mentioned above, it would be really nice if build-artifacts was invoked<br>
> also when pushing new tag to remote.<br>
><br>
> ><br>
> > ><br>
> > > Nir<br>
> > > _______________________________________________<br>
> > > Infra mailing list<br>
> > > <a href="mailto:Infra@ovirt.org">Infra@ovirt.org</a><br>
> > > <a href="http://lists.ovirt.org/mailman/listinfo/infra" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman/listinfo/infra</a><br>
> ><br>
> > --<br>
> > David Caro<br>
> ><br>
> > Red Hat S.L.<br>
> > Continuous Integration Engineer - EMEA ENG Virtualization R&D<br>
> ><br>
> > Tel.: <a href="tel:%2B420%20532%20294%20605" value="+420532294605">+420 532 294 605</a><br>
> > Email: <a href="mailto:dcaro@redhat.com">dcaro@redhat.com</a><br>
> > IRC: dcaro|dcaroest@{freenode|oftc|redhat}<br>
> > Web: <a href="http://www.redhat.com" rel="noreferrer" target="_blank">www.redhat.com</a><br>
> > RHT Global #: 82-62605<br>
> ><br>
> > _______________________________________________<br>
> > Infra mailing list<br>
> > <a href="mailto:Infra@ovirt.org">Infra@ovirt.org</a><br>
> > <a href="http://lists.ovirt.org/mailman/listinfo/infra" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman/listinfo/infra</a><br>
> ><br>
> _______________________________________________<br>
> Infra mailing list<br>
> <a href="mailto:Infra@ovirt.org">Infra@ovirt.org</a><br>
> <a href="http://lists.ovirt.org/mailman/listinfo/infra" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman/listinfo/infra</a><br>
><br>
_______________________________________________<br>
Infra mailing list<br>
<a href="mailto:Infra@ovirt.org">Infra@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/infra" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman/listinfo/infra</a><br>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Eyal Edri<br>Associate Manager</div><div>RHEV DevOps<br>EMEA ENG Virtualization R&D<br>Red Hat Israel<br><br>phone: +972-9-7692018<br>irc: eedri (on #tlv #rhev-dev #rhev-integ)</div></div></div></div></div>
</div></div>