Merge "Add git-review to base system"
authorVanessa Rene Valderrama <vvalderrama@linuxfoundation.org>
Wed, 1 Feb 2017 16:20:26 +0000 (16:20 +0000)
committerGerrit Code Review <gerrit@fd.io>
Wed, 1 Feb 2017 16:20:27 +0000 (16:20 +0000)
jjb/csit/csit.yaml
jjb/csit/include-raw-csit-report.sh [new file with mode: 0644]
jjb/hc2vpp/hc2vpp.yaml
packer/provision/baseline.sh

index 7347498..ad622be 100644 (file)
@@ -11,6 +11,7 @@
         - 'csit-vpp-verify-perf-master-nightly-all'
         - 'csit-docs-merge-{stream}'
         - 'csit-docs-verify-{stream}'
+        - 'csit-report-merge-{stream}'
 
     project: 'csit'
     branch: 'master'
           build-timeout: '1440'
 
     triggers:
-        - timed: '0 20 * * *'
+        - timed: '0 20 * * Sun,Tue,Thu'
 
     builders:
         - shell: 'echo "BRANCH_ID={branch-id}" > $WORKSPACE/variables.prop'
         - fdio-infra-shiplogs:
             maven-version: 'mvn33-new'
 
+- job-template:
+    name: 'csit-report-merge-{stream}'
+
+    project-type: freestyle
+    node: 'ubuntu1604-basebuild-4c-4g'
+    concurrent: false
+
+    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}'
+        - maven-exec:
+            maven-version: 'mvn33-new'
+
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: 'jenkins-gerrit-credentials'
+            refspec: '$GERRIT_REFSPEC'
+            choosing-strategy: 'default'
+
+    wrappers:
+        - fdio-infra-wrappers:
+            build-timeout: '{build-timeout}'
+        - fdio-infra-wrappers-non-activity-timeout:
+            build-timeout: 360
+
+    triggers:
+        - gerrit:
+            server-name: 'Primary'
+            trigger-on:
+                - comment-added-contains-event:
+                    comment-contains-value: 'run-report'
+            projects:
+              - project-compare-type: 'ANT'
+                project-pattern: '{project}'
+                branches:
+                  - branch-compare-type: 'ANT'
+                    branch-pattern: '**/{branch}'
+            skip-vote:
+                successful: true
+                failed: true
+                unstable: true
+                notbuilt: true
+
+    builders:
+        - maven-target:
+            maven-version: 'mvn33-new'
+            goals: '--version'
+            settings: 'csit-settings'
+            settings-type: cfp
+            global-settings: 'global-settings'
+            global-settings-type: cfp
+        - provide-maven-settings:
+            settings-file: 'csit-settings'
+            global-settings-file: 'global-settings'
+        - shell:
+            !include-raw-escape: include-raw-csit-report.sh
+
+    publishers:
+        - archive:
+            artifacts: 'resources/tools/report_gen/csit.report.tar.gz'
+            allow-empty: 'true'
+            fingerprint: false
+            only-if-success: true
+            default-excludes: false
+
+        - fdio-infra-shiplogs:
+            maven-version: 'mvn33-new'
+
 - parameter:
     name: test-type-parameter
     parameters:
diff --git a/jjb/csit/include-raw-csit-report.sh b/jjb/csit/include-raw-csit-report.sh
new file mode 100644 (file)
index 0000000..40144f2
--- /dev/null
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+set -xe -o pipefail
+
+[ "$DOCS_REPO_URL" ] || DOCS_REPO_URL="https://nexus.fd.io/content/sites/site"
+[ "$PROJECT_PATH" ] || PROJECT_PATH=io/fd/csit
+[ "$DOC_DIR" ] || DOC_DIR=resources/tools/report_gen
+[ "$BUILD_DIR" ] || BUILD_DIR=${DOC_DIR}/_build
+[ "$SITE_DIR" ] || SITE_DIR=build-root/docs/deploy-site
+[ "$RESOURCES_DIR" ] || RESOURCES_DIR=${SITE_DIR}/src/site/resources/report
+[ "$MVN" ] || MVN="/opt/apache/maven/bin/mvn"
+
+cd ${DOC_DIR}
+chmod +x ./run_report.sh
+./run_report.sh ${GERRIT_BRANCH}
+
+retval=$?
+if [ ${retval} -ne "0" ]; then
+  echo "Report generation failed!"
+exit ${retval}
+fi
+
+if [[ ${JOB_NAME} == *merge* ]]; then
+
+  cd ${WORKSPACE}
+
+  mkdir -p ${RESOURCES_DIR}
+  mv -f ${BUILD_DIR}/* ${RESOURCES_DIR}
+  cd ${SITE_DIR}
+
+  cat > pom.xml << EOF
+  <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>io.fd.csit</groupId>
+    <artifactId>docs</artifactId>
+    <version>1.0.0</version>
+    <packaging>pom</packaging>
+    <properties>
+      <generateReports>false</generateReports>
+    </properties>
+    <build>
+      <extensions>
+        <extension>
+          <groupId>org.apache.maven.wagon</groupId>
+          <artifactId>wagon-webdav-jackrabbit</artifactId>
+          <version>2.9</version>
+        </extension>
+      </extensions>
+    </build>
+    <distributionManagement>
+      <site>
+        <id>fdio-site</id>
+        <url>dav:${DOCS_REPO_URL}/${PROJECT_PATH}/${GERRIT_BRANCH}</url>
+      </site>
+    </distributionManagement>
+  </project>
+EOF
+
+  ${MVN} site:site site:deploy -gs "${GLOBAL_SETTINGS_FILE}" -s "${SETTINGS_FILE}" -T 4C
+
+  cd -
+
+fi
index 1fd9fda..3c8a3dc 100644 (file)
@@ -2,6 +2,7 @@
     name: hc2vpp
     jobs:
         - 'hc2vpp-verify-{stream}-{os}'
+        - 'hc2vpp-merge-{stream}-{os}'
         - 'hc2vpp-integration-{stream}-{os}'
         - 'hc2vpp-verify-image-{stream}-{os}'
     project: 'hc2vpp'
             branch: 'stable/1701'
             repo-stream-part: 'stable.1701'
 
-- project:
-    # Only 1 merge job is possible to push artifacts so pick a preferred OS
-    # to prevent jobs from colliding with each other trying to push artifacts
-    # to Nexus.
-    name: hc2vpp-merge
-    jobs:
-        - 'hc2vpp-merge-{stream}-{os}'
-
-    project: 'hc2vpp'
-    os:
-        - ubuntu1604:
-            repo-os-part: 'ubuntu.xenial.main'
-            skip-site: 'true'
-
-    stream:
-        - master:
-            branch: 'master'
-            repo-stream-part: 'master'
-        - '1701':
-            branch: 'stable/1701'
-            repo-stream-part: 'stable.1701'
-
 - job-template:
     name: 'hc2vpp-verify-{stream}-{os}'
     project-type: maven
             branch: '{stream}'
         - email-notification:
             email-prefix: '[hc2vpp]'
-        - maven-deploy:
-            id: ''
-            unique-version: true
-            deploy-unstable: false
         - fdio-infra-shiplogs:
             maven-version: 'mvn33-new'
 
index a2843fb..6fcc1b0 100644 (file)
@@ -131,15 +131,8 @@ EOF
 
     # disable unattended upgrades & daily updates
     echo '---> Disabling automatic daily upgrades'
-    apt-get remove unattended-upgrades
-    if [ -f /usr/bin/systemctl ]
-    then
-        systemctl stop apt.systemd.daily
-        systemctl disable apt.systemd.daily
-    else
-        /etc/init.d/unattended-upgrades stop
-        update-rc.d -f unattended-upgrades remove
-    fi
+    sed -ine 's/"1"/"0"/g' /etc/apt/apt.conf.d/10periodic
+    echo 'APT::Periodic::Unattended-Upgrade "0";' >> /etc/apt/apt.conf.d/10periodic
 }
 
 all_systems() {