[Spice-devel] [linux/vd-agent 2/3] gitlab-ci: Move the dependencies to a variable

Victor Toso victortoso at redhat.com
Wed Feb 27 14:53:06 UTC 2019


Hi,

On Wed, Feb 27, 2019 at 09:36:55AM -0500, Frediano Ziglio wrote:
> > 
> > Hi,
> > 
> > On Wed, Feb 27, 2019 at 11:13:06AM +0000, Victor Toso wrote:
> > > From: Victor Toso <me at victortoso.com>
> > > 
> > > Signed-off-by: Victor Toso <victortoso at redhat.com>
> > > ---
> > >  .gitlab-ci.yml | 16 ++++++++++------
> > >  1 file changed, 10 insertions(+), 6 deletions(-)
> > > 
> > > diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> > > index ad4fb80..fc40c04 100644
> > > --- a/.gitlab-ci.yml
> > > +++ b/.gitlab-ci.yml
> > > @@ -1,12 +1,16 @@
> > >  image: fedora:latest
> > >  
> > > +variables:
> > > +  DEPS_COMMON: git libtool make python3 python3-six redhat-rpm-config
> > > +      bzip2 python3-pyparsing meson ninja-build gtk-doc glib2-devel
> > > +      gettext gettext-devel libpciaccess-devel alsa-lib-devel
> > > +      libXfixes-devel libX11-devel libXrandr-devel libXinerama-devel
> > > +      gtk3-devel dbus-devel systemd-devel
> > > +
> > >  before_script:
> > > -  - >
> > > -    dnf install 'dnf-command(copr)' git libtool make redhat-rpm-config
> > > bzip2
> > > -    python3 python3-six python3-pyparsing
> > > -    -y
> > > -  - dnf copr enable @spice/nightly -y
> > > -  - dnf builddep spice-vdagent -y
> > > +  - dnf install -y $DEPS_COMMON
> > > +  - git clone ${CI_REPOSITORY_URL/vd_agent/spice-protocol}
> > 
> > tbh, I'm afraid of using $CI_REPOSITORY_URL with the path above
> > because vd_agent project is under linux subgroup. For the moment,
> > I'll add the path to spice-protocol git master which is good
> > replacement to nightly of spice-protocol and I'll be testing how
> > to get proper path/branches here (unless anyone knows already :))
> > 
> >     https://gitlab.freedesktop.org/victortoso/vd_agent/pipelines/21603
> > 
> > 3:06 instead of 16+ and 21+ as it was Yesterday. Cool.
> > 
> 
> To test the value just
> 
>     echo $CI_REPOSITORY_URL
> 
> For the replacement you can use
> 
>    ${CI_REPOSITORY_URL/linux\/vd_agent/spice-protocol}

Yes but, when you *fork* it to work on your own repository, the
linux path is not included which would break CI in this case :)

Anyway, this seems a bit wrong anyway as we are cloning user's
spice-protocol and building its master. I myself, don't use
master branch in my local repos, I use branches with the same
name as the feat I'm working on, let's say, "this-cool-feature"
in spice-gtk, spice (server) and spice-protocol...

IMHO, the preference here is to check if user's repository
contains "this-cool-feature" branch (I mean, the same as
gitlab-ci is about to test) and if there is, clone and build
that. Otherwise, clone and build latest's master.. What I sent as
v2 does the later, I want to try the branch thing later on.

Cheers,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20190227/3780fc97/attachment.sig>


More information about the Spice-devel mailing list