All of lore.kernel.org
 help / color / mirror / Atom feed
* gitlab-ci helper scripts for OpenEmbedded builds
@ 2019-09-23 21:48 Yann Dirson
  2019-09-24 12:36 ` Thomas Goodwin
  2019-09-24 16:32 ` Robert Berger@yocto.user
  0 siblings, 2 replies; 6+ messages in thread
From: Yann Dirson @ 2019-09-23 21:48 UTC (permalink / raw)
  To: yocto; +Cc: bunk, Simon Spannagel

Hi all,

We released our scripts to help in setting up continuous integration
of a yocto-based project
using Gitlab-CI.  You'll find the repository at
https://github.com/BladeGroup/gitlab-oe

Although we're using this in production, it still has a couple of
rough edges and may need
tuning for different usages.  We'd love to hear how well it fits (or
doesn't fit ;) with other use
cases, and will gladly consider evolutions to make it more generally usable.

Best regards,
-- 
Yann Dirson <yann@blade-group.com>
Blade / Shadow -- http://shadow.tech


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: gitlab-ci helper scripts for OpenEmbedded builds
  2019-09-23 21:48 gitlab-ci helper scripts for OpenEmbedded builds Yann Dirson
@ 2019-09-24 12:36 ` Thomas Goodwin
  2019-09-24 16:38   ` Robert Berger@yocto.user
  2019-09-25  9:17   ` Yann Dirson
  2019-09-24 16:32 ` Robert Berger@yocto.user
  1 sibling, 2 replies; 6+ messages in thread
From: Thomas Goodwin @ 2019-09-24 12:36 UTC (permalink / raw)
  To: Yann Dirson; +Cc: yocto, Simon Spannagel, bunk

[-- Attachment #1: Type: text/plain, Size: 3137 bytes --]

Hi Yann,

Thanks for sharing! We're working through something similar using a tweak
to the CROPS docker containers and GitLab-CI (we started with autobuilder
2, so we've actually merged quite a bit of that experience with our GitLab
setup).

Using docker runners as our cluster, we setup volume mounts to the host
system for caching the shared state and downloads directories (as well as
other artifacts upon successful build).  As part of the CI setup, we then
insert a build/conf/auto.conf file that enforces the usage of that volume
(DL_DIR and SSTATE_DIR).  At the deploy stage (package feeds, etc. like
you're doing), we did the same thing -- copy out to that path so that it
ends up on the network share rather than the container.

Also like you, we're using the "include" and "extends" instructions
throughout so that we have a top-level "common" set of CI YAML includes
alongside a growing set of repositories for each machine-specific build.
Each of those repositories follows the Yocto release branching style so
that we can trace build success to newer releases by simply creating a
branch and using the branch name for the initial clone of the layers.

One thing that came directly from our autobuilder 2 experience is a way to
inject extra variables into the autoconf.  AB2 called this *EXTRAARGS*,
which was simply a list of variables to add.  For our common CI "setup"
stage, we check for a file of the same name (extraargs.conf) and append it
to the auto.conf if it exists.  In this way our downstream projects can
simply include that file if necessary and version control it as new release
branches are added.

One of the drawbacks we've seen in going this route is that every
repository has its own build timeout limit, which is always laughably
small.  There's a backlog issue on GitLab for a global definition of this
value, but it's slated for 12.7 (I think).

I'm hoping to put a write-up out soon with examples for how this all worked
together, but I want to hold off until we can get the CROPS changes we
needed upstreamed in a way that doesn't break those containers for everyone
else (something about the entrypoint doesn't appreciate the runner's
bash/shell detection script).

Cheers,

Thomas

Geon Technologies, LLC


On Mon, Sep 23, 2019 at 5:50 PM Yann Dirson <yann.dirson@blade-group.com>
wrote:

> Hi all,
>
> We released our scripts to help in setting up continuous integration
> of a yocto-based project
> using Gitlab-CI.  You'll find the repository at
> https://github.com/BladeGroup/gitlab-oe
>
> Although we're using this in production, it still has a couple of
> rough edges and may need
> tuning for different usages.  We'd love to hear how well it fits (or
> doesn't fit ;) with other use
> cases, and will gladly consider evolutions to make it more generally
> usable.
>
> Best regards,
> --
> Yann Dirson <yann@blade-group.com>
> Blade / Shadow -- http://shadow.tech
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>

[-- Attachment #2: Type: text/html, Size: 4719 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: gitlab-ci helper scripts for OpenEmbedded builds
  2019-09-23 21:48 gitlab-ci helper scripts for OpenEmbedded builds Yann Dirson
  2019-09-24 12:36 ` Thomas Goodwin
@ 2019-09-24 16:32 ` Robert Berger@yocto.user
  1 sibling, 0 replies; 6+ messages in thread
From: Robert Berger@yocto.user @ 2019-09-24 16:32 UTC (permalink / raw)
  To: Yann Dirson, yocto; +Cc: bunk, Simon Spannagel

Hi,

On 23/09/2019 23:48, Yann Dirson wrote:
> Hi all,
> 
> We released our scripts to help in setting up continuous integration
> of a yocto-based project
> using Gitlab-CI.  You'll find the repository at
> https://github.com/BladeGroup/gitlab-oe

I am currently not too far away from cern.ch ;)

Thanks!

Regards,

Robert



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: gitlab-ci helper scripts for OpenEmbedded builds
  2019-09-24 12:36 ` Thomas Goodwin
@ 2019-09-24 16:38   ` Robert Berger@yocto.user
  2019-09-25  9:17   ` Yann Dirson
  1 sibling, 0 replies; 6+ messages in thread
From: Robert Berger@yocto.user @ 2019-09-24 16:38 UTC (permalink / raw)
  To: Thomas Goodwin, Yann Dirson; +Cc: yocto, Simon Spannagel, bunk

Hi Thomas,

Please see my comments below.

On 24/09/2019 14:36, Thomas Goodwin wrote:
> Hi Yann,
> 
> Thanks for sharing! We're working through something similar using a 
> tweak to the CROPS docker containers and GitLab-CI (we started with 
> autobuilder 2, so we've actually merged quite a bit of that experience 
> with our GitLab setup).
> 

I really would like to discuss details about your setup.
Seems quite interesting!

> 
> Cheers,
> 
> Thomas
> 
> Geon Technologies, LLC
> 

Regards,

Robert


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: gitlab-ci helper scripts for OpenEmbedded builds
  2019-09-24 12:36 ` Thomas Goodwin
  2019-09-24 16:38   ` Robert Berger@yocto.user
@ 2019-09-25  9:17   ` Yann Dirson
  2019-10-07 15:17     ` Thomas Goodwin
  1 sibling, 1 reply; 6+ messages in thread
From: Yann Dirson @ 2019-09-25  9:17 UTC (permalink / raw)
  To: Thomas Goodwin; +Cc: yocto, Simon Spannagel, Adrian Bunk

[-- Attachment #1: Type: text/plain, Size: 3556 bytes --]

Hi Thomas,

Le mar. 24 sept. 2019 à 14:36, Thomas Goodwin <btgoodwin@geontech.com> a
écrit :

> Hi Yann,
>
> Thanks for sharing! We're working through something similar using a tweak
> to the CROPS docker containers and GitLab-CI (we started with autobuilder
> 2, so we've actually merged quite a bit of that experience with our GitLab
> setup).
>

Thanks for pointing me to CROPS, that will help bringing Docker support
here :)


> Using docker runners as our cluster, we setup volume mounts to the host
> system for caching the shared state and downloads directories (as well as
> other artifacts upon successful build).  As part of the CI setup, we then
> insert a build/conf/auto.conf file that enforces the usage of that volume
> (DL_DIR and SSTATE_DIR).  At the deploy stage (package feeds, etc. like
> you're doing), we did the same thing -- copy out to that path so that it
> ends up on the network share rather than the container.
>
> Also like you, we're using the "include" and "extends" instructions
> throughout so that we have a top-level "common" set of CI YAML includes
> alongside a growing set of repositories for each machine-specific build.
> Each of those repositories follows the Yocto release branching style so
> that we can trace build success to newer releases by simply creating a
> branch and using the branch name for the initial clone of the layers.
>
> One thing that came directly from our autobuilder 2 experience is a way to
> inject extra variables into the autoconf.  AB2 called this *EXTRAARGS*,
> which was simply a list of variables to add.  For our common CI "setup"
> stage, we check for a file of the same name (extraargs.conf) and append it
> to the auto.conf if it exists.  In this way our downstream projects can
> simply include that file if necessary and version control it as new release
> branches are added.
>
> One of the drawbacks we've seen in going this route is that every
> repository has its own build timeout limit, which is always laughably
> small.  There's a backlog issue on GitLab for a global definition of this
> value, but it's slated for 12.7 (I think).
>
> I'm hoping to put a write-up out soon with examples for how this all
> worked together, but I want to hold off until we can get the CROPS changes
> we needed upstreamed in a way that doesn't break those containers for
> everyone else (something about the entrypoint doesn't appreciate the
> runner's bash/shell detection script).
>

Looking forward to this!


> Cheers,
>
> Thomas
>
> Geon Technologies, LLC
>
>
> On Mon, Sep 23, 2019 at 5:50 PM Yann Dirson <yann.dirson@blade-group.com>
> wrote:
>
>> Hi all,
>>
>> We released our scripts to help in setting up continuous integration
>> of a yocto-based project
>> using Gitlab-CI.  You'll find the repository at
>> https://github.com/BladeGroup/gitlab-oe
>>
>> Although we're using this in production, it still has a couple of
>> rough edges and may need
>> tuning for different usages.  We'd love to hear how well it fits (or
>> doesn't fit ;) with other use
>> cases, and will gladly consider evolutions to make it more generally
>> usable.
>>
>> Best regards,
>> --
>> Yann Dirson <yann@blade-group.com>
>> Blade / Shadow -- http://shadow.tech
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>>
>

-- 
Yann Dirson <yann@blade-group.com>
Blade / Shadow -- http://shadow.tech

[-- Attachment #2: Type: text/html, Size: 5938 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: gitlab-ci helper scripts for OpenEmbedded builds
  2019-09-25  9:17   ` Yann Dirson
@ 2019-10-07 15:17     ` Thomas Goodwin
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Goodwin @ 2019-10-07 15:17 UTC (permalink / raw)
  To: Yann Dirson; +Cc: yocto, Simon Spannagel, Adrian Bunk

[-- Attachment #1: Type: text/plain, Size: 4984 bytes --]

The CROPS changes are all upstream now, so I've put up an example gist
here: https://gist.github.com/btgoodwin/028c3a63315a27cae3c5989455058eef.

There are comments throughout the files, and I'm still hammering out the
"deploy" stage.  There are ongoing quirks like in the case of deploying the
SDK, despite running the populate_sdk task at the start of the stage, the
related sdk directory doesn't exist or is empty as if it was not unpacked
from the shared state cache (I could not replicate this behavior at my
desk).  Another odd behavior was getting a bitbake worker halt error as if
the container ran out of space or memory, but the server doesn't agree with
that information.

One improvement I would suggest for anyone going this route would be to
have 2 separate definitions for artifacts.  The files only get touched in
the setup stage, so that should be the long-running artifact to collect
whereas all others could be trimmed back to perhaps a few minutes of keep
time.  This would prevent a copy of those artifacts being present at every
job and retained for a week (which would be a good GB for a whole pipeline
depending on how many layers and the size of the layer history).

Cheers,

Thomas


On Wed, Sep 25, 2019 at 5:17 AM Yann Dirson <yann.dirson@blade-group.com>
wrote:

> Hi Thomas,
>
> Le mar. 24 sept. 2019 à 14:36, Thomas Goodwin <btgoodwin@geontech.com> a
> écrit :
>
>> Hi Yann,
>>
>> Thanks for sharing! We're working through something similar using a tweak
>> to the CROPS docker containers and GitLab-CI (we started with autobuilder
>> 2, so we've actually merged quite a bit of that experience with our GitLab
>> setup).
>>
>
> Thanks for pointing me to CROPS, that will help bringing Docker support
> here :)
>
>
>> Using docker runners as our cluster, we setup volume mounts to the host
>> system for caching the shared state and downloads directories (as well as
>> other artifacts upon successful build).  As part of the CI setup, we then
>> insert a build/conf/auto.conf file that enforces the usage of that volume
>> (DL_DIR and SSTATE_DIR).  At the deploy stage (package feeds, etc. like
>> you're doing), we did the same thing -- copy out to that path so that it
>> ends up on the network share rather than the container.
>>
>> Also like you, we're using the "include" and "extends" instructions
>> throughout so that we have a top-level "common" set of CI YAML includes
>> alongside a growing set of repositories for each machine-specific build.
>> Each of those repositories follows the Yocto release branching style so
>> that we can trace build success to newer releases by simply creating a
>> branch and using the branch name for the initial clone of the layers.
>>
>> One thing that came directly from our autobuilder 2 experience is a way
>> to inject extra variables into the autoconf.  AB2 called this *EXTRAARGS*,
>> which was simply a list of variables to add.  For our common CI "setup"
>> stage, we check for a file of the same name (extraargs.conf) and append it
>> to the auto.conf if it exists.  In this way our downstream projects can
>> simply include that file if necessary and version control it as new release
>> branches are added.
>>
>> One of the drawbacks we've seen in going this route is that every
>> repository has its own build timeout limit, which is always laughably
>> small.  There's a backlog issue on GitLab for a global definition of this
>> value, but it's slated for 12.7 (I think).
>>
>> I'm hoping to put a write-up out soon with examples for how this all
>> worked together, but I want to hold off until we can get the CROPS changes
>> we needed upstreamed in a way that doesn't break those containers for
>> everyone else (something about the entrypoint doesn't appreciate the
>> runner's bash/shell detection script).
>>
>
> Looking forward to this!
>
>
>> Cheers,
>>
>> Thomas
>>
>> Geon Technologies, LLC
>>
>>
>> On Mon, Sep 23, 2019 at 5:50 PM Yann Dirson <yann.dirson@blade-group.com>
>> wrote:
>>
>>> Hi all,
>>>
>>> We released our scripts to help in setting up continuous integration
>>> of a yocto-based project
>>> using Gitlab-CI.  You'll find the repository at
>>> https://github.com/BladeGroup/gitlab-oe
>>>
>>> Although we're using this in production, it still has a couple of
>>> rough edges and may need
>>> tuning for different usages.  We'd love to hear how well it fits (or
>>> doesn't fit ;) with other use
>>> cases, and will gladly consider evolutions to make it more generally
>>> usable.
>>>
>>> Best regards,
>>> --
>>> Yann Dirson <yann@blade-group.com>
>>> Blade / Shadow -- http://shadow.tech
>>> --
>>> _______________________________________________
>>> yocto mailing list
>>> yocto@yoctoproject.org
>>> https://lists.yoctoproject.org/listinfo/yocto
>>>
>>
>
> --
> Yann Dirson <yann@blade-group.com>
> Blade / Shadow -- http://shadow.tech
>
>

[-- Attachment #2: Type: text/html, Size: 7771 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-10-07 15:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-23 21:48 gitlab-ci helper scripts for OpenEmbedded builds Yann Dirson
2019-09-24 12:36 ` Thomas Goodwin
2019-09-24 16:38   ` Robert Berger@yocto.user
2019-09-25  9:17   ` Yann Dirson
2019-10-07 15:17     ` Thomas Goodwin
2019-09-24 16:32 ` Robert Berger@yocto.user

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.