Gentoo Archives: gentoo-alt

From: Sam Pfeiffer <sammypfeiffer@×××××.com>
To: gentoo-alt@l.g.o
Subject: Re: [gentoo-alt] 'Continuous Integration' for Gentoo Prefix?
Date: Mon, 26 Nov 2018 15:03:08
Message-Id: CABVqfw-NWrDWOMhMvUNyQAbRU1DVZqgtc_RJuDeUKGAz1=t9QA@mail.gmail.com
In Reply to: Re: [gentoo-alt] 'Continuous Integration' for Gentoo Prefix? by Benda Xu
1 Hello everyone,
2
3 I'm very excited to see you are interested in adding continuous integration!
4
5 I don't know that much about continuous integration, I've only used it
6 (with systems already setup for me) with in-house Jenkins servers and with
7 the ROS buildfarm, based on Travis CI on Github. Also a little bit of
8 Gitlab CI in my lab.
9
10 I did a bit of research/testing.
11
12 Given it's quite a hassle to maintain custom machines, I'd try to use some
13 of the free for opensource CI services. I've checked the conditions of a
14 few to see which could fit better:
15
16 * Gitlab CI: 2000 minutes / month
17 * Travis CI: Unlimited minutes / month. But only 50 minutes long per step
18 (like per script executed).
19 * Azure pipelines: Unlimited minutes / month. 360 minutes long per step
20 (like per script executed).
21
22 There are probably many more, but those are the ones I knew about.
23
24 Given that I wanted to give a try to Azure pipelines. And I did!
25
26 I created this repo: https://github.com/awesomebytes/gentoo_prefix_ci_test
27
28 Where I activated Azure pipelines on it. After around 15min of reading the
29 docs and playing around with the web-gui I got my first pipeline running.
30
31 As an initial setup I thought I would create a Docker image where I
32 bootstrap Gentoo Prefix from a Ubuntu 16.04 (as I'm familiar with it with
33 my projects).
34
35 The repo contains two important things:
36 1) The Dockerfile where I mainly trigger the bootstrap:
37 https://github.com/awesomebytes/gentoo_prefix_ci_test/blob/master/Dockerfile
38 2) The configuration file for Azure pipelines on what to do:
39 https://github.com/awesomebytes/gentoo_prefix_ci_test/blob/master/azure-pipelines.yml
40
41 I've implemented here that it tries to build Gentoo Prefix, and whatever
42 the result, it uploads a Docker image to my DockerHub account with the
43 results. This implies that:
44 If the bootstrap is successful, one can just [docker pull] and [docker run]
45 the image to play with Gentoo Prefix.
46 If the bootstrap is unsuccessful, one can just [docker pull] and [docker
47 run] to find oneself in the exact state of the system after the bootstrap
48 command. And one can recover the full console log from the Azure pipelines
49 web interface (even tho it would be nice to find out how to post it
50 publicly straight away).
51
52 If all goes well in a few hours anyone will be able to find in my DockerHub
53 account said image (most probably the failed one), just doing:
54 docker pull awesomebytes/gentoo_prefix_latest_image:latest
55 docker run -it gentoo_prefix_latest_image /bin/bash
56 You'll be inside of a Ubuntu 16.04 box with a user called 'user' and with
57 all the bootstrapped stuff in /tmp/gentoo.
58
59 As curiosity, I checked the machines I got served as 'agents' to run my
60 jobs, and they were of the kind:
61
62 CPUs: 2x Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz
63 RAM: 7GB
64 Disk: 94GB free disk space
65
66 More than enough to bootstrap Gentoo Prefix!
67
68 I don't know if this is the way to go. But at least is interesting to have
69 it in mind.
70
71
72 On Tue, Nov 27, 2018 at 12:01 AM Benda Xu <heroxbd@g.o> wrote:
73
74 > Hi Sam,
75 >
76 > Sam Pfeiffer <sammypfeiffer@×××××.com> writes:
77 >
78 > > With Azure announcing unlimited minutes on CI/CD for open source
79 > > projects:
80 > >
81 > https://azure.microsoft.com/en-us/blog/announcing-azure-pipelines-with-unlimited-ci-cd-minutes-for-open-source/
82 > >
83 > > Even bootstrapping Gentoo prefix, with pieces of software like gcc
84 > > taking very long to compile, is possible.
85 > >
86 > > The point is: I have been trying to build Gentoo Prefix during the
87 > > last days after a few months of break since the last time I touched
88 > > the system. And it's failing. I haven't managed yet to bootstrap it
89 > > completely. I feel there is no CI/CD setup to catch these issues and
90 > > be able to offer a working version of Gentoo Prefix at any time.
91 >
92 > I completely agree with you. I hope you can carry on this project to
93 > setup proper CI for Gentoo Prefix. I am all in for help, portage/ebuild
94 > mentoring and coorperation.
95 >
96 > A CI for Gentoo Prefix has been on my list for ages. Thank you for
97 > triggering this.
98 >
99 > Yours,
100 > Benda
101 >
102 >
103
104 --
105
106 *Sammy Pfeiffer*
107 PhD Candidate at The Magic Lab within UTS.

Replies

Subject Author
Re: [gentoo-alt] 'Continuous Integration' for Gentoo Prefix? Sam Pfeiffer <sammypfeiffer@×××××.com>