From patchwork Mon Jul 23 07:04:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Donnellan X-Patchwork-Id: 947622 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41Ysv32ss6z9s3Z for ; Mon, 23 Jul 2018 17:05:03 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=au1.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 41Ysv31VhwzDr2m for ; Mon, 23 Jul 2018 17:05:03 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=au1.ibm.com X-Original-To: snowpatch@lists.ozlabs.org Delivered-To: snowpatch@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=au1.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=andrew.donnellan@au1.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=au1.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 41Ystr4crfzDqRM for ; Mon, 23 Jul 2018 17:04:52 +1000 (AEST) Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6N73wHd134716 for ; Mon, 23 Jul 2018 03:04:50 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2kd7r4x1v3-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 23 Jul 2018 03:04:50 -0400 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 23 Jul 2018 08:04:46 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 23 Jul 2018 08:04:44 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6N74hhT32505966 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 23 Jul 2018 07:04:43 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9791AAE051; Mon, 23 Jul 2018 10:04:53 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F1A0CAE055; Mon, 23 Jul 2018 10:04:52 +0100 (BST) Received: from ozlabs.au.ibm.com (unknown [9.192.253.14]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 23 Jul 2018 10:04:52 +0100 (BST) Received: from intelligence.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.au.ibm.com (Postfix) with ESMTPSA id CCC5EA039A; Mon, 23 Jul 2018 17:04:39 +1000 (AEST) From: Andrew Donnellan To: snowpatch@lists.ozlabs.org, ruscur@russell.cc Date: Mon, 23 Jul 2018 17:04:31 +1000 X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180723070431.565-1-andrew.donnellan@au1.ibm.com> References: <20180723070431.565-1-andrew.donnellan@au1.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18072307-0008-0000-0000-0000025659E1 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18072307-0009-0000-0000-000021BCC5BA Message-Id: <20180723070431.565-6-andrew.donnellan@au1.ibm.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-07-22_09:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807230084 Subject: [snowpatch] [PATCH v2 6/6] docs: Add configuration documentation X-BeenThere: snowpatch@lists.ozlabs.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Continuous Integration for patch-based workflows List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: snowpatch-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "snowpatch" Add some basic configuration documentation that explains the config file format. Closes: #1 ("Documentation for usage and configuration") Signed-off-by: Andrew Donnellan --- docs/configuration.md | 169 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 docs/configuration.md diff --git a/docs/configuration.md b/docs/configuration.md new file mode 100644 index 000000000000..c7b3b8d66a8e --- /dev/null +++ b/docs/configuration.md @@ -0,0 +1,169 @@ +Configuration +============= + +snowpatch configuration files are in [TOML](https://en.wikipedia.org/wiki/TOML) +format. + +Example configuration files can be found in the [examples](../examples) +directory. + +A snowpatch configuration file contains three global configuration sections +(tables, in TOML terms), `git`, `patchwork` and `jenkins`, and a `projects` +section containing per-project configuration. + + +Git Configuration +----------------- + +The `git` section contains settings for the git SSH transport. + +Example: + +``` +[git] +user = "git" +public_key = "/home/ruscur/.ssh/id_rsa.pub" +private_key = "/home/ruscur/.ssh/id_rsa" +``` + +- `user`: git SSH username (Currently, snowpatch only supports a single git + username for all git remotes - this will be addressed in future.) + +- `public_key`: path to SSH public key, usually `~/.ssh/id_rsa.pub` (optional) + +- `private_key`: path to SSH private key, usually `~/.ssh/id_rsa` + +- `passphrase`: passphrase for SSH private key (optional) + +Patchwork Configuration +----------------------- + +The `patchwork` section contains settings for the Patchwork instance being +monitored. + +Example: + +``` +[patchwork] +url = "https://russell.cc/patchwork" +port = 443 # optional +user = "ruscur" +pass = "banana" +polling_interval = 10 # polling interval in minutes +``` + +- `url`: base URL of the Patchwork instance + +- `port`: port number (optional) + +- `user`: Patchwork username (must be used in conjuction with `pass`) + +- `pass`: Patchwork password (must be used in conjuction with `user`) + +- `token`: Patchwork API token (can be used instead of `user`/`pass`) + +- `polling_interval`: Patchwork polling interval, in minutes + + +Jenkins Configuration +--------------------- + +The `jenkins` section contains settings for the Jenkins instance being used for +builds. + +Example: + +``` +[jenkins] +url = "https://jenkins.ozlabs.ibm.com" +port = 443 +username = "patchwork" +token = "33333333333333333333333333333333" +``` + +- `url`: base URL of the Jenkins instance + +- `port`: port number (optional) + +- `username`: Jenkins username (optional, must be used in conjunction with + `token`) + +- `token`: Jenkins API token (optional, must be used in conjunction with + `username`) + + +Project Configuration +--------------------- + +The `projects` section consists of subsections for each project, which must be +named `project.PROJECT_NAME`, where `PROJECT_NAME` corresponds to the short name +("linkname") of the project in Patchwork. + +Within each project subsection, there is an array called `jobs` which consists +of a table for each Jenkins job that should executed. + +Example: + +``` + [projects.linuxppc-dev] + repository = "/home/ruscur/Documents/linux" + branches = ["master", "powerpc-next"] + # test_all_branches defaults to true + remote_name = "github" + remote_uri = "git@github.com:ruscur/linux.git" + push_results = false + + [[projects.linuxppc-dev.jobs]] + job = "linux-build-manual" + remote = "GIT_REPO" + branch = "GIT_REF" + artifact = "snowpatch.txt" + hefty = true + DEFCONFIG_TO_USE = "pseries_le_defconfig" + + [[projects.linuxppc-dev.jobs]] + job = "linux-build-manual" + remote = "GIT_REPO" + branch = "GIT_REF" + artifact = "snowpatch.txt" + hefty = false + DEFCONFIG_TO_USE = "ppc64le_defconfig" +``` + +- `repository`: path to local clone of git repository + +- `branches`: a list of base branches (as defined by the local git repository) + that patches should be tested against + +- `test_all_branches`: if true, each patch will be tested against all base + branches. If false, a patch will only be tested against the first base branch + to which it successfully applies. (Optional, defaults to true) + +- `remote_name`: the name of the remote, as defined in the local git repository, + to which branches should be pushed so that the Jenkins server can pull them + +- `remote_uri`: the URI of the remote + +- `push_results`: whether test results should be pushed to Patchwork for this project + +Individual jobs contain the following: + +- `job`: the name of the Jenkins job to run + +- `title`: title of the test which will appear in Patchwork (Optional, defaults + to job name) + +- `remote`: the name of the Jenkins build parameter in which the URI of the git + remote will be filled + +- `branch`: the name of the Jenkins build parameter in which the name of the git + branch to which the patch has been applied will be filled + +- `hefty`: whether this job is a "hefty" test. Hefty tests will only be run on + the final patch of a series, while non-hefty tests will be run on every patch + in the series. (Optional, defaults to false) + +- `warn_on_fail`: if true, this job will return a warning rather than a failure + if it fails (Optional, defaults to false) + +- Any further parameters will be passed to Jenkins as build parameters \ No newline at end of file