summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
Diffstat (limited to 'jjb')
-rw-r--r--jjb/apex/apex.yml52
-rw-r--r--jjb/functest/functest-ci-jobs.yml27
2 files changed, 72 insertions, 7 deletions
diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml
index 26090a3a3..6dbea1a62 100644
--- a/jjb/apex/apex.yml
+++ b/jjb/apex/apex.yml
@@ -628,6 +628,30 @@
failure-threshold: 'never'
unstable-threshold: 'FAILURE'
+- job-template:
+ name: 'apex-gs-clean-{stream}'
+
+ # Job template for clean
+ #
+ # Required Variables:
+ # stream: branch with - in place of / (eg. stable)
+ node: '{slave}'
+
+ disabled: false
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ - apex-parameter:
+ gs-pathname: '{gs-pathname}'
+
+ builders:
+ - 'apex-gs-clean'
+
+ triggers:
+ - 'apex-gs-clean-{stream}'
+
+
########################
# parameter macros
########################
@@ -780,6 +804,30 @@
echo "RPM Artifact is available as http://$GS_URL/$(basename $OPNFV_RPM_URL)"
- builder:
+ name: 'apex-gs-cleanup'
+ builders:
+ - shell: |
+ #!/bin/bash
+ set -o errexit
+ set -o nounset
+ set -o pipefail
+
+ # log info to console
+ echo "Cleaning Google Storage"
+ echo "-----------------------"
+ echo
+
+ thirty_days_ago=$(date -d "30 days ago" +"%Y%m%d")
+
+ for i in $(gsutil ls gs://$GS_URL/*201?*); do
+ filedate=$(date -d "$(echo $i | grep -Eo 201[0-9]-?[0-9][0-9]-?[0-9][0-9])" +"%Y%m%d")
+ if [ $filedate -lt $thirty_days_ago ]; then
+ # gsutil indicates what it is removing so no need for output here
+ gsutil rm $i
+ fi
+ done
+
+- builder:
name: 'apex-deploy-virtual'
builders:
- shell: |
@@ -1010,3 +1058,7 @@
name: 'apex-brahmaputra'
triggers:
- timed: '0 3 * * *'
+- trigger:
+ name: 'apex-gs-clean-{stream}'
+ triggers:
+ - timed: '0 2 * * *'
diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml
index e17e54183..0ee73b0c6 100644
--- a/jjb/functest/functest-ci-jobs.yml
+++ b/jjb/functest/functest-ci-jobs.yml
@@ -197,7 +197,7 @@
description: "Push the results of all the tests to the resultDB"
- string:
name: CI_DEBUG
- default: 'false'
+ default: 'true'
description: "Show debug output information"
########################
# trigger macros
@@ -224,8 +224,13 @@
- shell: |
#!/bin/bash
set -e
- echo "Functest: run $FUNCTEST_SUITE_NAME"
- cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test $FUNCTEST_SUITE_NAME"
+ 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
+ cmd="python ${FUNCTEST_REPO_DIR}/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
@@ -235,9 +240,13 @@
- shell: |
#!/bin/bash
set +e
- flags="-s"
- [[ "$PUSH_RESULTS_TO_DB" == "true" ]] && flags+=" -r"
- cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh ${flags}"
+ 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
+ cmd="python ${FUNCTEST_REPO_DIR}/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
@@ -309,7 +318,11 @@
echo "The container opnfv/functest with ID=${container_id} has not been properly started. Exiting..."
exit 1
fi
- cmd="${FUNCTEST_REPO_DIR}/docker/prepare_env.sh"
+ if [[ ${branch} == *"brahmaputra"* ]]; then
+ cmd="${FUNCTEST_REPO_DIR}/docker/prepare_env.sh"
+ else
+ cmd="python ${FUNCTEST_REPO_DIR}/ci/prepare_env.py start"
+ fi
echo "Executing command inside the docker: ${cmd}"
docker exec ${container_id} ${cmd}