1 # Continuous Integration for O-RAN SC at LF
3 This repo contains configuration files for Jenkins jobs for the
8 To avoid repetition, many required configuration parameter values
9 are defined in the defaults.yaml file.
11 ## Custom JJB templates for Docker CI PackageCloud projects
13 Custom JJB templates are defined for projects that use Docker to
14 compile code and build DEB/RPM packages, then push the packages to
15 PackageCloud.io. These projects should use the following jobs in
16 their respective project.yaml file::
19 - gerrit-docker-verify
20 - oran-gerrit-docker-ci-pc-merge
22 ## Testing the templates
24 These instructions explain how to test the templates using the Jenkins
25 sandbox. This catches errors before submitting the changes as Gerrit
30 Install the Jenkins job builder:
32 pip install jenkins-job-builder
34 Check out the global JJB templates submodule within this repo:
36 git submodule update --init
40 Check sanity by running the Jenkins job-builder script in this directory:
42 jenkins-jobs test -r jjb
44 ### Deploy the templates to the Jenkins sandbox
46 Login (after requesting membership in group
47 oran-jenkins-sandbox-access) at the Jenkins sandbox:
49 https://jenkins.o-ran-sc.org/sandbox
51 Get the authentication token from the sandbox:
52 a) click on your user name (top right)
53 b) click Configure (left menu)
54 c) under API Token, click Add new Token (button)
55 d) copy the token string
57 Create a config file jenkins.ini using the following template and your
58 credentials (user name and API token from above)::
62 keep_descriptions=False
66 query_plugins_info=False
67 url=https://jenkins.o-ran-sc.org/sandbox
69 password=YOUR-API-TOKEN
71 Build and deploy a specific job using the EXACT job name.
73 jenkins-jobs --conf jenkins.ini update jjb your-job-name-here
77 jenkins-jobs --conf jenkins.ini update jjb project-maven-docker-verify-master-mvn33-openjdk8
79 In the sandbox visit the job page, then click the button "Build with
80 parameters" in left menu.
82 ### How to build from a Gerrit review branch
84 This explains how to launch a "verify" job in the Sandbox on an open
85 review. Most "verify" jobs accept parameters to build code in a
86 review submitted to Gerrit. You must specify the change ref spec,
87 which is a Git branch name. Get this by inspecting Gerrit's
88 "download" links at the top right. The branch name will be something
93 The first number is a mystery to me; the second number is the Gerrit
94 change number; the third number is the patch set within the change.
96 Enter this name for both the GERRIT_BRANCH and the GERRIT_REFSPEC
97 parameters, then click Build.