Merge "Handle missing CREDENTIAL when creating .netrc"
[releng/global-jjb.git] / docs / configuration.rst
1 .. _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: 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 Jenkins Files
97 =============
98
99 global-jjb makes use of the Jenkins Config File Provider plugin to provide some
100 default configurations for certain tools. This section details the files to
101 define in Jenkins' **Manage Files** configuration.
102
103 .. _npmrc:
104
105 npmrc
106 -----
107
108 This file contains default npmrc configuration and lives in $HOME/.npmrc.
109 Documentation for npmrc is available via the `npm project
110 <https://docs.npmjs.com/files/npmrc>`_.
111
112 :Required: This file MUST exist. An empty file is acceptable if a
113     proxy is not available for the project.
114 :type: Custom file
115
116 Create a "Custom file" with contents:
117
118 .. code::
119
120    registry = https://nexus.opendaylight.org/content/repositories/npmjs/
121
122 .. _pipconf:
123
124 pipconf
125 -------
126
127 This file contains default configuration for the python-pip tool and lives
128 in $HOME/.config/pip/pip.conf. Documentation for pip.conf is available via the
129 `pip project <https://pip.readthedocs.io/en/stable/user_guide/#configuration>`_.
130
131 :Required: This file MUST exist. An empty file is acceptable if a
132     proxy is not available for the project.
133 :type: Custom file
134
135 Create a "Custom file" with contents:
136
137 .. code::
138
139    [global]
140    timeout = 60
141    index-url = https://nexus3.opendaylight.org/repository/PyPi/simple
142
143 .. _jenkins-ci-jobs:
144
145 Jenkins CI Jobs
146 ===============
147
148 .. _jenkins-cfg-merge:
149
150 jenkins-cfg-merge
151 -----------------
152
153 This job manages Jenkins Global configuration. Refer to
154 the :ref:`CI Documentation <lf-global-jjb-jenkins-cfg-merge>` for job
155 configuration details.
156
157 .. _log-archiving:
158
159 Log Archiving
160 =============
161
162 The logs account requires a Maven Settings file created called
163 **jenkins-log-archives-settings** with a server ID of **logs** containing the
164 credentials for the logs user in Nexus.