summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
Diffstat (limited to 'jjb')
-rw-r--r--jjb/fuel/fuel-daily-jobs.yml2
-rw-r--r--jjb/fuel/fuel-project-jobs.yml4
-rwxr-xr-xjjb/infra/bifrost-verify.sh35
-rw-r--r--jjb/joid/joid-deploy.sh23
-rw-r--r--jjb/releng/testapi-automate.yml23
-rw-r--r--jjb/releng/testapi-backup-mongodb.sh31
6 files changed, 89 insertions, 29 deletions
diff --git a/jjb/fuel/fuel-daily-jobs.yml b/jjb/fuel/fuel-daily-jobs.yml
index 02fa9fbf4..b0dee736a 100644
--- a/jjb/fuel/fuel-daily-jobs.yml
+++ b/jjb/fuel/fuel-daily-jobs.yml
@@ -240,7 +240,7 @@
publishers:
- email:
- recipients: jonas.bjurel@ericsson.com stefan.k.berg@ericsson.com peter.barabas@ericsson.com fzhadaev@mirantis.com
+ recipients: peter.barabas@ericsson.com fzhadaev@mirantis.com
########################
# parameter macros
diff --git a/jjb/fuel/fuel-project-jobs.yml b/jjb/fuel/fuel-project-jobs.yml
index deab3ab21..390094e47 100644
--- a/jjb/fuel/fuel-project-jobs.yml
+++ b/jjb/fuel/fuel-project-jobs.yml
@@ -79,7 +79,7 @@
publishers:
- email:
- recipients: jonas.bjurel@ericsson.com stefan.k.berg@ericsson.com fzhadaev@mirantis.com
+ recipients: fzhadaev@mirantis.com
- job-template:
name: 'fuel-merge-build-{stream}'
@@ -211,7 +211,7 @@
publishers:
- email:
- recipients: jonas.bjurel@ericsson.com stefan.k.berg@ericsson.com fzhadaev@mirantis.com
+ recipients: fzhadaev@mirantis.com
- job-template:
name: 'fuel-deploy-generic-daily-{stream}'
diff --git a/jjb/infra/bifrost-verify.sh b/jjb/infra/bifrost-verify.sh
index 48f916e72..a7ef9c43f 100755
--- a/jjb/infra/bifrost-verify.sh
+++ b/jjb/infra/bifrost-verify.sh
@@ -24,16 +24,17 @@ function upload_logs() {
gsutil -q cp -Z ${WORKSPACE}/build_log.txt ${BIFROST_GS_URL}/build_log.txt
rm ${WORKSPACE}/build_log.txt
- [[ ! -d ${WORKSPACE}/logs ]] && return 0
-
- pushd ${WORKSPACE}/logs/ &> /dev/null
- for x in *.log; do
- echo "Compressing and uploading $x"
- gsutil -q cp -Z ${x} ${BIFROST_GS_URL}/${x}
- done
+ if [[ -d ${WORKSPACE}/logs ]]; then
+ pushd ${WORKSPACE}/logs &> /dev/null
+ for x in *.log; do
+ echo "Compressing and uploading $x"
+ gsutil -q cp -Z ${x} ${BIFROST_GS_URL}/${x}
+ done
+ popd &> /dev/null
+ fi
echo "Generating the landing page"
- cat > index.html <<EOF
+ cat > ${WORKSPACE}/index.html <<EOF
<html>
<h1>Build results for <a href=https://$GERRIT_NAME/#/c/$GERRIT_CHANGE_NUMBER/$GERRIT_PATCHSET_NUMBER>$GERRIT_NAME/$GERRIT_CHANGE_NUMBER/$GERRIT_PATCHSET_NUMBER</a></h1>
<h2>Job: $JOB_NAME</h2>
@@ -41,20 +42,22 @@ function upload_logs() {
<li><a href=${BIFROST_LOG_URL}/build_log.txt>build_log.txt</a></li>
EOF
- for x in *.log; do
- echo "<li><a href=${BIFROST_LOG_URL}/${x}>${x}</a></li>" >> index.html
- done
+ if [[ -d ${WORKSPACE}/logs ]]; then
+ pushd ${WORKSPACE}/logs &> /dev/null
+ for x in *.log; do
+ echo "<li><a href=${BIFROST_LOG_URL}/${x}>${x}</a></li>" >> ${WORKSPACE}/index.html
+ done
+ popd &> /dev/null
+ fi
- cat >> index.html << EOF
+ cat >> ${WORKSPACE}/index.html << EOF
</ul>
</html>
EOF
- gsutil -q cp index.html ${BIFROST_GS_URL}/index.html
-
- rm index.html
+ gsutil -q cp ${WORKSPACE}/index.html ${BIFROST_GS_URL}/index.html
- popd &> /dev/null
+ rm ${WORKSPACE}/index.html
}
function fix_ownership() {
diff --git a/jjb/joid/joid-deploy.sh b/jjb/joid/joid-deploy.sh
index 88dbe2214..da5dcf043 100644
--- a/jjb/joid/joid-deploy.sh
+++ b/jjb/joid/joid-deploy.sh
@@ -45,17 +45,24 @@ export POD_NAME=${POD/-}
##
cd $WORKSPACE/ci
-if [ -e "$LAB_CONFIG/environments.yaml" ] && [ "$MAAS_REINSTALL" == "false" ]; then
+
+if [ -e "$LAB_CONFIG/deployconfig.yaml" ] && [ "$MAAS_REINSTALL" == "false" ]; then
echo "------ Recover Juju environment to use MAAS ------"
- cp $LAB_CONFIG/environments.yaml .
- cp $LAB_CONFIG/deployment.yaml .
- if [ -e $LAB_CONFIG/deployconfig.yaml ]; then
+ if [ -e deployconfig.yaml ]; then
cp $LAB_CONFIG/deployconfig.yaml .
+ cp $LAB_CONFIG/deployment.yaml .
+ cp $LAB_CONFIG/labconfig.yaml .
fi
else
- echo "------ Redeploy MAAS ------"
- ./00-maasdeploy.sh $POD_NAME
- exit_on_error $? "MAAS Deploy FAILED"
+ if ["$NODE_NAME" == "default" ]; then
+ echo "------ Redeploy MAAS ------"
+ ./03-maasdeploy.sh default
+ exit_on_error $? "MAAS Deploy FAILED"
+ else
+ echo "------ Redeploy MAAS ------"
+ ./03-maasdeploy.sh custom $LAB_CONFIG/labconfig.yaml
+ exit_on_error $? "MAAS Deploy FAILED"
+ fi
fi
##
@@ -142,7 +149,7 @@ if [ "$JOID_MODEL" == 'os' ]; then
# export the openrc file by getting the one generated by joid and add SDN
# controller for Functest
- cp ./cloud/admin-openrc $JOID_ADMIN_OPENRC
+ # cp ./cloud/admin-openrc $JOID_ADMIN_OPENRC
cat << EOF >> $JOID_ADMIN_OPENRC
export SDN_CONTROLLER=$SDN_CONTROLLER_IP
export SDN_PASSWORD=$SDN_PASSWORD
diff --git a/jjb/releng/testapi-automate.yml b/jjb/releng/testapi-automate.yml
index abb3481ed..8332f5bb4 100644
--- a/jjb/releng/testapi-automate.yml
+++ b/jjb/releng/testapi-automate.yml
@@ -10,6 +10,20 @@
project: 'releng'
+- job:
+ name: 'testapi-mongodb-backup'
+
+ slave-label: 'testresults'
+
+ scm:
+ - git-scm
+
+ triggers:
+ - timed: '@weekly'
+
+ builders:
+ - mongodb-backup
+
- job-template:
name: 'testapi-verify-{stream}'
@@ -55,8 +69,8 @@
- cobertura:
report-file: "coverage.xml"
only-stable: "true"
- health-auto-update: "true"
- stability-auto-update: "true"
+ health-auto-update: "false"
+ stability-auto-update: "false"
zoom-coverage-chart: "true"
targets:
- files:
@@ -110,6 +124,11 @@
################################
# job builders
################################
+- builder:
+ name: mongodb-backup
+ builders:
+ - shell: |
+ bash ./jjb/releng/testapi-backup-mongodb.sh
- builder:
name: run-unit-tests
diff --git a/jjb/releng/testapi-backup-mongodb.sh b/jjb/releng/testapi-backup-mongodb.sh
new file mode 100644
index 000000000..52957ab12
--- /dev/null
+++ b/jjb/releng/testapi-backup-mongodb.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+set -e
+
+# Run MongoDB backup
+python $WORKSPACE/utils/test/testapi/update/templates/backup_mongodb.py -o $WORKSPACE/
+
+# Compressing the dump
+now=$(date +"%m_%d_%Y_%H_%M_%S")
+echo $now
+
+file_name="testapi_mongodb_"$now".tar.gz"
+echo $file_name
+
+tar cvfz "$file_name" test_results_collection*
+
+rm -rf test_results_collection*
+
+artifact_dir="testapibackup"
+workspace="$WORKSPACE"
+
+set +e
+/usr/local/bin/gsutil &>/dev/null
+if [ $? != 0 ]; then
+ echo "Not possible to push results to artifact: gsutil not installed"
+ exit 1
+else
+ echo "Uploading mongodump to artifact $artifact_dir"
+ /usr/local/bin/gsutil cp -r "$workspace"/"$file_name" gs://testingrohit/"$artifact_dir"/
+ echo "MongoDump can be found at http://artifacts.opnfv.org/$artifact_dir"
+fi