Re: [libvirt] [libvirt-jenkins-ci PATCH 03/18] ansible: Add libosinfo project
On Tue, 2017-10-03 at 09:59 +0100, Daniel P. Berrange wrote: > > I'm not adamant on keeping this around, as it was mainly a tool > > for me to use during development, but I figure it might come in > > handy later on when some project picks up new (optional) build > > dependencies or we need to add a new project, and I'd rather not > > have to reinvent the wheel when that happens. > > > > Note that none of those tasks is executed unless you manually set > > the 'build' variable to true, so they will not interfere in any > > way with regular CI usage. > > The rules we have defined in the jobs & projects files are in nice > parsable format. Could we have something that just reads that data > and then generates these ansible rules for building outside jenkins Well, I feel like I've spent enough time on this already, at least for the time being, so if that's your condition for keeping the building rules around then I'll happily drop them :) -- Andrea Bolognani / Red Hat / Virtualization -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [libvirt-jenkins-ci PATCH 03/18] ansible: Add libosinfo project
On Tue, Oct 03, 2017 at 09:07:15AM +0200, Andrea Bolognani wrote: > On Mon, 2017-10-02 at 17:04 +0100, Daniel P. Berrange wrote: > > > +- name: '{{ project }}: Run sanity checks' > > > + command: '{{ make }} -j{{ smp }} syntax-check' > > > + args: > > > +chdir: '{{ project }}' > > > + when: > > > +- project == 'libosinfo' > > > > This looks like its duplicating the rules we already have > > defined in the jobs/ files for Jenkins. Why do we need > > this ? > > It's explained in the commit message for patch 2: > > Building projects is entirely controlled by Jenkins in a production > environment, but it can be useful to trigger builds via Ansible > during development to figure out build dependencies and for sanity > checking purposes. > > I'm not adamant on keeping this around, as it was mainly a tool > for me to use during development, but I figure it might come in > handy later on when some project picks up new (optional) build > dependencies or we need to add a new project, and I'd rather not > have to reinvent the wheel when that happens. > > Note that none of those tasks is executed unless you manually set > the 'build' variable to true, so they will not interfere in any > way with regular CI usage. The rules we have defined in the jobs & projects files are in nice parsable format. Could we have something that just reads that data and then generates these ansible rules for building outside jenkins 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 :| -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [libvirt-jenkins-ci PATCH 03/18] ansible: Add libosinfo project
On Mon, 2017-10-02 at 17:04 +0100, Daniel P. Berrange wrote: > > +- name: '{{ project }}: Run sanity checks' > > + command: '{{ make }} -j{{ smp }} syntax-check' > > + args: > > +chdir: '{{ project }}' > > + when: > > +- project == 'libosinfo' > > This looks like its duplicating the rules we already have > defined in the jobs/ files for Jenkins. Why do we need > this ? It's explained in the commit message for patch 2: Building projects is entirely controlled by Jenkins in a production environment, but it can be useful to trigger builds via Ansible during development to figure out build dependencies and for sanity checking purposes. I'm not adamant on keeping this around, as it was mainly a tool for me to use during development, but I figure it might come in handy later on when some project picks up new (optional) build dependencies or we need to add a new project, and I'd rather not have to reinvent the wheel when that happens. Note that none of those tasks is executed unless you manually set the 'build' variable to true, so they will not interfere in any way with regular CI usage. -- Andrea Bolognani / Red Hat / Virtualization -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [libvirt-jenkins-ci PATCH 03/18] ansible: Add libosinfo project
On Mon, Oct 02, 2017 at 05:10:41PM +0200, Andrea Bolognani wrote: > Signed-off-by: Andrea Bolognani> --- > ansible/host_vars/libvirt-centos-7/main.yml | 1 + > ansible/host_vars/libvirt-debian-8/main.yml | 1 + > ansible/host_vars/libvirt-debian-9/main.yml | 1 + > ansible/host_vars/libvirt-fedora-25/main.yml | 1 + > ansible/host_vars/libvirt-fedora-26/main.yml | 1 + > ansible/host_vars/libvirt-fedora-rawhide/main.yml | 1 + > ansible/host_vars/libvirt-freebsd-11/main.yml | 1 + > ansible/host_vars/libvirt-ubuntu-14/main.yml | 1 + > ansible/host_vars/libvirt-ubuntu-16/main.yml | 1 + > ansible/tasks/build.yml | 40 > +++ > ansible/vars/libosinfo/CentOS-7.yml | 19 +++ > ansible/vars/libosinfo/Debian-8.yml | 19 +++ > ansible/vars/libosinfo/Debian-9.yml | 19 +++ > ansible/vars/libosinfo/Fedora-25.yml | 19 +++ > ansible/vars/libosinfo/Fedora-26.yml | 19 +++ > ansible/vars/libosinfo/Fedora-Rawhide.yml | 19 +++ > ansible/vars/libosinfo/FreeBSD-11.yml | 19 +++ > ansible/vars/libosinfo/Ubuntu-14.yml | 19 +++ > ansible/vars/libosinfo/Ubuntu-16.yml | 19 +++ > 19 files changed, 220 insertions(+) > create mode 100644 ansible/vars/libosinfo/CentOS-7.yml > create mode 100644 ansible/vars/libosinfo/Debian-8.yml > create mode 100644 ansible/vars/libosinfo/Debian-9.yml > create mode 100644 ansible/vars/libosinfo/Fedora-25.yml > create mode 100644 ansible/vars/libosinfo/Fedora-26.yml > create mode 100644 ansible/vars/libosinfo/Fedora-Rawhide.yml > create mode 100644 ansible/vars/libosinfo/FreeBSD-11.yml > create mode 100644 ansible/vars/libosinfo/Ubuntu-14.yml > create mode 100644 ansible/vars/libosinfo/Ubuntu-16.yml > > diff --git a/ansible/tasks/build.yml b/ansible/tasks/build.yml > index edb0064..2210261 100644 > --- a/ansible/tasks/build.yml > +++ b/ansible/tasks/build.yml > @@ -12,3 +12,43 @@ >command: git clean -xdf >args: > chdir: '{{ project }}' > + > +# C build > + > +- name: '{{ project }}: Prepare configure options' > + set_fact: > +configure_options: [] > + > +- name: '{{ project }}: Prepare configure options' > + set_fact: > +configure_options: '{{ configure_options }} + [ "{{ features[item] }}" ]' > + with_items: > +'{{ features }}' > + when: > +- features is defined > + > +- name: '{{ project }}: Prepare configure options' > + set_fact: > +configure_options: '{{ configure_options | join(" ") }}' > + > +- name: '{{ project }}: Run autogen.sh' > + command: './autogen.sh {{ configure_options }}' > + args: > +chdir: '{{ project }}' > + environment: > + when: > +- project == 'libosinfo' > + > +- name: '{{ project }}: Build project' > + command: '{{ make }} -j{{ smp }}' > + args: > +chdir: '{{ project }}' > + when: > +- project == 'libosinfo' > + > +- name: '{{ project }}: Run sanity checks' > + command: '{{ make }} -j{{ smp }} syntax-check' > + args: > +chdir: '{{ project }}' > + when: > +- project == 'libosinfo' This looks like its duplicating the rules we already have defined in the jobs/ files for Jenkins. Why do we need this ? 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 :| -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list