Merge "Refactor reporting dir"
authorMorgan Richomme <morgan.richomme@orange.com>
Thu, 17 Nov 2016 15:33:59 +0000 (15:33 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Thu, 17 Nov 2016 15:33:59 +0000 (15:33 +0000)
38 files changed:
jjb/apex/apex.yml
jjb/compass4nfv/compass-verify-jobs.yml
jjb/daisy4nfv/daisy4nfv-build.sh
jjb/daisy4nfv/daisy4nfv-download-artifact.sh [new file with mode: 0755]
jjb/daisy4nfv/daisy4nfv-merge-jobs.yml [new file with mode: 0644]
jjb/daisy4nfv/daisy4nfv-upload-artifact.sh [new file with mode: 0755]
jjb/daisy4nfv/daisy4nfv-workspace-cleanup.sh [new file with mode: 0755]
jjb/fuel/fuel-download-artifact.sh
jjb/functest/functest-loop.sh
jjb/functest/functest-suite.sh
jjb/functest/set-functest-env.sh
jjb/kvmfornfv/kvmfornfv-test.sh
jjb/kvmfornfv/kvmfornfv.yml
jjb/opnfv/artifact-cleanup.yml
jjb/opnfv/opnfv-lint.yml
jjb/opnfv/test-sign.yml [deleted file]
jjb/opnfvdocs/project.cfg
jjb/releng/releng-ci-jobs.yml
modules/README.rst [new file with mode: 0644]
modules/opnfv/__init__.py [moved from utils/installer-adapter/__init__.py with 100% similarity]
modules/opnfv/installer_adapters/InstallerHandler.py [moved from utils/installer-adapter/InstallerHandler.py with 100% similarity]
modules/opnfv/installer_adapters/__init__.py [new file with mode: 0644]
modules/opnfv/installer_adapters/apex/ApexAdapter.py [moved from utils/installer-adapter/ApexAdapter.py with 100% similarity]
modules/opnfv/installer_adapters/apex/__init__.py [new file with mode: 0644]
modules/opnfv/installer_adapters/compass/CompassAdapter.py [moved from utils/installer-adapter/CompassAdapter.py with 100% similarity]
modules/opnfv/installer_adapters/compass/__init__.py [new file with mode: 0644]
modules/opnfv/installer_adapters/fuel/FuelAdapter.py [moved from utils/installer-adapter/FuelAdapter.py with 98% similarity]
modules/opnfv/installer_adapters/fuel/__init__.py [new file with mode: 0644]
modules/opnfv/installer_adapters/fuel/example.py [moved from utils/installer-adapter/example.py with 100% similarity]
modules/opnfv/installer_adapters/joid/JoidAdapter.py [moved from utils/installer-adapter/JoidAdapter.py with 100% similarity]
modules/opnfv/installer_adapters/joid/__init__.py [new file with mode: 0644]
modules/opnfv/utils/OPNFVLogger.py [moved from utils/installer-adapter/RelengLogger.py with 100% similarity]
modules/opnfv/utils/SSHUtils.py [moved from utils/installer-adapter/SSHUtils.py with 97% similarity]
modules/opnfv/utils/__init__.py [new file with mode: 0644]
modules/setup.py [new file with mode: 0644]
prototypes/puppet-infracloud/deploy_on_baremetal.md
prototypes/puppet-infracloud/modules/opnfv/manifests/server.pp
utils/test-sign-artifact.sh [deleted file]

index 89965d7..643972b 100644 (file)
             git-revision: false
             block: true
             same-node: true
-        - trigger-builds:
-          - project: 'functest-apex-{verify-slave}-suite-{stream}'
-            predefined-parameters: |
-              DEPLOY_SCENARIO=os-odl_l2-nofeature-ha
-              FUNCTEST_SUITE_NAME=healthcheck
-            block: true
-            same-node: true
+#        - trigger-builds:
+#          - project: 'functest-apex-{verify-slave}-suite-{stream}'
+#            predefined-parameters: |
+#              DEPLOY_SCENARIO=os-odl_l2-nofeature-ha
+#              FUNCTEST_SUITE_NAME=healthcheck
+#            block: true
+#            same-node: true
         - 'apex-workspace-cleanup'
 
 - job-template:
index 290da36..82e3dfd 100644 (file)
         - gerrit-parameter:
             branch: '{branch}'
         - 'compass-virtual-defaults'
+        - '{installer}-defaults'
         - 'compass-verify-defaults':
             installer: '{installer}'
             gs-pathname: '{gs-pathname}'
index ec11db5..eb29fed 100755 (executable)
@@ -4,11 +4,31 @@ echo "--------------------------------------------------------"
 echo "This is diasy4nfv build job!"
 echo "--------------------------------------------------------"
 
+# set OPNFV_ARTIFACT_VERSION
+if [[ "$JOB_NAME" =~ "merge" ]]; then
+    echo "Building Daisy4nfv ISO for a merged change"
+    export OPNFV_ARTIFACT_VERSION="gerrit-$GERRIT_CHANGE_NUMBER"
+else
+    export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S")
+fi
+
 # build output directory
 OUTPUT_DIR=$WORKSPACE/build_output
 mkdir -p $OUTPUT_DIR
 
 # start the build
 cd $WORKSPACE
-./ci/build.sh $OUTPUT_DIR
+./ci/build.sh $OUTPUT_DIR $OPNFV_ARTIFACT_VERSION
+
+# save information regarding artifact into file
+(
+    echo "OPNFV_ARTIFACT_VERSION=$OPNFV_ARTIFACT_VERSION"
+    echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
+    echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
+    echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.bin"
+    echo "OPNFV_BUILD_URL=$BUILD_URL"
+) > $WORKSPACE/opnfv.properties
 
+echo
+echo "--------------------------------------------------------"
+echo "Done!"
diff --git a/jjb/daisy4nfv/daisy4nfv-download-artifact.sh b/jjb/daisy4nfv/daisy4nfv-download-artifact.sh
new file mode 100755 (executable)
index 0000000..7ac76a5
--- /dev/null
@@ -0,0 +1,48 @@
+#!/bin/bash
+##############################################################################
+# Copyright (c) 2016 ZTE Coreporation and others.
+# hu.zhijiang@zte.com.cn
+# sun.jing22@zte.com.cn
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+set -o errexit
+set -o pipefail
+
+if [[ "$JOB_NAME" =~ "merge" ]]; then
+    echo "Downloading http://$GS_URL/opnfv-gerrit-$GERRIT_CHANGE_NUMBER.properties"
+    # get the properties file for the Daisy4nfv BIN built for a merged change
+    curl -s -o $WORKSPACE/latest.properties http://$GS_URL/opnfv-gerrit-$GERRIT_CHANGE_NUMBER.properties
+else
+    # get the latest.properties file in order to get info regarding latest artifact
+    echo "Downloading http://$GS_URL/latest.properties"
+    curl -s -o $WORKSPACE/latest.properties http://$GS_URL/latest.properties
+fi
+
+# check if we got the file
+[[ -f latest.properties ]] || exit 1
+
+# source the file so we get artifact metadata
+source latest.properties
+
+# echo the info about artifact that is used during the deployment
+OPNFV_ARTIFACT=${OPNFV_ARTIFACT_URL/*\/}
+echo "Using $OPNFV_ARTIFACT for deployment"
+
+# log info to console
+echo "Downloading the $INSTALLER_TYPE artifact using URL http://$OPNFV_ARTIFACT_URL"
+echo "This could take some time..."
+echo "--------------------------------------------------------"
+echo
+
+# download the file
+curl -s -o $WORKSPACE/opnfv.bin http://$OPNFV_ARTIFACT_URL > gsutil.bin.log 2>&1
+
+# list the file
+ls -al $WORKSPACE/opnfv.bin
+
+echo
+echo "--------------------------------------------------------"
+echo "Done!"
diff --git a/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml b/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml
new file mode 100644 (file)
index 0000000..f8c0258
--- /dev/null
@@ -0,0 +1,270 @@
+- project:
+    name: 'daisy4nfv-merge-jobs'
+
+    project: 'daisy'
+#####################################
+# branch definitions
+#####################################
+    stream:
+        - master:
+            branch: '{stream}'
+            gs-pathname: ''
+            disabled: false
+#####################################
+# patch merge phases
+#####################################
+    phase:
+        - 'basic':
+            slave-label: 'opnfv-build-centos'
+        - 'build':
+            slave-label: 'opnfv-build-centos'
+        - 'deploy-virtual':
+            slave-label: 'opnfv-build-centos'
+        - 'smoke-test':
+            slave-label: 'opnfv-build-centos'
+        - 'promote':
+            slave-label: 'opnfv-build-centos'
+#####################################
+# jobs
+#####################################
+    jobs:
+        - 'daisy4nfv-merge-{stream}'
+        - 'daisy4nfv-merge-{phase}-{stream}'
+#####################################
+# job templates
+#####################################
+- job-template:
+    name: 'daisy4nfv-merge-{stream}'
+
+    project-type: multijob
+
+    disabled: false
+
+    concurrent: true
+
+    properties:
+        - throttle:
+            enabled: true
+            max-total: 4
+            option: 'project'
+
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: '$GERRIT_REFSPEC'
+            choosing-strategy: 'gerrit'
+
+    wrappers:
+        - ssh-agent-credentials:
+            users:
+                - '{ssh-credentials}'
+        - timeout:
+            timeout: 360
+            fail: true
+
+    triggers:
+        - gerrit:
+            trigger-on:
+                - change-merged-event
+                - comment-added-contains-event:
+                    comment-contains-value: 'remerge'
+            projects:
+              - project-compare-type: 'ANT'
+                project-pattern: '{project}'
+                branches:
+                  - branch-compare-type: 'ANT'
+                    branch-pattern: '**/{branch}'
+                forbidden-file-paths:
+                  - compare-type: ANT
+                    pattern: 'docs/**|.gitignore'
+            readable-message: true
+
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - gerrit-parameter:
+            branch: '{branch}'
+        - 'opnfv-build-defaults'
+        - 'daisy4nfv-merge-defaults':
+            gs-pathname: '{gs-pathname}'
+
+    builders:
+        - description-setter:
+            description: "Built on $NODE_NAME"
+        - multijob:
+            name: basic
+            condition: SUCCESSFUL
+            projects:
+                - name: 'daisy4nfv-merge-basic-{stream}'
+                  current-parameters: false
+                  predefined-parameters: |
+                    GERRIT_BRANCH=$GERRIT_BRANCH
+                    GERRIT_REFSPEC=$GERRIT_REFSPEC
+                    GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+                    GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+                  node-parameters: false
+                  kill-phase-on: FAILURE
+                  abort-all-job: true
+        - multijob:
+            name: build
+            condition: SUCCESSFUL
+            projects:
+                - name: 'daisy4nfv-merge-build-{stream}'
+                  current-parameters: false
+                  predefined-parameters: |
+                    GERRIT_BRANCH=$GERRIT_BRANCH
+                    GERRIT_REFSPEC=$GERRIT_REFSPEC
+                    GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+                    GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+                  node-parameters: false
+                  kill-phase-on: FAILURE
+                  abort-all-job: true
+        - multijob:
+            name: deploy-virtual
+            condition: SUCCESSFUL
+            projects:
+                - name: 'daisy4nfv-merge-deploy-virtual-{stream}'
+                  current-parameters: false
+                  predefined-parameters: |
+                    GERRIT_BRANCH=$GERRIT_BRANCH
+                    GERRIT_REFSPEC=$GERRIT_REFSPEC
+                    GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+                    GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+                  node-parameters: false
+                  kill-phase-on: FAILURE
+                  abort-all-job: true
+        - multijob:
+            name: smoke-test
+            condition: SUCCESSFUL
+            projects:
+                - name: 'daisy4nfv-merge-smoke-test-{stream}'
+                  current-parameters: false
+                  predefined-parameters: |
+                    GERRIT_BRANCH=$GERRIT_BRANCH
+                    GERRIT_REFSPEC=$GERRIT_REFSPEC
+                    GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+                    GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+                  node-parameters: false
+                  kill-phase-on: FAILURE
+                  abort-all-job: true
+        - multijob:
+            name: promote
+            condition: SUCCESSFUL
+            projects:
+                - name: 'daisy4nfv-merge-promote-{stream}'
+                  current-parameters: false
+                  predefined-parameters: |
+                    GERRIT_BRANCH=$GERRIT_BRANCH
+                    GERRIT_REFSPEC=$GERRIT_REFSPEC
+                    GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+                    GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+                  node-parameters: false
+                  kill-phase-on: FAILURE
+                  abort-all-job: true
+
+- job-template:
+    name: 'daisy4nfv-merge-{phase}-{stream}'
+
+    disabled: '{obj:disabled}'
+
+    concurrent: true
+
+    properties:
+        - throttle:
+            enabled: true
+            max-total: 6
+            option: 'project'
+        - build-blocker:
+            use-build-blocker: true
+            blocking-jobs:
+                - 'daisy4nfv-merge-deploy-.*'
+                - 'daisy4nfv-merge-test-.*'
+            block-level: 'NODE'
+
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: '$GERRIT_REFSPEC'
+            choosing-strategy: 'gerrit'
+
+    wrappers:
+        - ssh-agent-credentials:
+            users:
+                - '{ssh-credentials}'
+        - timeout:
+            timeout: 360
+            fail: true
+
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - gerrit-parameter:
+            branch: '{branch}'
+        - '{slave-label}-defaults'
+        - 'daisy4nfv-merge-defaults':
+            gs-pathname: '{gs-pathname}'
+
+    builders:
+        - description-setter:
+            description: "Built on $NODE_NAME"
+        - '{project}-merge-{phase}-macro'
+#####################################
+# builder macros
+#####################################
+- builder:
+    name: 'daisy-merge-basic-macro'
+    builders:
+        - shell:
+            !include-raw: ./daisy4nfv-basic.sh
+
+- builder:
+    name: 'daisy-merge-build-macro'
+    builders:
+        - shell:
+            !include-raw:
+                - ./daisy4nfv-build.sh
+                - ./daisy4nfv-upload-artifact.sh
+                - ./daisy4nfv-workspace-cleanup.sh
+
+- builder:
+    name: 'daisy-merge-deploy-virtual-macro'
+    builders:
+        - shell:
+            !include-raw:
+                - ./daisy4nfv-download-artifact.sh
+                - ./daisy4nfv-virtual-deploy.sh
+                - ./daisy4nfv-workspace-cleanup.sh
+
+- builder:
+    name: 'daisy-merge-smoke-test-macro'
+    builders:
+        - shell: |
+            #!/bin/bash
+
+            echo "Not activated!"
+
+- builder:
+    name: 'daisy-merge-promote-macro'
+    builders:
+        - shell: |
+            #!/bin/bash
+
+            echo "Not activated!"
+#####################################
+# parameter macros
+#####################################
+- parameter:
+    name: 'daisy4nfv-merge-defaults'
+    parameters:
+        - string:
+            name: BUILD_DIRECTORY
+            default: $WORKSPACE/build_output
+            description: "Directory where the build artifact will be located upon the completion of the build."
+        - string:
+            name: CACHE_DIRECTORY
+            default: $HOME/opnfv/cache/$INSTALLER_TYPE
+            description: "Directory where the cache to be used during the build is located."
+        - string:
+            name: GS_URL
+            default: artifacts.opnfv.org/$PROJECT{gs-pathname}
+            description: "URL to Google Storage."
diff --git a/jjb/daisy4nfv/daisy4nfv-upload-artifact.sh b/jjb/daisy4nfv/daisy4nfv-upload-artifact.sh
new file mode 100755 (executable)
index 0000000..6b0aec5
--- /dev/null
@@ -0,0 +1,94 @@
+#!/bin/bash
+##############################################################################
+# Copyright (c) 2016 ZTE Coreporation and others.
+# hu.zhijiang@zte.com.cn
+# sun.jing22@zte.com.cn
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+set -o pipefail
+
+# check if we built something
+if [ -f $WORKSPACE/.noupload ]; then
+    echo "Nothing new to upload. Exiting."
+    /bin/rm -f $WORKSPACE/.noupload
+    exit 0
+fi
+
+# source the opnfv.properties to get ARTIFACT_VERSION
+source $WORKSPACE/opnfv.properties
+
+importkey () {
+# clone releng repository
+echo "Cloning releng repository..."
+[ -d releng ] && rm -rf releng
+git clone https://gerrit.opnfv.org/gerrit/releng $WORKSPACE/releng/ &> /dev/null
+#this is where we import the siging key
+if [ -f $WORKSPACE/releng/utils/gpg_import_key.sh ]; then
+  source $WORKSPACE/releng/utils/gpg_import_key.sh
+fi
+}
+
+signbin () {
+gpg2 -vvv --batch --yes --no-tty \
+  --default-key opnfv-helpdesk@rt.linuxfoundation.org  \
+  --passphrase besteffort \
+  --detach-sig $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.bin
+
+gsutil cp $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.bin.sig gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.bin.sig
+echo "BIN signature Upload Complete!"
+}
+
+uploadbin () {
+# log info to console
+echo "Uploading $INSTALLER_TYPE artifact. This could take some time..."
+echo
+
+cd $WORKSPACE
+# upload artifact and additional files to google storage
+gsutil cp $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.bin \
+    gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.bin > gsutil.bin.log 2>&1
+gsutil cp $WORKSPACE/opnfv.properties \
+    gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1
+if [[ ! "$JOB_NAME" =~ (verify|merge) ]]; then
+    gsutil cp $WORKSPACE/opnfv.properties \
+    gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1
+elif [[ "$JOB_NAME" =~ "merge" ]]; then
+    echo "Uploaded Daisy4nfv BIN for a merged change"
+fi
+
+gsutil -m setmeta \
+    -h "Content-Type:text/html" \
+    -h "Cache-Control:private, max-age=0, no-transform" \
+    gs://$GS_URL/latest.properties \
+    gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > /dev/null 2>&1
+
+gsutil -m setmeta \
+    -h "Cache-Control:private, max-age=0, no-transform" \
+    gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.bin > /dev/null 2>&1
+
+# disabled errexit due to gsutil setmeta complaints
+#   BadRequestException: 400 Invalid argument
+# check if we uploaded the file successfully to see if things are fine
+gsutil ls gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.bin > /dev/null 2>&1
+if [[ $? -ne 0 ]]; then
+    echo "Problem while uploading artifact!"
+    echo "Check log $WORKSPACE/gsutil.bin.log on the machine where this build is done."
+    exit 1
+fi
+
+echo "Done!"
+echo
+echo "--------------------------------------------------------"
+echo
+echo "Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.bin"
+echo
+echo "--------------------------------------------------------"
+echo
+}
+
+importkey
+signbin
+uploadbin
diff --git a/jjb/daisy4nfv/daisy4nfv-workspace-cleanup.sh b/jjb/daisy4nfv/daisy4nfv-workspace-cleanup.sh
new file mode 100755 (executable)
index 0000000..26f7e9a
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+##############################################################################
+# Copyright (c) 2016 ZTE Coreporation and others.
+# hu.zhijiang@zte.com.cn
+# sun.jing22@zte.com.cn
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+set -o errexit
+set -o nounset
+set -o pipefail
+
+# delete the $WORKSPACE to open some space
+/bin/rm -rf $WORKSPACE
index 5685444..3f691d8 100755 (executable)
@@ -24,10 +24,10 @@ else
 fi
 
 # check if we got the file
-[[ -f latest.properties ]] || exit 1
+[[ -f $WORKSPACE/latest.properties ]] || exit 1
 
 # source the file so we get artifact metadata
-source latest.properties
+source $WORKSPACE/latest.properties
 
 # echo the info about artifact that is used during the deployment
 OPNFV_ARTIFACT=${OPNFV_ARTIFACT_URL/*\/}
index 7385623..4528c00 100755 (executable)
@@ -5,8 +5,10 @@ branch=${GIT_BRANCH##*/}
 [[ "$PUSH_RESULTS_TO_DB" == "true" ]] && flags+="-r"
 if [[ ${branch} == *"brahmaputra"* ]]; then
     cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh -s ${flags}"
-else
+elif [[ ${branch} == *"colorado"* ]]; then
     cmd="python ${FUNCTEST_REPO_DIR}/ci/run_tests.py -t all ${flags}"
+else
+    cmd="python ${FUNCTEST_REPO_DIR}/functest/ci/run_tests.py -t all ${flags}"
 fi
 container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
 docker exec $container_id $cmd
@@ -15,4 +17,4 @@ ret_value=$?
 ret_val_file="${HOME}/opnfv/functest/results/${branch}/return_value"
 echo ${ret_value}>${ret_val_file}
 
-exit 0
\ No newline at end of file
+exit 0
index 7e9fa09..df28656 100755 (executable)
@@ -5,8 +5,10 @@ branch=${GIT_BRANCH##*/}
 echo "Functest: run $FUNCTEST_SUITE_NAME on branch ${branch}"
 if [[ ${branch} == *"brahmaputra"* ]]; then
     cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test $FUNCTEST_SUITE_NAME"
-else
+elif [[ ${branch} == *"colorado"* ]]; then
     cmd="python ${FUNCTEST_REPO_DIR}/ci/run_tests.py -t $FUNCTEST_SUITE_NAME"
+else
+    cmd="python ${FUNCTEST_REPO_DIR}/functest/ci/run_tests.py -t $FUNCTEST_SUITE_NAME"
 fi
 container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
 docker exec $container_id $cmd
index 1c77702..bc30ffa 100755 (executable)
@@ -82,8 +82,10 @@ if [ $(docker ps | grep "opnfv/functest:${DOCKER_TAG}" | wc -l) == 0 ]; then
 fi
 if [[ ${branch} == *"brahmaputra"* ]]; then
     cmd="${FUNCTEST_REPO_DIR}/docker/prepare_env.sh"
-else
+elif [[ ${branch} == *"colorado"* ]]; then
     cmd="python ${FUNCTEST_REPO_DIR}/ci/prepare_env.py start"
+else
+    cmd="python ${FUNCTEST_REPO_DIR}/functest/ci/prepare_env.py start"
 fi
 echo "Executing command inside the docker: ${cmd}"
 docker exec ${container_id} ${cmd}
index 06377ac..f677f47 100755 (executable)
@@ -18,7 +18,7 @@ case "$JOB_TYPE" in
     verify|daily)
         #start the test
         cd $WORKSPACE
-        ./ci/test_kvmfornfv.sh $JOB_TYPE
+        ./ci/test_kvmfornfv.sh $JOB_TYPE $TEST_NAME
         ;;
     *)
         echo "Test is not enabled for $JOB_TYPE jobs"
index b6a55fe..2c8446e 100644 (file)
             slave-label: 'intel-pod1'
 #####################################
 # patch verification phases
+#####################################
+    testname:
+        - 'Idle_Idle':
+            trigger_time: '@midnight'
+        - 'Stress_Idle':
+            trigger_time: '@midnight+3hours'
+        - 'Packet_Forwarding':
+            trigger_time: '@midnight+6hours'
+#####################################
+# patch verification phases
 #####################################
     jobs:
         - 'kvmfornfv-verify-{stream}'
         - 'kvmfornfv-verify-{phase}-{stream}'
         - 'kvmfornfv-merge-{stream}'
-        - 'kvmfornfv-daily-{stream}'
-        - 'kvmfornfv-daily-{phase}-{stream}'
+        - 'kvmfornfv-{testname}-daily-{stream}'
+        - 'kvmfornfv-{testname}-daily-{phase}-{stream}'
 #####################################
 # job templates
 #####################################
                   kill-phase-on: FAILURE
                   abort-all-job: true
 
+
 - job-template:
     name: 'kvmfornfv-verify-{phase}-{stream}'
 
             !include-raw: ./kvmfornfv-build.sh
 
 - job-template:
-    name: 'kvmfornfv-daily-{stream}'
+    name: 'kvmfornfv-{testname}-daily-{stream}'
 
     project-type: multijob
 
             choosing-strategy: 'default'
 
     triggers:
-         - timed: '@midnight'
+        - timed: '{trigger_time}'
 
     builders:
         - description-setter:
             name: build
             condition: SUCCESSFUL
             projects:
-                - name: 'kvmfornfv-daily-build-{stream}'
+                - name: 'kvmfornfv-Idle_Idle-daily-build-{stream}'
+                  current-parameters: false
+                  node-parameters: false
+                  git-revision: true
+                  kill-phase-on: FAILURE
+                  abort-all-job: true
+        - multijob:
+            name: build
+            condition: SUCCESSFUL
+            projects:
+                - name: 'kvmfornfv-Stress_Idle-daily-build-{stream}'
+                  current-parameters: false
+                  node-parameters: false
+                  git-revision: true
+                  kill-phase-on: FAILURE
+                  abort-all-job: true
+        - multijob:
+            name: build
+            condition: SUCCESSFUL
+            projects:
+                - name: 'kvmfornfv-Packet_Forwarding-daily-build-{stream}'
                   current-parameters: false
                   node-parameters: false
                   git-revision: true
                   kill-phase-on: FAILURE
                   abort-all-job: true
+
+        - multijob:
+            name: build
+            condition: SUCCESSFUL
+            projects:
+                - name: 'kvmfornfv-Idle_Idle-daily-test-{stream}'
+                  current-parameters: false
+                  node-parameters: false
+                  git-revision: true
+                  kill-phase-on: FAILURE
+                  abort-all-job: true
+
         - multijob:
             name: test
             condition: SUCCESSFUL
             projects:
-                - name: 'kvmfornfv-daily-test-{stream}'
+                - name: 'kvmfornfv-Stress_Idle-daily-test-{stream}'
+                  current-parameters: false
+                  node-parameters: false
+                  git-revision: true
+                  kill-phase-on: FAILURE
+                  abort-all-job: true
+        - multijob:
+            name: build
+            condition: SUCCESSFUL
+            projects:
+                - name: 'kvmfornfv-Packet_Forwarding-daily-build-{stream}'
                   current-parameters: false
                   node-parameters: false
                   git-revision: true
 
 
 - job-template:
-    name: 'kvmfornfv-daily-{phase}-{stream}'
+    name: 'kvmfornfv-{testname}-daily-{phase}-{stream}'
 
     disabled: '{obj:disabled}'
 
     builders:
         - description-setter:
             description: "Built on $NODE_NAME"
-        - '{project}-daily-{phase}-macro'
+        - '{project}-{testname}-daily-{phase}-macro'
+########################
+# parameter macros
+########################
+- parameter:
+    name: 'kvmfornfv-Idle_Idle-daily-parameter'
+    parameters:
+        - string:
+            name: TEST_NAME
+            default: 'idle_idle'
+            description: "Daily job to run cyclictest without applying any stress"
+- parameter:
+    name: 'kvmfornfv-Stress_Idle-daily-parameter'
+    parameters:
+        - string:
+            name: TEST_NAME
+            default: 'stress_idle'
+            description: "Daily job to run cyclictest with stress applied"
+- parameter:
+    name: 'kvmfornfv-Packet_Forwarding-daily-parameter'
+    parameters:
+        - string:
+            name: TEST_NAME
+            default: 'packet_forward'
+            description: "Daily job to run packet forwarding test cases"
 #####################################
 # builder macros
 #####################################
         - shell:
             !include-raw: ./kvmfornfv-test.sh
 - builder:
-    name: 'kvmfornfv-daily-build-macro'
+    name: 'kvmfornfv-Idle_Idle-daily-build-macro'
+    builders:
+        - shell:
+            !include-raw: ./kvmfornfv-build.sh
+        - shell:
+            !include-raw: ./kvmfornfv-upload-artifact.sh
+- builder:
+    name: 'kvmfornfv-Stress_Idle-daily-build-macro'
+    builders:
+        - shell:
+            !include-raw: ./kvmfornfv-build.sh
+        - shell:
+            !include-raw: ./kvmfornfv-upload-artifact.sh
+- builder:
+    name: 'kvmfornfv-Packet_Forwarding-daily-build-macro'
     builders:
         - shell:
             !include-raw: ./kvmfornfv-build.sh
         - shell:
             !include-raw: ./kvmfornfv-upload-artifact.sh
 - builder:
-    name: 'kvmfornfv-daily-test-macro'
+    name: 'kvmfornfv-Idle_Idle-daily-test-macro'
+    builders:
+        - shell:
+            !include-raw: ./kvmfornfv-download-artifact.sh
+        - shell:
+            !include-raw: ./kvmfornfv-test.sh
+- builder:
+    name: 'kvmfornfv-Stress_Idle-daily-test-macro'
+    builders:
+        - shell:
+            !include-raw: ./kvmfornfv-download-artifact.sh
+        - shell:
+            !include-raw: ./kvmfornfv-test.sh
+- builder:
+    name: 'kvmfornfv-Packet_Forwarding-daily-test-macro'
     builders:
         - shell:
             !include-raw: ./kvmfornfv-download-artifact.sh
index b0f8191..1c609a4 100644 (file)
@@ -1,10 +1,10 @@
 - project:
-    name: artifact-cleanup
+    name: releng-artifact-cleanup
 
     project: 'releng'
 
     jobs:
-        - 'artifact-cleanup-daily-{stream}'
+        - 'releng-artifact-cleanup-daily-{stream}'
 
     stream:
         - master:
@@ -13,7 +13,7 @@
 
 
 - job-template:
-    name: 'artifact-cleanup-daily-{stream}'
+    name: 'releng-artifact-cleanup-daily-{stream}'
 
     # Job template for daily builders
     #
index f90f95d..6860dd0 100644 (file)
@@ -55,7 +55,7 @@
                     comment-contains-value: 'reverify'
             projects:
               - project-compare-type: 'REG_EXP'
-                project-pattern: 'functest|sdnvpn|qtip|daisy'
+                project-pattern: 'functest|sdnvpn|qtip|daisy|sfc'
                 branches:
                   - branch-compare-type: 'ANT'
                     branch-pattern: '**/{branch}'
diff --git a/jjb/opnfv/test-sign.yml b/jjb/opnfv/test-sign.yml
deleted file mode 100644 (file)
index b27d757..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-- project:
-    name: test-sign
-
-    project: 'releng'
-
-    jobs:
-        - 'test-sign-daily-{stream}'
-
-    stream:
-        - master:
-            branch: '{stream}'
-            gs-pathname: ''
-
-
-- job-template:
-    name: 'test-sign-daily-{stream}'
-
-    # Job template for daily builders
-    #
-    # Required Variables:
-    #     stream:    branch with - in place of / (eg. stable)
-    #     branch:    branch (eg. stable)
-    node: master
-
-    disabled: false
-
-    parameters:
-        - project-parameter:
-            project: '{project}'
-
-    scm:
-        - git-scm:
-            credentials-id: '{ssh-credentials}'
-            refspec: ''
-            branch: '{branch}'
-
-    triggers:
-        - timed: 'H H * * *'
-
-    builders:
-        - shell: |
-            $WORKSPACE/utils/test-sign-artifact.sh
index 7f02361..186e0ea 100644 (file)
@@ -5,6 +5,7 @@ bottlenecks
 compass4nfv
 copper
 conductor
+daisy
 doctor
 domino
 dovetail
index 2d88449..ccfe11e 100644 (file)
@@ -1,14 +1,14 @@
 - project:
-    name: builder-jobs
+    name: releng-builder-jobs
     jobs:
-        - 'builder-verify-jjb'
-        - 'builder-merge'
-        - 'artifacts-api'
+        - 'releng-verify-jjb'
+        - 'releng-merge-jjb'
+        - 'releng-generate-artifacts-api'
 
     project: 'releng'
 
 - job-template:
-    name: builder-verify-jjb
+    name: releng-verify-jjb
 
     parameters:
         - project-parameter:
@@ -57,7 +57,7 @@
             artifacts: 'job_output/*'
 
 - job-template:
-    name: 'builder-merge'
+    name: 'releng-merge-jjb'
 
     # builder-merge job to run JJB update
     #
                 jenkins-jobs update -r --delete-old jjb/
 
 - job-template:
-    name: 'artifacts-api'
+    name: 'releng-generate-artifacts-api'
 
     # Generate and upload the JSON file to used for artifacts site
 
diff --git a/modules/README.rst b/modules/README.rst
new file mode 100644 (file)
index 0000000..de9ff55
--- /dev/null
@@ -0,0 +1,11 @@
+
+This directory may be used to add new tools that might be useful for any
+project in OPNFV. This tools must be python based and shall be imported
+as follows:
+
+  from opnfv.utils import SSHUtils
+  from opnfv.utils import OPNFVLogger
+
+For further information about how to use this modules directory, contact:
+  fatih.degirmenci@ericsson.com
+  jose.lausuch@ericsson.com
diff --git a/modules/opnfv/installer_adapters/__init__.py b/modules/opnfv/installer_adapters/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/modules/opnfv/installer_adapters/apex/__init__.py b/modules/opnfv/installer_adapters/apex/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/modules/opnfv/installer_adapters/compass/__init__.py b/modules/opnfv/installer_adapters/compass/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
@@ -8,8 +8,8 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 
-import SSHUtils as ssh_utils
-import RelengLogger as rl
+import opnfv.modules.utils.SSHUtils as ssh_utils
+import opnfv.modules.utils.OPNFVLogger as logger
 
 
 class FuelAdapter:
@@ -22,7 +22,7 @@ class FuelAdapter:
             installer_ip,
             self.installer_user,
             password=self.installer_password)
-        self.logger = rl.Logger("Handler").getLogger()
+        self.logger = logger.Logger("FuelHandler").getLogger()
 
     def runcmd_fuel_installer(self, cmd):
         _, stdout, stderr = (self
diff --git a/modules/opnfv/installer_adapters/fuel/__init__.py b/modules/opnfv/installer_adapters/fuel/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/modules/opnfv/installer_adapters/joid/__init__.py b/modules/opnfv/installer_adapters/joid/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
similarity index 97%
rename from utils/installer-adapter/SSHUtils.py
rename to modules/opnfv/utils/SSHUtils.py
index c938886..2f48add 100644 (file)
 
 
 import paramiko
-import RelengLogger as rl
+import opnfv.modules.utils.OPNFVLogger as OPNFVLogger
 import os
 
-logger = rl.Logger('SSHUtils').getLogger()
+logger = OPNFVLogger.Logger('SSHUtils').getLogger()
 
 
 def get_ssh_client(hostname, username, password=None, jumphost=None):
@@ -66,6 +66,7 @@ class JumpHostHopClient(paramiko.SSHClient):
     '''
     Connect to a remote server using a jumphost hop
     '''
+
     def __init__(self, *args, **kwargs):
         self.logger = rl.Logger("JumpHostHopClient").getLogger()
         self.jumphost_ssh = None
diff --git a/modules/opnfv/utils/__init__.py b/modules/opnfv/utils/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/modules/setup.py b/modules/setup.py
new file mode 100644 (file)
index 0000000..26f8a6e
--- /dev/null
@@ -0,0 +1,21 @@
+##############################################################################
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+
+from setuptools import setup, find_packages
+
+
+setup(
+    name="opnfv",
+    version="danube",
+    packages=find_packages(),
+    include_package_data=True,
+    package_data={
+    },
+    url="https://www.opnfv.org",
+    install_requires=["paramiko>=2.0.1"]
+)
index 334dff4..2bd0a53 100644 (file)
@@ -26,6 +26,7 @@ On the same bifrost VM, follow these steps:
 
  1. Source bifrost env vars: source /opt/stack/bifrost/env-vars
  2. Export baremetal servers inventory:  export BIFROST_INVENTORY-SOURCE=/opt/stack/baremetal.json 
+ 3. Change active directory: cd /opt/stack/bifrost/playbooks
  3. Enroll the servers: ansible-playbook -vvv -i inventory/bifrost_inventory.py enroll-dynamic.yaml -e @/etc/bifrost/bifrost_global_vars
  4. Deploy the servers:  ansible-playbook -vvv -i inventory/bifrost_inventory.py deploy-dynamic.yaml -e @/etc/bifrost/bifrost_global_vars
  5. Wait until they are on **active** state, check it with: ironic node-list
index 6b608a7..fc9bf71 100644 (file)
@@ -22,7 +22,7 @@ class opnfv::server (
 
   class { 'iptables':
     public_tcp_ports => $iptables_public_tcp_ports,
-    public_udp_ports => $all_udp,
+    public_udp_ports => $iptables_public_udp_ports,
     rules4           => $iptables_rules4,
     rules6           => $iptables_rules6,
   }
diff --git a/utils/test-sign-artifact.sh b/utils/test-sign-artifact.sh
deleted file mode 100755 (executable)
index f09b7f4..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/bash
-
-export PATH=$PATH:/usr/local/bin/
-
-# clone releng repository
-echo "Cloning releng repository..."
-[ -d releng ] && rm -rf releng
-git clone https://gerrit.opnfv.org/gerrit/releng $WORKSPACE/releng/ &> /dev/null
-#this is where we import the siging key
-if [ -f $WORKSPACE/releng/utils/gpg_import_key.sh ]; then 
-  source $WORKSPACE/releng/utils/gpg_import_key.sh
-fi
-
-artifact="foo"
-echo foo > foo
-
-testsign () {
-  echo "Signing artifact: ${artifact}"
-  gpg2 -vvv --batch \
-    --default-key opnfv-helpdesk@rt.linuxfoundation.org  \
-    --passphrase besteffort \
-    --detach-sig $artifact
-}
-
-testsign
-