From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas.monjalon@6wind.com>
Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45])
 by dpdk.org (Postfix) with ESMTP id 2A6D2567A
 for <ci@dpdk.org>; Thu,  1 Dec 2016 14:45:05 +0100 (CET)
Received: by mail-wm0-f45.google.com with SMTP id g23so299851780wme.1
 for <ci@dpdk.org>; Thu, 01 Dec 2016 05:45:05 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=6wind-com.20150623.gappssmtp.com; s=20150623;
 h=from:to:subject:date:message-id:in-reply-to:references;
 bh=ofCG816M1SVW+zkmP2uq4T4Otmo8moYEnZ/yTQ+CG1g=;
 b=B9Pty8xL87e64WfbgCZPd8z08zQ8NyevWRduV8/mKuntROYHL3kMf1AcEq1B29PGnz
 MEM7GP6ZkEpgtQMIvIB4vMcDspkLw4gdbBXw3ztzTlvReYqJDtta9B/ev4lOu0s+YyaS
 21OP65oW64eLOxdHdrJ+E3W0/gX/C7HpdPVWP7uer5CKNv/XRNcPcqhg74OjLprtH4uk
 v/J3EIXCondkIOvjkHXU3hJZOlFIOW9ZT3Ynbg9S9OoFwu5m6xpjtgM0CR6lVmsd/kUC
 dhVhZE6U46O8OKaT039QsMJSl8CjyVlyugCitAaNRLTCL3fD6ZnRkyzo5lhL7PkTJm9M
 UIsA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to
 :references;
 bh=ofCG816M1SVW+zkmP2uq4T4Otmo8moYEnZ/yTQ+CG1g=;
 b=OIhu5Iou4PkwR9IzDFp2t6yAko/g3hxYtSqMAHeOYwHlAdYGqJs7Bed8vHXIOJN/sh
 4GpiPC1hwjUHDXLN0LmE+niL7GY1+Jnw2SXl9IzaFWjXzxMzsZhZFmjV69ikW9gW+wmD
 Dr+wI/yevbOEP0rVOagBald3i5Gu6DG1l6mKQCZbd0QtHqRYsXc58ALVDa6HB+0RIGuz
 btEgQDABD4/O6UXM585XvHPCIY7kSaliIF78s7EYFS/O7yvcM27yuowLiQkhEDVmfQHL
 81uU+3tSkbKgkrSFEKQuE6rkgJ8jhU8lFWBfZuF4mP98g7DFB02ctdtoLQY9I+8SD5nN
 K0jA==
X-Gm-Message-State: AKaTC027DsPk1s9jSpwpA4zkqWobiHFA7/b60qiJiowIeyY7ntINpjKEetC3d071FNUc1Ri2
X-Received: by 10.28.154.140 with SMTP id c134mr33943416wme.25.1480599904553; 
 Thu, 01 Dec 2016 05:45:04 -0800 (PST)
Received: from XPS13.localdomain (184.203.134.77.rev.sfr.net. [77.134.203.184])
 by smtp.gmail.com with ESMTPSA id c202sm15808333wme.1.2016.12.01.05.45.03
 for <ci@dpdk.org>
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
 Thu, 01 Dec 2016 05:45:03 -0800 (PST)
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: ci@dpdk.org
Date: Thu,  1 Dec 2016 14:44:48 +0100
Message-Id: <1480599892-14190-4-git-send-email-thomas.monjalon@6wind.com>
X-Mailer: git-send-email 2.7.0
In-Reply-To: <1480599892-14190-1-git-send-email-thomas.monjalon@6wind.com>
References: <1480093334-29957-1-git-send-email-thomas.monjalon@6wind.com>
 <1480599892-14190-1-git-send-email-thomas.monjalon@6wind.com>
Subject: [dpdk-ci] [PATCH v2 3/7] config: add loader and template
X-BeenThere: ci@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: CI discussions <ci.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/ci>,
 <mailto:ci-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/ci/>
List-Post: <mailto:ci@dpdk.org>
List-Help: <mailto:ci-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/ci>,
 <mailto:ci-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Thu, 01 Dec 2016 13:45:05 -0000

The configuration file will allow to set some environment-specific
options and paths to be used by the scripts.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 config/ci.config        |  4 ++++
 tools/load-ci-config.sh | 14 ++++++++++++++
 2 files changed, 18 insertions(+)
 create mode 100644 config/ci.config
 create mode 100644 tools/load-ci-config.sh

diff --git a/config/ci.config b/config/ci.config
new file mode 100644
index 0000000..2aeff04
--- /dev/null
+++ b/config/ci.config
@@ -0,0 +1,4 @@
+# Configuration template to be copied in
+#         /etc/dpdk/ci.config
+#     or  ~/.config/dpdk/ci.config
+#     or  .ciconfig
diff --git a/tools/load-ci-config.sh b/tools/load-ci-config.sh
new file mode 100644
index 0000000..9ec18b4
--- /dev/null
+++ b/tools/load-ci-config.sh
@@ -0,0 +1,14 @@
+#! /bin/echo must be loaded with .
+
+# Load DPDK CI config and allow override
+# from system file
+test ! -r /etc/dpdk/ci.config ||
+        . /etc/dpdk/ci.config
+# from user file
+test ! -r ~/.config/dpdk/ci.config ||
+        . ~/.config/dpdk/ci.config
+# from local file
+test ! -r $(dirname $(readlink -m $0))/../.ciconfig ||
+        . $(dirname $(readlink -m $0))/../.ciconfig
+
+# The config files must export variables in the shell style
-- 
2.7.0