summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
Diffstat (limited to 'jjb')
-rwxr-xr-xjjb/apex/apex-fetch-logs.sh24
-rw-r--r--jjb/apex/apex-verify-jobs.yml16
-rw-r--r--jjb/apex/apex.yml64
-rw-r--r--jjb/apex/apex.yml.j264
-rw-r--r--jjb/clover/clover-project.yml10
-rw-r--r--jjb/doctor/doctor.yml2
-rw-r--r--jjb/ovn4nfv/ovn4nfv-project-jobs.yml4
-rw-r--r--jjb/pharos/check-jinja2.yml3
-rw-r--r--jjb/sfc/sfc-project-jobs.yml4
-rw-r--r--jjb/snaps/snaps-verify-jobs.yml4
-rw-r--r--jjb/yardstick/yardstick-project-jobs.yml20
11 files changed, 207 insertions, 8 deletions
diff --git a/jjb/apex/apex-fetch-logs.sh b/jjb/apex/apex-fetch-logs.sh
new file mode 100755
index 000000000..f25f456b1
--- /dev/null
+++ b/jjb/apex/apex-fetch-logs.sh
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+set -o errexit
+set -o nounset
+set -o pipefail
+
+# log info to console
+echo "Fetching logs from overcloud. This could take some time..."
+echo "--------------------------------------------------------"
+echo
+
+if sudo opnfv-pyutil --fetch-logs; then
+ LOG_LOCATION=$(cat apex_util.log | grep 'Log retrieval complete' | grep -Eo '/tmp/.+$')
+ if [ -z "$LOG_LOCATION" ]; then
+ echo "WARNING: Unable to determine log location. Logs will not be uploaded"
+ exit 0
+ else
+ UPLOAD_LOCATION="${GS_URL}/logs/${JOB_NAME}/${BUILD_NUMBER}/"
+ gsutil cp -r ${LOG_LOCATION} gs://${UPLOAD_LOCATION} > gsutil.latest_logs.log
+ echo "Logs available at https://${UPLOAD_LOCATION}/$(basename $LOG_LOCATION)"
+ fi
+else
+ echo "WARNING: Log retrieval failed. No logs will be uploaded"
+ exit 0
+fi
diff --git a/jjb/apex/apex-verify-jobs.yml b/jjb/apex/apex-verify-jobs.yml
index 3a693c87e..6f49ffd78 100644
--- a/jjb/apex/apex-verify-jobs.yml
+++ b/jjb/apex/apex-verify-jobs.yml
@@ -32,7 +32,7 @@
- job-template:
name: 'apex-verify-unit-tests-{stream}'
- node: 'apex-build-{stream}'
+ node: 'apex-build-master'
concurrent: true
@@ -358,6 +358,20 @@
kill-phase-on: NEVER
abort-all-job: true
git-revision: false
+ - multijob:
+ name: apex-fetch-logs
+ condition: ALWAYS
+ projects:
+ - name: 'apex-fetch-logs-{stream}'
+ current-parameters: true
+ predefined-parameters: |
+ GERRIT_BRANCH=$GERRIT_BRANCH
+ GERRIT_REFSPEC=$GERRIT_REFSPEC
+ GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+ node-parameters: true
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
########################
# builder macros
diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml
index a4c68600f..48bff6640 100644
--- a/jjb/apex/apex.yml
+++ b/jjb/apex/apex.yml
@@ -3,6 +3,7 @@
name: 'apex'
project: 'apex'
jobs:
+ - 'apex-fetch-logs-{stream}'
- 'apex-runner-cperf-{stream}'
- 'apex-virtual-{stream}'
- 'apex-deploy-{platform}-{stream}'
@@ -234,6 +235,34 @@
- 'pike'
- 'queens'
- 'master'
+
+
+# Fetch Logs Job
+- job-template:
+ name: 'apex-fetch-logs-{stream}'
+
+ concurrent: true
+
+ disabled: false
+ scm:
+ - git-scm-gerrit
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ branch: '{branch}'
+ - apex-parameter:
+ gs-pathname: '{gs-pathname}'
+ # yamllint enable rule:line-length
+ properties:
+ - logrotate-default
+ - throttle:
+ max-per-node: 1
+ max-total: 10
+ option: 'project'
+
+ builders:
+ - 'apex-fetch-logs'
+
- job-template:
name: 'apex-runner-cperf-{stream}'
@@ -442,6 +471,21 @@
kill-phase-on: NEVER
abort-all-job: true
git-revision: false
+ - multijob:
+ name: apex-fetch-logs
+ condition: ALWAYS
+ projects:
+ - name: 'apex-fetch-logs-{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: true
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
# Baremetal Deploy and Test
- job-template:
@@ -512,7 +556,19 @@
kill-phase-on: NEVER
abort-all-job: true
git-revision: false
-
+ - multijob:
+ name: apex-fetch-logs
+ condition: ALWAYS
+ projects:
+ - name: 'apex-fetch-logs'
+ current-parameters: true
+ predefined-parameters: |
+ GERRIT_BRANCH=$GERRIT_BRANCH
+ GERRIT_REFSPEC=
+ node-parameters: true
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
publishers:
- groovy-postbuild:
script:
@@ -1826,6 +1882,12 @@
- shell:
!include-raw: ./apex-deploy.sh
+- builder:
+ name: 'apex-fetch-logs'
+ builders:
+ - shell:
+ !include-raw: ./apex-fetch-logs.sh
+
#######################
# trigger macros
########################
diff --git a/jjb/apex/apex.yml.j2 b/jjb/apex/apex.yml.j2
index 25b9cd9d7..c72504452 100644
--- a/jjb/apex/apex.yml.j2
+++ b/jjb/apex/apex.yml.j2
@@ -3,6 +3,7 @@
name: 'apex'
project: 'apex'
jobs:
+ - 'apex-fetch-logs-{stream}'
- 'apex-runner-cperf-{stream}'
- 'apex-virtual-{stream}'
- 'apex-deploy-{platform}-{stream}'
@@ -76,6 +77,34 @@
- 'pike'
- 'queens'
- 'master'
+
+
+# Fetch Logs Job
+- job-template:
+ name: 'apex-fetch-logs-{stream}'
+
+ concurrent: true
+
+ disabled: false
+ scm:
+ - git-scm-gerrit
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ branch: '{branch}'
+ - apex-parameter:
+ gs-pathname: '{gs-pathname}'
+ # yamllint enable rule:line-length
+ properties:
+ - logrotate-default
+ - throttle:
+ max-per-node: 1
+ max-total: 10
+ option: 'project'
+
+ builders:
+ - 'apex-fetch-logs'
+
- job-template:
name: 'apex-runner-cperf-{stream}'
@@ -284,6 +313,21 @@
kill-phase-on: NEVER
abort-all-job: true
git-revision: false
+ - multijob:
+ name: apex-fetch-logs
+ condition: ALWAYS
+ projects:
+ - name: 'apex-fetch-logs-{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: true
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
# Baremetal Deploy and Test
- job-template:
@@ -354,7 +398,19 @@
kill-phase-on: NEVER
abort-all-job: true
git-revision: false
-
+ - multijob:
+ name: apex-fetch-logs
+ condition: ALWAYS
+ projects:
+ - name: 'apex-fetch-logs'
+ current-parameters: true
+ predefined-parameters: |
+ GERRIT_BRANCH=$GERRIT_BRANCH
+ GERRIT_REFSPEC=
+ node-parameters: true
+ kill-phase-on: NEVER
+ abort-all-job: true
+ git-revision: false
publishers:
- groovy-postbuild:
script:
@@ -997,6 +1053,12 @@
- shell:
!include-raw: ./apex-deploy.sh
+- builder:
+ name: 'apex-fetch-logs'
+ builders:
+ - shell:
+ !include-raw: ./apex-fetch-logs.sh
+
#######################
# trigger macros
########################
diff --git a/jjb/clover/clover-project.yml b/jjb/clover/clover-project.yml
index b31f3deb2..9744688a7 100644
--- a/jjb/clover/clover-project.yml
+++ b/jjb/clover/clover-project.yml
@@ -18,6 +18,10 @@
branch: '{stream}'
gs-pathname: ''
disabled: false
+ - fraser: &fraser
+ branch: 'stable/{stream}'
+ gs-pathname: '/{stream}'
+ disabled: false
- job-template:
name: 'clover-verify-{stream}'
@@ -32,7 +36,8 @@
- string:
name: GIT_BASE
default: https://gerrit.opnfv.org/gerrit/$PROJECT
- description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
+ description: "Used for overriding the GIT URL coming from Global Jenkins\
+ \ configuration in case if the stuff is done on none-LF HW."
# yamllint enable rule:line-length
- 'opnfv-build-ubuntu-defaults'
@@ -133,7 +138,8 @@
- string:
name: GIT_BASE
default: https://gerrit.opnfv.org/gerrit/$PROJECT
- description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
+ description: "Used for overriding the GIT URL coming from Global Jenkins\
+ \ configuration in case if the stuff is done on none-LF HW."
# yamllint enable rule:line-length
- node:
name: SLAVE_NAME
diff --git a/jjb/doctor/doctor.yml b/jjb/doctor/doctor.yml
index 8c04ffd53..eba22dc05 100644
--- a/jjb/doctor/doctor.yml
+++ b/jjb/doctor/doctor.yml
@@ -10,7 +10,7 @@
gs-pathname: ''
docker-tag: 'latest'
disabled: false
- - euphrates:
+ - fraser: &fraser
branch: 'stable/{stream}'
gs-pathname: '/{stream}'
docker-tag: 'stable'
diff --git a/jjb/ovn4nfv/ovn4nfv-project-jobs.yml b/jjb/ovn4nfv/ovn4nfv-project-jobs.yml
index 97d1baefd..0316ff70e 100644
--- a/jjb/ovn4nfv/ovn4nfv-project-jobs.yml
+++ b/jjb/ovn4nfv/ovn4nfv-project-jobs.yml
@@ -9,6 +9,10 @@
branch: '{stream}'
gs-pathname: ''
disabled: false
+ - fraser: &fraser
+ branch: 'stable/{stream}'
+ gs-pathname: '/{stream}'
+ disabled: false
- euphrates:
branch: 'stable/{stream}'
gs-pathname: '/{stream}'
diff --git a/jjb/pharos/check-jinja2.yml b/jjb/pharos/check-jinja2.yml
index 3ef2f04e5..e3f0df78a 100644
--- a/jjb/pharos/check-jinja2.yml
+++ b/jjb/pharos/check-jinja2.yml
@@ -15,6 +15,9 @@
- master:
branch: '{stream}'
disabled: false
+ - fraser: &fraser
+ branch: 'stable/{stream}'
+ disabled: false
- euphrates:
branch: 'stable/{stream}'
disabled: false
diff --git a/jjb/sfc/sfc-project-jobs.yml b/jjb/sfc/sfc-project-jobs.yml
index 82a2cfb5d..1fb4d990a 100644
--- a/jjb/sfc/sfc-project-jobs.yml
+++ b/jjb/sfc/sfc-project-jobs.yml
@@ -16,6 +16,10 @@
branch: '{stream}'
gs-pathname: ''
disabled: false
+ - fraser: &fraser
+ branch: 'stable/{stream}'
+ gs-pathname: '/{stream}'
+ disabled: false
- euphrates:
branch: 'stable/{stream}'
gs-pathname: '/{stream}'
diff --git a/jjb/snaps/snaps-verify-jobs.yml b/jjb/snaps/snaps-verify-jobs.yml
index a6c86c966..44a1fbf67 100644
--- a/jjb/snaps/snaps-verify-jobs.yml
+++ b/jjb/snaps/snaps-verify-jobs.yml
@@ -16,6 +16,10 @@
branch: '{stream}'
gs-pathname: ''
disabled: true
+ - fraser: &fraser
+ branch: 'stable/{stream}'
+ gs-pathname: '/{stream}'
+ disabled: false
- job-template:
name: 'snaps-verify-{stream}'
diff --git a/jjb/yardstick/yardstick-project-jobs.yml b/jjb/yardstick/yardstick-project-jobs.yml
index c03666388..63ce2986f 100644
--- a/jjb/yardstick/yardstick-project-jobs.yml
+++ b/jjb/yardstick/yardstick-project-jobs.yml
@@ -165,9 +165,17 @@
set -o pipefail
sudo apt-get -y autoremove
- sudo apt-get install -y build-essential python-dev python3-dev
+ sudo apt-get install -y build-essential python-dev python3-dev rabbitmq-server
sudo apt-get -y clean && sudo apt-get -y autoremove
+ echo "Configure RabbitMQ service"
+ service rabbitmq-server restart
+ rabbitmqctl start_app
+ if [ -z "$(rabbitmqctl list_users | grep yardstick)" ]; then
+ rabbitmqctl add_user yardstick yardstick
+ rabbitmqctl set_permissions yardstick ".*" ".*" ".*"
+ fi
+
echo "Running functional tests in Python 2.7 ..."
cd $WORKSPACE
tox -efunctional
@@ -181,9 +189,17 @@
set -o pipefail
sudo apt-get -y autoremove
- sudo apt-get install -y build-essential python-dev python3-dev
+ sudo apt-get install -y build-essential python-dev python3-dev rabbitmq-server
sudo apt-get -y clean && sudo apt-get -y autoremove
+ echo "Configure RabbitMQ service"
+ service rabbitmq-server restart
+ rabbitmqctl start_app
+ if [ -z "$(rabbitmqctl list_users | grep yardstick)" ]; then
+ rabbitmqctl add_user yardstick yardstick
+ rabbitmqctl set_permissions yardstick ".*" ".*" ".*"
+ fi
+
echo "Running functional tests in Python 3 ..."
cd $WORKSPACE
tox -efunctional-py3