On Tue, Apr 17, 2018 at 03:28:38PM +0200, Andrea Bolognani wrote:
On Tue, 2018-04-17 at 14:11 +0100, Daniel P. Berrangé wrote:
> On Tue, Apr 17, 2018 at 02:52:08PM +0200, Andrea Bolognani wrote:
> > Are you sure? It seems to me like the problem stems from the fact
> > that we have both
> >
> > - job-template:
> > id: autotools-build-job
> > name: '{name}-{branch}-build'
> >
> > and
> >
> > - job-template:
> > id: generic-build-job
> > name: '{name}-{branch}-build'
> >
> > Even if we had a separate 'projname' parameter, the names of the
> > generated jobs would end up being the same.
>
> I meant that if we had 'projname' parameter, then we have the
> ability to override the job name using:
>
> 'name: libvirt-master-website'
>
> without affecting all the expansion of all the other bits of the
> template, as they now get driven by {projname} instead.
Okay, I see what you mean now.
I'm not sure I would necessarily consider it a better approach,
though: it requires making *all* project definitions uglier ('name'
just looks more natural than 'projname' IMHO), with a bunch of churn
to get there, and after all that trouble the libvirt-master-website
job still needs to break the template abstraction in order to work
at all.
Personally I'd like to do the name -> jobname change regardless,
but I don't think its actually needed after all.
Instead just change the templates from doing
name: '{name}-{branch}-build'
to
name: '{name}-{branch}-build{jobsuffix}'
Then the website job can just set
jobsuffix: website
and everything else can leave it unset
Regards,
Daniel
--
|:
https://berrange.com -o-
https://www.flickr.com/photos/dberrange :|
|:
https://libvirt.org -o-
https://fstop138.berrange.com :|
|:
https://entangle-photo.org -o-
https://www.instagram.com/dberrange :|