Merge "Setup tools in global-jjb tox.ini"
[releng/global-jjb.git] / docs / configuration.rst
1 .. _global-jjb-configuration:
2
3 #############
4 Configuration
5 #############
6
7 .. _defaults-yaml:
8
9 defaults.yaml
10 =============
11
12 This file lives in the ci-management repo typically under the path
13 ``jjb/defaults.yaml``. The purpose of this file is to store default variable
14 values used by global-jjb templates.
15
16 **Required**
17
18 :jenkins-ssh-credential: The name of the Jenkins Credential to
19     use for ssh connections. (ex: jenkins-ssh)
20
21 :lftools-version: Version of lftools to install. Can be a specific version
22     like '0.6.1' or a `PEP-440 definition <https://www.python.org/dev/peps/pep-0440/>`_
23     For example `<1.0.0` or `>=1.0.0,<2.0.0`.
24
25 :mvn-site-id: Maven Server ID from settings.xml containing the credentials
26     to push to a Maven site repository.
27
28 :mvn-staging-id: Maven Server ID from settings.xml containing the credentials
29     to push to a Maven staging repository.
30
31 **Gerrit required parameters**:
32
33 :gerrit-server-name: The name of the Gerrit Server as defined in Gerrit
34     Trigger global configuration. (ex: Primary)
35
36 **GitHub required parameters**:
37
38 :git-url: Set this to the base URL of your GitHub repo. In
39     general this should be <https://github.com>. If you are using
40     GitHub Enterprise, or some other GitHub-style system, then it
41     should be whatever your installation base URL is.
42
43 :git-clone-url: This is the clone prefix used by GitHub jobs.
44     Set this to either the same thing as **git-url** or the
45     'git@github.com:' including the trailing ':'
46
47 :github-org: The name of the GitHub organization interpolated
48     into the scm config.
49
50 :github_pr_org: The name of the GitHub organization. All members
51     of this organization will be able to trigger any job using the
52     `lf-infra-github-pr` macro.
53
54 :github_pr_whitelist: List of GitHub members you wish to be able to
55     trigger any job that uses the `lf-infra-github-pr-trigger` macro.
56
57 :github_pr_admin_list: List of GitHub members that will have admin
58     privileges on any job using the `lf-infra-github-pr-trigger` macro.
59
60 Example Gerrit Infra:
61
62 .. code-block:: yaml
63
64    - defaults:
65        name: global
66
67        # lf-infra defaults
68        jenkins-ssh-credential: opendaylight-jenkins-ssh
69        gerrit-server-name: OpenDaylight
70        lftools-version: '<1.0.0'
71        mvn-site-id: opendaylight-site
72        mvn-staging-id: opendaylight-staging
73
74 Example GitHub Infra:
75
76 .. code-block:: yaml
77
78    - defaults:
79        name: global
80
81        # lf-infra defaults
82        jenkins-ssh-credential: jenkins-ssh
83        github-org: lfit
84        github_pr_whitelist:
85          - jpwku
86          - tykeal
87          - zxiiro
88        github_pr_admin_list:
89          - tykeal
90        lftools-version: '<1.0.0'
91        mvn-site-id: opendaylight-site
92        mvn-staging-id: opendaylight-staging
93
94 Jenkins Files
95 =============
96
97 global-jjb makes use of the Jenkins Config File Provider plugin to provide some
98 default configurations for certain tools. This section details the files to
99 define in Jenkins' **Manage Files** configuration.
100
101 npmrc
102 -----
103
104 This file contains default npmrc configuration and lives in $HOME/.npmrc.
105 Documentation for npmrc is available via the `npm project
106 <https://docs.npmjs.com/files/npmrc>`_.
107
108 :Required: This file MUST exist. An empty file is acceptable if a
109     proxy is not available for the project.
110 :type: Custom file
111
112 Create a "Custom file" with contents:
113
114 .. code::
115
116    registry = https://nexus.opendaylight.org/content/repositories/npmjs/
117
118 pipconf
119 -------
120
121 This file contains default configuration for the python-pip tool and lives
122 in $HOME/.config/pip/pip.conf. Documentation for pip.conf is available via the
123 `pip project <https://pip.readthedocs.io/en/stable/user_guide/#configuration>`_.
124
125 :Required: This file MUST exist. An empty file is acceptable if a
126     proxy is not available for the project.
127 :type: Custom file
128
129 Create a "Custom file" with contents:
130
131 .. code::
132
133    [global]
134    timeout = 60
135    index-url = https://nexus3.opendaylight.org/repository/PyPi/simple
136
137
138 Jenkins CI Jobs
139 ===============
140
141 jenkins-cfg-merge
142 -----------------
143
144 This job manages Jenkins Global configuration. Refer to
145 the :ref:`CI Documentation <lf-global-jjb-jenkins-cfg-merge>` for job
146 configuration details.
147
148 Log Archiving
149 =============
150
151 The logs account requires a Maven Settings file created called
152 **jenkins-log-archives-settings** with a server ID of **logs** containing the
153 credentials for the logs user in Nexus.