3 The purpose of this repository is store generically define reusable JJB
4 templates that can be deployed across LF projects.
6 The following variables are necessary to be defined in the Jenkins server as
7 global environment variables as scripts in this repo expect these variables to
13 GIT_URL=ssh://jenkins-$SILO@git.opendaylight.org:29418
14 GIT_CLONE_URL=git@github.com:
15 JENKINS_HOSTNAME=jenkins092
16 LOGS_SERVER=https://logs.opendaylight.org
17 NEXUS_URL=https://nexus.opendaylight.org
20 Note: **GIT_CLONE_URL** is only used by Github projects as this
21 will be different from the URL used the poperties
24 ## Jenkins Plugin Requirements
28 - Config File Provider
42 ## Installing global-jjb
44 global-jjb should be deployed in the ci-management repository's jjb directory as
45 a submodule. global-jjb is versioned and tagged in Gerrit so installing,
46 upgrading, and rolling back changes should be simple via the Gerrit tag system.
49 # Choose a global-jjb version to install
50 GLOBAL_JJB_VERSION=v0.1.0
52 # Add the new submodule to ci-management's jjb directory.
53 # Note: Only needs to be performed once per ci-management repo.
55 git submodule add https://gerrit.linuxfoundation.org/infra/releng/global-jjb
57 # Checkout the version of global-jjb you wish to deploy.
59 git checkout $GLOBAL_JJB_VERSION
61 # Commit global-jjb version to the ci-management repo.
63 git add jjb/global-jjb
64 git commit -sm "Install global-jjb $GLOBAL_JJB_VERSION"
66 # Push the patch to ci-management for review
70 ## Parameters stored in defaults.yaml
72 There are a few project specific parameters that should be stored in the
73 ci-management repo's defaults.yaml file.
75 **gerrit-server-name**: The name of the Gerrit Server as defined in Gerrit
76 Trigger global configuration.
78 **jenkins-ssh-credential**: The name of the Jenkins Credential to use for ssh
81 If you are using GitHub then there is one more parameter which
82 will need to be placed in the defaults.yaml
84 **github-org**: The name of the GitHub organization.
93 jenkins-ssh-credential: opendaylight-jenkins-ssh
94 gerrit-server-name: OpenDaylight
98 ## Config File Management
102 The logs account requires a Maven Settings file created called
103 **jenkins-log-archives-settings** with a server ID of **logs** containing the
104 credentials for the logs user in Nexus.
108 The CI job group contains multiple jobs that should be deployed in all LF
109 Jenkins infra. The minimal configuration needed to deploy the ci-management
110 jobs is as follows which deploys the **{project-name}-ci-jobs** job group as
111 defined in **lf-ci-jobs.yaml**.
120 - '{project-name}-ci-jobs'
122 project: ci-management
123 project-name: ci-management
124 build-node: centos7-basebuild-2c-1g
129 **project**: is the project repo as defined in source control.
130 **project-name**: is a custom name to call the job in Jenkins.
131 **build-node**: is the name of the builder to use when building (Jenkins label).
135 **branch**: is the git branch to build from.
136 **jjb-version**: is the version of JJB to install in the build minion.
138 ## Deploying Python jobs
140 We provide the following Python jobs templates:
142 ### {project-name}-tox-verify-{stream}
144 This job can be used to call python-tox to run builds and tests. The most common
145 usage of this job is to run the Coala linter against projects.
151 - '{project-name}-tox-verify-{stream}'
153 project-name: builder
154 project: releng/builder
155 build-node: centos7-java-builder-2c-4g
161 **project**: is the project repo as defined in source control.
162 **project-name**: is a custom name to call the job in Jenkins.
163 **build-node**: is the name of the builder to use when building (Jenkins label).
164 **stream**: typically `master` or matching whatever branch is being built. This
165 is a useful keywords to map a release codename to a branch. For
166 example OpenDaylight uses this to map stream=carbon to
167 branch=stable/carbon.
171 **branch**: is the git branch to build from.
172 **jjb-version**: is the version of JJB to install in the build minion.
173 **tox-dir**: directory containing tox.ini file (default: '')
174 **tox-envs**: tox environments to run (default: '')
176 ## Archiving logs in Jobs
178 There are 2 ways supported for archiving log information:
180 1) Job creates $WORKSPACE/archives directory and places logs there
182 In this method the entire archives directory will be pushed to the log server
183 in the same structure as configured in the archives directory.
185 2) Via job variable ARCHIVE_ARTIFACTS using globstar patterns.
187 In this method a job can define a globstar for example ``**/*.log`` which then
188 causes the archive script to do a globstar search for that pattern and archives
189 any files it finds matching.