From nobody Thu Dec 18 13:44:09 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 15069575575851006.8306891446456; Mon, 2 Oct 2017 08:19:17 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6C7CD80460; Mon, 2 Oct 2017 15:19:16 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4E6A499DDF; Mon, 2 Oct 2017 15:19:16 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 0847B18355C6; Mon, 2 Oct 2017 15:19:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v92FBHec019040 for ; Mon, 2 Oct 2017 11:11:17 -0400 Received: by smtp.corp.redhat.com (Postfix) id B8D9A17DDA; Mon, 2 Oct 2017 15:11:17 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.40.205.98]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 17B9417977 for ; Mon, 2 Oct 2017 15:11:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6C7CD80460 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Date: Mon, 2 Oct 2017 17:10:40 +0200 Message-Id: <20171002151056.30841-3-abologna@redhat.com> In-Reply-To: <20171002151056.30841-1-abologna@redhat.com> References: <20171002151056.30841-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [libvirt-jenkins-ci PATCH 02/18] ansible: Add initial support for building projects X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 02 Oct 2017 15:19:16 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Andrea Bolognani --- ansible/group_vars/all/main.yml | 8 ++++++++ ansible/site.yml | 12 ++++++++++++ ansible/tasks/build.yml | 14 ++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 ansible/tasks/build.yml diff --git a/ansible/group_vars/all/main.yml b/ansible/group_vars/all/main.= yml index e8d3cb6..cd97458 100644 --- a/ansible/group_vars/all/main.yml +++ b/ansible/group_vars/all/main.yml @@ -6,3 +6,11 @@ bash: /bin/bash java: /usr/bin/java make: /usr/bin/make sudo: /usr/bin/sudo + +# Wether to build software. While this is useful for figuring out build +# dependencies, it should not be turned on in production because it causes +# extra packages to be installed, which can interfere with the CI jobs +build: false + +# How many parallel jobs to use when building software +smp: 3 diff --git a/ansible/site.yml b/ansible/site.yml index 27af6de..4603a59 100644 --- a/ansible/site.yml +++ b/ansible/site.yml @@ -15,3 +15,15 @@ loop_var: project when: - projects is defined + + - include: tasks/build.yml + with_items: + '{{ projects }}' + loop_control: + loop_var: project + when: + - projects is defined + # base is a pseudo-projects + - project !=3D 'base' + # Building can be turned on and off + - build diff --git a/ansible/tasks/build.yml b/ansible/tasks/build.yml new file mode 100644 index 0000000..edb0064 --- /dev/null +++ b/ansible/tasks/build.yml @@ -0,0 +1,14 @@ +--- +- name: '{{ project }}: Load variables' + include_vars: + file: 'vars/{{ project }}/{{ os_name }}-{{ os_version }}.yml' + +- name: '{{ project }}: Drop local changes' + command: git reset --hard + args: + chdir: '{{ project }}' + +- name: '{{ project }}: Clean up' + command: git clean -xdf + args: + chdir: '{{ project }}' --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list