Merge "Add MEMCONF as a function var to set_java_vars"
authorSam Hague <shague@redhat.com>
Tue, 27 Feb 2018 13:23:13 +0000 (13:23 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 27 Feb 2018 13:23:13 +0000 (13:23 +0000)
jjb/autorelease/autorelease-projects.yaml
jjb/autorelease/autorelease-templates.yaml
jjb/autorelease/branch-cut.sh [new file with mode: 0644]
jjb/integration/integration-deploy-openstack-run-test.sh

index 12f6f6004ef38b616bb9ec40ea4475a7aa5a5f80..9cc0465169b436078409a9bb424213d71402375a 100644 (file)
@@ -2,6 +2,7 @@
 - project:
     name: autorelease-projects
     jobs:
+      - autorelease-branch-cut
       - 'autorelease-generate-release-notes-{stream}'
       - 'autorelease-release-{stream}':
           build-node: centos7-autorelease-4c-16g
index 94141d55285bbd6b8745669e645b931e19a8d9b1..495787e1f5c5f0085333b00a0d3f2136f1d2a6d9 100644 (file)
@@ -1,5 +1,56 @@
 ---
 # Autorelease build jobs
+- job-template:
+    name: autorelease-branch-cut
+
+    #####################
+    # Job Configuration #
+    #####################
+
+    project-type: freestyle
+    node: centos7-builder-2c-2g
+
+    properties:
+      - opendaylight-infra-properties:
+          build-days-to-keep: 7
+
+    parameters:
+      - lf-infra-parameters:
+          project: releng/autorelease
+          branch: master
+          stream: master
+          lftools-version: '{lftools-version}'
+      - string:
+          name: RELEASE
+          description: |
+              Release name to branch cut.
+              Eg. Lithium, Beryllium, Boron, Carbon...
+      - bool:
+          name: DRY_RUN
+          default: true
+          description: |
+              If DRY_RUN is enabled modifications are not published to Gerrit.
+
+    scm:
+      - lf-infra-gerrit-scm:
+          git-url: '$GIT_URL/$GERRIT_PROJECT'
+          branch: master
+          refspec: 'refs/heads/master'
+          jenkins-ssh-credential: opendaylight-jenkins-ssh
+          submodule-recursive: true
+          choosing-strategy: default
+
+    wrappers:
+      - lf-infra-wrappers:
+          build-timeout: 10
+          jenkins-ssh-credential: opendaylight-jenkins-ssh
+
+    builders:
+      - shell: !include-raw-escape: branch-cut.sh
+
+    publishers:
+      - lf-infra-publish
+
 - job-template:
     name: 'autorelease-release-{stream}'
 
diff --git a/jjb/autorelease/branch-cut.sh b/jjb/autorelease/branch-cut.sh
new file mode 100644 (file)
index 0000000..02df34e
--- /dev/null
@@ -0,0 +1,108 @@
+#!/bin/bash
+# @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
+##############################################################################
+# Copyright (c) 2017 The Linux Foundation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+##############################################################################
+
+# This script requires the user running the script to have "Create References"
+# permission in Gerrit for the "stable/RELEASE" branch. Where RELEASE is an
+# official OpenDaylight release. Eg. Oxygen, Nitrogen, Carbon, etc...
+#
+# Performs 2 actions:
+#
+#     1) Creates a new branch stable/RELEASE (where release is a ODL release,
+#        eg Oxygen, Nitrogen, Carbon, etc...)
+#     2) Updates .gitreview in the new stable/RELEASE branch to set the
+#        defaultbranch to the new branch.
+#
+# Required Parameters:
+#     RELEASE: The name of the release to create a branch for.
+
+mkdir -p "$WORKSPACE/archives"
+LOG_FILE="$WORKSPACE/archives/branch-cut.log"
+
+set -eu -o pipefail
+
+# Validate inputs
+if [ -z "$RELEASE" ]; then
+    echo "ERROR: RELEASE variable most be set to a release name. Eg Carbon"
+    exit 1
+fi
+
+# --- Start create new maintenance branch
+echo "---> Creating new mainenance branch"
+git submodule foreach git fetch origin
+git fetch origin
+git submodule foreach git checkout -b "stable/${RELEASE,,}" origin/master
+git checkout -b "stable/${RELEASE,,}" origin/master
+
+##########
+# Verify #
+##########
+
+{
+    echo "---> Verify maintenance branch"
+    git submodule foreach git branch
+    git branch
+} | tee -a "$LOG_FILE"
+
+########
+# Push #
+########
+
+if [ "$DRY_RUN" = false ]
+then
+    echo "Pushing stable/${RELEASE,,} branches to Gerrit"
+    git submodule foreach git push gerrit "stable/${RELEASE,,}"
+    git push gerrit "stable/$RELEASE"
+fi
+# --- End create new maintenance branch
+
+# --- Start update .gitreview
+echo "---> Update .gitreview"
+git submodule foreach sed -i -e "s#defaultbranch=master#defaultbranch=stable/${RELEASE,,}#" .gitreview
+git submodule foreach git add .gitreview
+git submodule foreach "git commit -sm 'Update .gitreview to stable/${RELEASE,,}'"
+sed -i -e "s#defaultbranch=master#defaultbranch=stable/${RELEASE,,}#" .gitreview
+git add .gitreview
+git commit -sm "Update .gitreview to stable/${RELEASE,,}"
+
+# Generate git patches
+patch_dir="$WORKSPACE/archives/patches/git-review"
+mkdir -p "$patch_dir"
+for module in $(git submodule | awk '{ print $2 }')
+do
+    pushd "$module"
+    git format-patch --stdout "origin/master" > "$patch_dir/${module//\//-}.patch"
+    git bundle create "$patch_dir/${module//\//-}.bundle" "origin/master..HEAD"
+    popd
+done
+
+##########
+# Verify #
+##########
+
+{
+    echo "---> Verify .gitreview"
+    git submodule foreach git show HEAD
+    git show HEAD
+    git submodule foreach git log --oneline -2 --graph --decorate
+    git log --oneline -2 --graph --decorate
+} | tee -a "$LOG_FILE"
+
+########
+# Push #
+########
+
+if [ "$DRY_RUN" = false ]
+then
+    echo "Pushing .gitreview patches to Gerrit"
+    git submodule foreach git review -t "branch-cut-${RELEASE,,}"
+    git review -t "branch-cut-${RELEASE,,}"
+fi
+# --- Stop update .gitreview
index d7108c9a5a7cb7641dcb0971f693dd8796387e84..7159def61a756a6421520d6e3036c61b5f674a31 100644 (file)
@@ -359,7 +359,8 @@ EOF
     add_os_services "${CORE_OS_COMPUTE_SERVICES}" "${ENABLE_OS_COMPUTE_SERVICES}" "${DISABLE_OS_SERVICES}" "${local_conf_file_name}"
 
     cat >> ${local_conf_file_name} << EOF
-
+#Added to make Nova wait until nova in control node is ready.
+NOVA_READY_TIMEOUT=900
 HOST_IP=${HOSTIP}
 SERVICE_HOST=${SERVICEHOST}
 Q_ML2_TENANT_NETWORK_TYPE=${TENANT_NETWORK_TYPE}