Merge "Add coverage support"
authorSerena Feng <feng.xiaowei@zte.com.cn>
Thu, 23 Feb 2017 06:22:08 +0000 (06:22 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Thu, 23 Feb 2017 06:22:08 +0000 (06:22 +0000)
jjb/infra/bifrost-cleanup-job.yml [new file with mode: 0644]
jjb/opnfvdocs/docs-post-rtd.sh
jjb/opnfvdocs/docs-rtd.yaml
jjb/releng/opnfv-docker.sh

diff --git a/jjb/infra/bifrost-cleanup-job.yml b/jjb/infra/bifrost-cleanup-job.yml
new file mode 100644 (file)
index 0000000..ba283ff
--- /dev/null
@@ -0,0 +1,148 @@
+- project:
+    name: 'openstack-bifrost-cleanup'
+#--------------------------------
+# branches
+#--------------------------------
+    stream:
+        - master:
+            branch: '{stream}'
+
+#--------------------------------
+# projects
+#--------------------------------
+    project:
+        - 'openstack':
+            project-repo: 'https://git.openstack.org/openstack/bifrost'
+            clone-location: '/opt/bifrost'
+        - 'opnfv':
+            project-repo: 'https://gerrit.opnfv.org/gerrit/releng'
+            clone-location: '/opt/releng'
+
+#--------------------------------
+# jobs
+#--------------------------------
+    jobs:
+        - '{project}-bifrost-cleanup-{stream}'
+
+- job-template:
+    name: '{project}-bifrost-cleanup-{stream}'
+
+    concurrent: false
+
+    node: bifrost-verify-virtual
+
+    # Make sure no verify job is running on any of the slaves since that would
+    # produce build logs after we wipe the destination directory.
+    properties:
+        - build-blocker:
+            blocking-jobs:
+                - '{project}-bifrost-verify-*'
+
+    parameters:
+        - string:
+            name: PROJECT
+            default: '{project}'
+
+    builders:
+        - shell: |
+            #!/bin/bash
+
+            set -eu
+
+            # DO NOT change this unless you know what you are doing.
+            BIFROST_GS_URL="gs://artifacts.opnfv.org/cross-community-ci/openstack/bifrost/$GERRIT_NAME/$GERRIT_CHANGE_NUMBER/"
+
+            # This should never happen... even 'recheck' uses the last jobs'
+            # gerrit information. Better exit with error so we can investigate
+            [[ ! -n $GERRIT_NAME ]] || [[ ! -n $GERRIT_CHANGE_NUMBER ]] && exit 1
+
+            echo "Removing build artifacts for $GERRIT_NAME/$GERRIT_CHANGE_NUMBER"
+
+            if ! [[ "$BIFROST_GS_URL" =~ "/cross-community-ci/openstack/bifrost/" ]]; then
+                echo "Oops! BIFROST_GS_URL=$BIFROST_GS_URL does not seem like a valid"
+                echo "bifrost location on the Google storage server. Please double-check"
+                echo "that it's set properly or fix this line if necessary."
+                echo "gsutil will not be executed until this is fixed!"
+                exit 1
+            fi
+            # No force (-f). We always verify upstream jobs so if there are no logs
+            # something else went wrong and we need to break immediately and investigate
+            gsutil rm -r $BIFROST_GS_URL
+
+    triggers:
+        - '{project}-gerrit-trigger-cleanup':
+            branch: '{branch}'
+
+    publishers:
+        - email:
+            recipients: fatih.degirmenci@ericsson.com yroblamo@redhat.com mchandras@suse.de jack.morgan@intel.com zhang.jun3g@zte.com.cn
+#--------------------------------
+# trigger macros
+#--------------------------------
+- trigger:
+    name: 'openstack-gerrit-trigger-cleanup'
+    triggers:
+        - gerrit:
+            server-name: 'review.openstack.org'
+            escape-quotes: true
+            trigger-on:
+                - patchset-created-event:
+                    exclude-drafts: 'false'
+                    exclude-trivial-rebase: 'false'
+                    exclude-no-code-change: 'false'
+                - patchset-uploaded-event: 'false'
+                # We only run this when the change is merged since
+                # we don't need the logs anymore
+                - change-merged-event: 'true'
+                - change-abandoned-event: 'true'
+                - change-restored-event: 'false'
+                - draft-published-event: 'false'
+            # This is an OPNFV maintenance job. We don't want to provide
+            # feedback on Gerrit
+            silent: true
+            silent-start: true
+            projects:
+              - project-compare-type: 'PLAIN'
+                project-pattern: 'openstack/bifrost'
+                branches:
+                  - branch-compare-type: 'ANT'
+                    branch-pattern: '**/{branch}'
+                forbidden-file-paths:
+                  - compare-type: ANT
+                    pattern: 'doc/**'
+                  - compare-type: ANT
+                    pattern: 'releasenotes/**'
+            readable-message: true
+- trigger:
+    name: 'opnfv-gerrit-trigger-cleanup'
+    triggers:
+        - gerrit:
+            server-name: 'gerrit.opnfv.org'
+            trigger-on:
+                - patchset-created-event:
+                    exclude-drafts: 'false'
+                    exclude-trivial-rebase: 'false'
+                    exclude-no-code-change: 'false'
+                - patchset-uploaded-event: 'false'
+                # We only run this when the change is merged since
+                # we don't need the logs anymore
+                - change-merged-event: 'true'
+                - change-abandoned-event: 'true'
+                - change-restored-event: 'false'
+                - draft-published-event: 'false'
+            # This is an OPNFV maintenance job. We don't want to provide
+            # feedback on Gerrit
+            silent: true
+            silent-start: true
+            projects:
+              - project-compare-type: 'ANT'
+                project-pattern: 'releng'
+                branches:
+                  - branch-compare-type: 'ANT'
+                    branch-pattern: '**/{branch}'
+                file-paths:
+                  - compare-type: ANT
+                    pattern: 'prototypes/bifrost/**'
+                  - compare-type: ANT
+                    pattern: 'jjb/infra/**'
+            readable-message: true
index 7faa26f..e3dc9b5 100644 (file)
@@ -4,4 +4,4 @@ if [ $GERRIT_BRANCH == "master" ]; then
 else
     RTD_BUILD_VERSION=${{GERRIT_BRANCH/\//-}}
 fi
-curl -X POST --data "version_slug=$RTD_BUILD_VERSION" https://readthedocs.org/build/{rtdproject}
+curl -X POST --data "version_slug=$RTD_BUILD_VERSION" https://readthedocs.org/build/opnfvdocsdemo
index 151b535..01b2820 100644 (file)
@@ -46,7 +46,7 @@
     parameters:
         - label:
             name: SLAVE_LABEL
-            default: 'lf-build1'
+            default: 'lf-build2'
             description: 'Slave label on Jenkins'
         - project-parameter:
             project: '{project}'
index 7b93d50..ded743d 100644 (file)
@@ -77,8 +77,12 @@ fi
 echo "Building docker image: $DOCKER_REPO_NAME:$DOCKER_TAG"
 echo "--------------------------------------------------------"
 echo
-cmd="docker build --no-cache -t $DOCKER_REPO_NAME:$DOCKER_TAG --build-arg BRANCH=$BRANCH
-    -f $DOCKERFILE ."
+if [[ $DOCKER_REPO_NAME == *"dovetail"* ]]; then
+    cmd="docker build --no-cache -t $DOCKER_REPO_NAME:$DOCKER_TAG -f $DOCKERFILE ."
+else
+    cmd="docker build --no-cache -t $DOCKER_REPO_NAME:$DOCKER_TAG --build-arg BRANCH=$BRANCH
+        -f $DOCKERFILE ."
+fi
 
 echo ${cmd}
 ${cmd}