*.swp
+
+# Ignore changes to the JJB Configuration File
+jenkins.ini
# will trigger when a dependent project-merge job
# is built successfully.
# Example : aaa,controller,yangtools
+ #
+ # -z / --no-cfg : Do not auto-generate a project.cfg file if
+ # -g, -o, -d parameters are passed. Usually
+ # when these parameters are passed we will
+ # assume customizations are made and create
+ # the project file. (Useful in scripts like
+ # the jjb-autoupdate-project.py script)
If all your project requires is the basic verify, merge, and
daily jobs then using the job.template should be all you need to
project-type: maven
node: dynamic_verify
+ concurrent: true
jdk: '{jdk}'
logrotate:
project-type: maven
node: dynamic_verify
+ concurrent: true
jdk: '{jdk}'
logrotate:
maven-name: '{mvn32}'
root-pom: 'pom.xml'
goals: '-Dmaven.repo.local=$WORKSPACE/.m2repo -Dorg.ops4j.pax.url.mvn.localRepository=$WORKSPACE/.m2repo clean install -Pintegrationtests,docs'
- maven-opts: '-Xmx4096m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
+ maven-opts: '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
settings: '{controller-settings}'
global-settings: '{odl-global-settings}'
ignore-upstream-changes: true
maven-name: '{mvn32}'
root-pom: 'pom.xml'
goals: '-Dmaven.repo.local=$WORKSPACE/.m2repo -Dorg.ops4j.pax.url.mvn.localRepository=$WORKSPACE/.m2repo clean install -Pintegrationtests,docs'
- maven-opts: '-Xmx4096m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
+ maven-opts: '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
settings: '{controller-settings}'
global-settings: '{odl-global-settings}'
maven-name: '{mvn32}'
root-pom: 'pom.xml'
goals: '-Dmaven.repo.local=$WORKSPACE/.m2repo -Dorg.ops4j.pax.url.mvn.localRepository=$WORKSPACE/.m2repo clean install -Pintegrationtests,docs'
- maven-opts: '-Xmx4096m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
+ maven-opts: '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
settings: '{controller-settings}'
global-settings: '{odl-global-settings}'
- sonar:
branch: '{stream}'
language: 'java'
- maven-opts: '-Xmx4096m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
+ maven-opts: '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
- job-template:
name: 'controller-integration-{stream}'
maven-name: '{mvn32}'
root-pom: 'pom.xml'
goals: '-Dmaven.repo.local=$WORKSPACE/.m2repo -Dorg.ops4j.pax.url.mvn.localRepository=$WORKSPACE/.m2repo clean install -Pintegrationtests,docs'
- maven-opts: '-Xmx4096m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
+ maven-opts: '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
settings: '{controller-settings}'
global-settings: '{odl-global-settings}'
gitdir=$(git rev-parse --git-dir); scp -p -P 29418 jenkins-releng@git.opendaylight.org:hooks/commit-msg ${gitdir}/hooks/
python scripts/jjb-autoupdate-project.py
-git diff --quiet --exit-code || submitJJB
+git diff --exit-code || submitJJB
project-type: maven
node: dynamic_verify
+ concurrent: true
jdk: '{jdk}'
logrotate:
project-type: maven
node: dynamic_verify
+ concurrent: true
jdk: '{jdk}'
logrotate:
project-type: maven
node: dynamic_verify
+ concurrent: true
jdk: '{jdk}'
logrotate:
project-type: maven
node: dynamic_verify
+ concurrent: true
jdk: '{jdk}'
logrotate:
project-type: maven
node: dynamic_verify
+ concurrent: true
jdk: '{jdk}'
logrotate:
# Maven versions
mvn30: 'Maven 3.0.5'
mvn31: 'Maven 3.1.1'
- mvn32: 'Maven 3.2.3'
+ mvn32: 'Maven 3.2.5'
# Config File Provider ID mapping
odl-global-settings: 'org.jenkinsci.plugins.configfiles.maven.GlobalMavenSettingsConfig1414604295262'
project-type: maven
node: dynamic_verify
+ concurrent: true
jdk: '{jdk}'
logrotate:
project-type: maven
node: dynamic_verify
+ concurrent: true
jdk: '{jdk}'
logrotate:
--- /dev/null
+DEPENDENCIES: controller,yangtools
\ No newline at end of file
--- /dev/null
+# ODL Releng build templates
+- project:
+ name: topoprocessing
+ jobs:
+ - 'topoprocessing-verify-{stream}'
+ - 'topoprocessing-merge-{stream}'
+ - 'topoprocessing-daily-{stream}'
+ - 'topoprocessing-integration-{stream}'
+
+ # stream: branch with - in place of / (eg. stable-helium)
+ # branch: branch (eg. stable/helium)
+ stream:
+ - master:
+ branch: 'master'
+ - stable-helium:
+ branch: 'stable/helium'
+
+ project: 'topoprocessing'
+ jdk: 'openjdk7'
+
+# For the Job templates below replace instances of:
+# PROJECT with your project name (eg. controller)
+# MAVEN_GOALS with your maven goals to build
+# MAVEN_OPTS with your maven options to build
+
+- job-template:
+ name: 'topoprocessing-verify-{stream}'
+
+ # Job template for ODL verify jobs
+ #
+ # The purpose of this job template is to setup a ODL verify job
+ #
+ # Required Variables:
+ # stream: branch with - in place of / (eg. stable-helium)
+ # branch: branch (eg. stable/helium)
+
+ project-type: maven
+ node: dynamic_verify
+ jdk: '{jdk}'
+
+ logrotate:
+ daysToKeep: '{build-days-to-keep}'
+ numToKeep: '{build-num-to-keep}'
+ artifactDaysToKeep: '{build-artifact-days-to-keep}'
+ artifactNumToKeep: '{build-artifact-num-to-keep}'
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ - gerrit-parameter:
+ branch: '{branch}'
+
+ scm:
+ - gerrit-trigger-scm:
+ credentials-id: '{ssh-credentials}'
+ refspec: '$GERRIT_REFSPEC'
+ choosing-strategy: 'gerrit'
+
+ wrappers:
+ - build-timeout
+ - ssh-agent-credentials:
+ user: '{ssh-credentials}'
+
+ triggers:
+ - gerrit-trigger-patch-submitted:
+ name: 'topoprocessing'
+ branch: '{branch}'
+
+ maven:
+ maven-name: '{mvn32}'
+ root-pom: 'pom.xml'
+ goals: 'clean install -V -Dmaven.repo.local=$WORKSPACE/.m2repo -Dorg.ops4j.pax.url.mvn.localRepository=$WORKSPACE/.m2repo '
+ maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
+ settings: '{topoprocessing-settings}'
+ global-settings: '{odl-global-settings}'
+ ignore-upstream-changes: true
+
+ publishers:
+ - email-notification:
+ email-prefix: '[topoprocessing]'
+
+- job-template:
+ name: 'topoprocessing-merge-{stream}'
+
+ # Job template for ODL merge jobs
+ #
+ # The purpose of this job template is to setup a ODL merge job
+ # and deploy artifacts to Nexus.
+ #
+ # Required Variables:
+ # stream: branch with - in place of / (eg. stable-helium)
+ # branch: branch (eg. stable/helium)
+
+ project-type: maven
+ node: dynamic_merge
+ jdk: '{jdk}'
+
+ logrotate:
+ daysToKeep: '{build-days-to-keep}'
+ numToKeep: '{build-num-to-keep}'
+ artifactDaysToKeep: '{build-artifact-days-to-keep}'
+ artifactNumToKeep: '{build-artifact-num-to-keep}'
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+
+ scm:
+ - gerrit-trigger-scm:
+ credentials-id: '{ssh-credentials}'
+ refspec: ''
+ choosing-strategy: 'default'
+
+ wrappers:
+ - build-timeout
+ - ssh-agent-credentials:
+ user: '{ssh-credentials}'
+
+ triggers:
+ - gerrit-trigger-patch-merged:
+ name: 'topoprocessing'
+ branch: '{branch}'
+
+ maven:
+ maven-name: '{mvn32}'
+ root-pom: 'pom.xml'
+ goals: 'clean install -V -Dmaven.repo.local=$WORKSPACE/.m2repo -Dorg.ops4j.pax.url.mvn.localRepository=$WORKSPACE/.m2repo '
+ maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
+ settings: '{topoprocessing-settings}'
+ global-settings: '{odl-global-settings}'
+
+ publishers:
+ - email-notification:
+ email-prefix: '[topoprocessing]'
+ - maven-deploy:
+ id: ''
+ unique-version: true
+ deploy-unstable: false
+
+- job-template:
+ name: 'topoprocessing-daily-{stream}'
+
+ # Job template for daily builders
+ #
+ # The purpose of this job template is to setup a daily/nightly
+ # builder and pushes to Sonar analysis.
+ #
+ # Required Variables:
+ # stream: branch with - in place of / (eg. stable-helium)
+ # branch: branch (eg. stable/helium)
+
+ project-type: maven
+ node: dynamic_verify
+ jdk: '{jdk}'
+
+ logrotate:
+ daysToKeep: '{build-days-to-keep}'
+ numToKeep: '{build-num-to-keep}'
+ artifactDaysToKeep: '{build-artifact-days-to-keep}'
+ artifactNumToKeep: '{build-artifact-num-to-keep}'
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+
+ scm:
+ - git-scm:
+ credentials-id: '{ssh-credentials}'
+ refspec: ''
+ branch: '{branch}'
+
+ wrappers:
+ - build-timeout
+ - ssh-agent-credentials:
+ user: '{ssh-credentials}'
+
+ triggers:
+ - timed: 'H H * * *'
+
+ maven:
+ maven-name: '{mvn32}'
+ root-pom: 'pom.xml'
+ goals: 'clean install -V -Dmaven.repo.local=$WORKSPACE/.m2repo -Dorg.ops4j.pax.url.mvn.localRepository=$WORKSPACE/.m2repo '
+ maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
+ settings: '{topoprocessing-settings}'
+ global-settings: '{odl-global-settings}'
+
+ publishers:
+ - email-notification:
+ email-prefix: '[topoprocessing]'
+ - sonar:
+ branch: '{stream}'
+ language: 'java'
+ maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
+
+- job-template:
+ name: 'topoprocessing-integration-{stream}'
+ disabled: false
+
+ # Job template for ODL merge jobs
+ #
+ # The purpose of this job template is to setup a ODL merge job
+ # and deploy artifacts to Nexus.
+ #
+ # Required Variables:
+ # stream: branch with - in place of / (eg. stable-helium)
+ # branch: branch (eg. stable/helium)
+
+ project-type: maven
+ node: dynamic_merge
+ jdk: '{jdk}'
+
+ logrotate:
+ daysToKeep: '{build-days-to-keep}'
+ numToKeep: '{build-num-to-keep}'
+ artifactDaysToKeep: '{build-artifact-days-to-keep}'
+ artifactNumToKeep: '{build-artifact-num-to-keep}'
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+
+ scm:
+ - git-scm:
+ credentials-id: '{ssh-credentials}'
+ refspec: ''
+ branch: '{branch}'
+
+ wrappers:
+ - build-timeout
+ - ssh-agent-credentials:
+ user: '{ssh-credentials}'
+
+ triggers:
+ - reverse:
+ jobs: 'controller-merge-{stream},yangtools-merge-{stream}'
+ result: 'success'
+
+ maven:
+ maven-name: '{mvn32}'
+ root-pom: 'pom.xml'
+ goals: 'clean install -V -Dmaven.repo.local=$WORKSPACE/.m2repo -Dorg.ops4j.pax.url.mvn.localRepository=$WORKSPACE/.m2repo '
+ maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
+ settings: '{topoprocessing-settings}'
+ global-settings: '{odl-global-settings}'
+
+ publishers:
+ - email-notification:
+ email-prefix: '[topoprocessing] [controller] [yangtools]'
project-type: maven
node: dynamic_verify
+ concurrent: true
jdk: '{jdk}'
logrotate:
- mvn31:
mvnver: "Maven 3.1.1"
- mvn32:
- mvnver: "Maven 3.2.3"
+ mvnver: "Maven 3.2.5"
stream:
- master:
- mvn31:
mvnver: "Maven 3.1.1"
- mvn32:
- mvnver: "Maven 3.2.3"
+ mvnver: "Maven 3.2.5"
stream:
- stable-helium:
# If project has customized variables
cfg_file = "jjb/%s/%s.cfg" % (project, project)
parameters = ["python scripts/jjb-init-project.py"]
+ parameters.append("-z") # Disable CFG auto-generation
if os.path.isfile(cfg_file):
stream = open(cfg_file, "r")
cfg = yaml.load(stream)
os.system(cmd)
else:
- os.system("python scripts/jjb-init-project.py %s" % project)
+ os.system("python scripts/jjb-init-project.py -z %s" % project)
##############
# Code Start #
"Example: aaa,controller,yangtools"))
parser.add_argument("-g", "--mvn-goals", help="Maven Goals")
parser.add_argument("-o", "--mvn-opts", help="Maven Options")
+parser.add_argument("-z", "--no-cfg", action="store_true",
+ help=("Disable initializing the project.cfg file."))
args = parser.parse_args()
project = args.project
template_file = os.path.join("jjb", "job.yaml.template")
+# The below 2 variables are used to determine if we should generate a CFG file
+# for a project automatically.
+#
+# no_cfg - is a commandline parameter that can be used by scripts such as the
+# jjb-autoupdate-project script to explicitly disable generating CFG
+# files.
+# make_cfg - is a internal variable used to decide if we should try to
+# auto generate the CFG file for a project based on optional
+# variables passed by the user on the commandline.
+no_cfg = args.no_cfg
+make_cfg = False # Set to true if we need to generate initial CFG file
+cfg_string = []
+
if not mvn_goals:
mvn_goals = ("clean install "
"-V " # Show Maven / Java version before building
"-Dmaven.repo.local=$WORKSPACE/.m2repo "
"-Dorg.ops4j.pax.url.mvn.localRepository=$WORKSPACE/.m2repo ")
+else: # User explicitly set MAVEN_OPTS so create CFG
+ make_cfg = True
+ cfg_string.append("MAVEN_GOALS: %s" % mvn_goals)
if not mvn_opts:
mvn_opts = "-Xmx1024m -XX:MaxPermSize=256m"
+else: # User explicitly set MAVEN_OPTS so create CFG
+ make_cfg = True
+ cfg_string.append("MAVEN_OPTS: %s" % mvn_opts)
if dependencies:
+ make_cfg = True
disabled = "false"
email_prefix = (email_prefix + " " +
" ".join(['[%s]' % d for d in dependencies.split(",")]))
dependent_jobs = ",".join(
['%s-merge-{stream}' % d for d in dependencies.split(",")])
+ cfg_string.append("DEPENDENCIES: %s" % dependencies)
# Create project directory if it doesn't exist
if not os.path.exists(project_dir):
mvn_opts,
dependencies))
+# Create initial project CFG file
+if not no_cfg and make_cfg:
+ print("Creating %s.cfg file" % project)
+ cfg_file = os.path.join(project_dir, "%s.cfg" % project)
+ with open(cfg_file, "w") as outstream:
+ cfg = "\n".join(cfg_string)
+ outstream.write(cfg)
+
# Create initial project YAML file
with open(template_file, "r") as infile:
with open(project_file, "w") as outfile: