diff options
-rw-r--r-- | docs/etc/conf.py | 13 | ||||
-rw-r--r-- | jjb/apex/apex.yml | 6 | ||||
-rw-r--r-- | jjb/fuel/fuel.yml | 2 | ||||
-rw-r--r-- | jjb/functest/functest-docker.sh | 41 | ||||
-rw-r--r-- | jjb/genesis/genesis-opensteak.yml | 219 | ||||
-rw-r--r-- | jjb/qtip/qtip.yml | 42 | ||||
-rw-r--r-- | jjb/yardstick/yardstick.yml | 66 | ||||
-rwxr-xr-x | utils/docu-build-new.sh | 19 | ||||
-rwxr-xr-x | utils/fetch_os_creds.sh | 10 |
9 files changed, 125 insertions, 293 deletions
diff --git a/docs/etc/conf.py b/docs/etc/conf.py index 486983f19..671965378 100644 --- a/docs/etc/conf.py +++ b/docs/etc/conf.py @@ -2,16 +2,9 @@ import datetime import sys import os -try: - __import__('imp').find_module('sphinx.ext.numfig') - extensions = ['sphinx.ext.numfig'] -except ImportError: - # 'pip install sphinx_numfig' - extensions = ['sphinx_numfig'] +needs_sphinx = '1.3' -# numfig: -number_figures = True -figure_caption_prefix = "Fig." +numfig = True source_suffix = '.rst' master_doc = 'index' @@ -31,4 +24,4 @@ latex_elements = { project = u'Copper: Virtual Infrastructure Deployment Policies' copyright = u'%s, OPNFV' % datetime.date.today().year version = u'1.0.0' -release = u'1.0.0'
\ No newline at end of file +release = u'1.0.0' diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml index 30dfcda0c..376515b95 100644 --- a/jjb/apex/apex.yml +++ b/jjb/apex/apex.yml @@ -333,8 +333,10 @@ fi # update / install the new rpm - if rpm -q opnfv-apex; then - sudo yum update -y $RPM_INSTALL_PATH; + if rpm -q opnfv-apex > /dev/null; then + if sudo yum update -y $RPM_INSTALL_PATH | grep "does not update installed package"; then + sudo yum downgrade -y $RPM_INSTALL_PATH; + fi else sudo yum install -y $RPM_INSTALL_PATH; fi diff --git a/jjb/fuel/fuel.yml b/jjb/fuel/fuel.yml index b99bcc0d4..1f53454e3 100644 --- a/jjb/fuel/fuel.yml +++ b/jjb/fuel/fuel.yml @@ -336,7 +336,7 @@ failure-threshold: 'never' unstable-threshold: 'FAILURE' - trigger-builds: - - project: 'yardstick-fuel-{stream}' + - project: 'yardstick-fuel-lf-{stream}' block: true block-thresholds: build-step-failure-threshold: 'never' diff --git a/jjb/functest/functest-docker.sh b/jjb/functest/functest-docker.sh index 883cb1b44..c73bcf99a 100644 --- a/jjb/functest/functest-docker.sh +++ b/jjb/functest/functest-docker.sh @@ -10,8 +10,13 @@ echo DOCKER_IMAGE_NAME="opnfv/functest" + # Get tag version -DOCKER_TAG=$(../../utils/calculate_version.sh -t docker -n $DOCKER_IMAGE_NAME) +cd $WORKSPACE +git clone https://gerrit.opnfv.org/gerrit/releng + +DOCKER_TAG=$($WORKSPACE/releng/utils/calculate_version.sh -t docker \ + -n $DOCKER_IMAGE_NAME) ret_val=$? if [ $ret_val -ne 0 ]; then @@ -21,20 +26,33 @@ else echo "Tag version to be build and pushed: $DOCKER_TAG" fi -# Remove previous running containers -echo "Removing existing $DOCKER_IMAGE_NAME containers..." -docker ps | grep $DOCKER_IMAGE_NAME | awk '{{print $1}}' | xargs docker stop &>/dev/null -docker ps -a | grep $DOCKER_IMAGE_NAME | awk '{{print $1}}' | xargs docker rm &>/dev/null -# Remove existing images -echo "Removing existing $DOCKER_IMAGE_NAME images..." -docker images | grep $DOCKER_IMAGE_NAME | awk '{{print $3}}' | xargs docker rmi &>/dev/null +# Remove previous running containers if exist +if [[ ! -z $(docker ps -a | grep $DOCKER_IMAGE_NAME) ]]; then + echo "Removing existing $DOCKER_IMAGE_NAME containers..." + docker ps | grep $DOCKER_IMAGE_NAME | awk '{{print $1}}' | xargs docker stop + docker ps -a | grep $DOCKER_IMAGE_NAME | awk '{{print $1}}' | xargs docker rm +fi + + +# Remove existing images if exist +if [[ ! -z $(docker images | grep $DOCKER_IMAGE_NAME) ]]; then + echo "Docker images to remove:" + docker images | head -1 && docker images | grep $DOCKER_IMAGE_NAME + image_tags=($(docker images | grep $DOCKER_IMAGE_NAME | awk '{{print $2}}')) + for tag in "${{image_tags[@]}}"; do + echo "Removing docker image $DOCKER_IMAGE_NAME:$tag..." + docker rmi $DOCKER_IMAGE_NAME:$tag + done +fi # Start the build -echo "Starting image build of $DOCKER_IMAGE_NAME:$DOCKER_TAG..." -cd $WORKSPACE/docker/ +echo "Building docker image: $DOCKER_IMAGE_NAME:$DOCKER_TAG..." +cd $WORKSPACE/docker docker build -t $DOCKER_IMAGE_NAME:$DOCKER_TAG . +echo "Creating tag 'latest'..." +docker tag $DOCKER_IMAGE_NAME:$DOCKER_TAG $DOCKER_IMAGE_NAME:latest # list the images echo "Available images are:" @@ -47,4 +65,7 @@ if [ "$PUSH_IMAGE" == "true" ]; then echo # Push to the Dockerhub repository docker push $DOCKER_IMAGE_NAME:$DOCKER_TAG + + echo "Updating $DOCKER_IMAGE_NAME:latest to the docker registry..." + docker push $DOCKER_IMAGE_NAME:latest fi diff --git a/jjb/genesis/genesis-opensteak.yml b/jjb/genesis/genesis-opensteak.yml deleted file mode 100644 index f2322354f..000000000 --- a/jjb/genesis/genesis-opensteak.yml +++ /dev/null @@ -1,219 +0,0 @@ -# this is the job configuration for bgs -- project: - - name: genesis-opensteak - - installer: - - opensteak - jobs: - - 'genesis-opensteak-verify' - - 'genesis-opensteak-merge' - - 'genesis-opensteak-daily-{stream}' - - # stream: branch with - in place of / (eg. stable-helium) - # branch: branch (eg. stable/helium) - stream: - - master: - branch: 'master' - - project: 'genesis' - -######################## -# job templates -######################## - -- job-template: - name: 'genesis-opensteak-verify' - - project-type: freestyle - - node: ericsson-build - - logrotate: - daysToKeep: 30 - numToKeep: 10 - artifactDaysToKeep: -1 - artifactNumToKeep: -1 - - parameters: - - string: - name: BUILD_DIRECTORY - default: $WORKSPACE/build_output - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/genesis - - project-parameter: - project: '{project}' - - gerrit-parameter: - branch: 'master' - - scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' - - wrappers: - - ssh-agent-credentials: - user: '{ssh-credentials}' - - triggers: - - gerrit: - trigger-on: - - patchset-created-event: - exclude-drafts: 'false' - exclude-trivial-rebase: 'false' - exclude-no-code-change: 'false' - - draft-published-event - - comment-added-contains-event: - comment-contains-value: 'recheck' - - comment-added-contains-event: - comment-contains-value: 'reverify' - projects: - - project-compare-type: 'ANT' - project-pattern: 'genesis' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/master' - file-paths: - - compare-type: ANT - pattern: 'common/**' - - compare-type: ANT - pattern: 'opensteak/**' - - - builders: - - 'opensteak-verify' - -- job-template: - name: 'genesis-opensteak-merge' - - # builder-merge job to run JJB update - # - # This job's purpose is to update all the JJB - - project-type: freestyle - - node: ericsson-build - - logrotate: - daysToKeep: 30 - numToKeep: 40 - artifactDaysToKeep: -1 - artifactNumToKeep: 5 - - parameters: - - string: - name: BUILD_DIRECTORY - default: $WORKSPACE/build_output - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/genesis - - project-parameter: - project: '{project}' - - gerrit-parameter: - branch: 'master' - - scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' - - wrappers: - - ssh-agent-credentials: - user: '{ssh-credentials}' - - triggers: - - gerrit: - trigger-on: - - change-merged-event - - comment-added-contains-event: - comment-contains-value: 'remerge' - projects: - - project-compare-type: 'ANT' - project-pattern: 'genesis' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/master' - file-paths: - - compare-type: ANT - pattern: 'common/**' - - compare-type: ANT - pattern: 'opensteak/**' - - builders: - - 'opensteak-merge' - -- job-template: - name: 'genesis-opensteak-daily-{stream}' - - project-type: freestyle - - node: ericsson-build - - 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: GS_URL - default: 'artifacts.opnfv.org/genesis/opensteak' - description: "URL to Google Storage." - - string: - name: INSTALLER - default: 'opensteak' - description: "Installer to use." - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/genesis - - string: - name: GERRIT_BRANCH - default: origin/master - description: "Branch to build, deploy and test." - - string: - name: GERRIT_REFSPEC - default: refs/heads/master - description: "Refspec to retrieve." - - scm: - - git: - skip-tag: true - url: $GIT_BASE - branches: - - $GERRIT_BRANCH - refspec: $GERRIT_REFSPEC - - triggers: - - pollscm: '@midnight' - - logrotate: - daysToKeep: 30 - numToKeep: 10 - artifactDaysToKeep: -1 - artifactNumToKeep: -1 - - builders: - - 'opensteak-daily-master' - -- builder: - name: opensteak-verify - builders: - - shell: | - #!/bin/bash - echo "Hello World!" - -- builder: - name: opensteak-merge - builders: - - shell: | - #!/bin/bash - echo "Hello World!" - -- builder: - name: opensteak-daily-master - builders: - - shell: | - #!/bin/bash - echo "Hello World!" diff --git a/jjb/qtip/qtip.yml b/jjb/qtip/qtip.yml index d777221c6..e87408885 100644 --- a/jjb/qtip/qtip.yml +++ b/jjb/qtip/qtip.yml @@ -5,8 +5,8 @@ - 'qtip-daily-{stream}' - 'qtip-merge' - 'qtip-verify' - - 'qtip-dhrystone-VM_vs_Baremetal-{pod}' - - 'qtip_dhrystone-BM_vs_BM-{pod}' + - 'qtip-dhrystone-serial-{pod}' + - 'qtip-ssl-parallel-{pod}' # stream: branch with - in place of / (eg. stable-helium) @@ -15,9 +15,9 @@ pod: - dell-build: - node: 'dell-build' - installer_type: 'foreman' - installer_ip: '172.18.0.12' + node: 'dell-us-testing-bm-1' + installer_type: 'fuel' + installer_ip: '10.20.0.2' stream: @@ -192,7 +192,7 @@ echo "merge logic goes here" - job-template: - name: 'qtip-dhrystone-VM_vs_Baremetal-{pod}' + name: 'qtip-dhrystone-serial-{pod}' project-type: freestyle @@ -230,13 +230,13 @@ builders: - 'qtip-fetch-os-cred' - - 'qtip-dhrystone-VM_vs_BM' + - 'qtip-dhrystone-serial' triggers: - - timed: '0 13 * * *' + - timed: '0 20 * * *' - job-template: - name: 'qtip_dhrystone-BM_vs_BM-{pod}' + name: 'qtip-ssl-parallel-{pod}' project-type: freestyle @@ -275,7 +275,7 @@ builders: - 'qtip-fetch-os-cred' - - 'qtip-dhrystone-BM_vs_BM' + - 'qtip-ssl-parallel' triggers: - timed: "@midnight" @@ -284,47 +284,39 @@ #biuilder macros ########################### - builder: - name: qtip-dhrystone-VM_vs_BM + name: qtip-dhrystone-serial builders: - shell: | #! /bin/bash - - - if [[ ! -f $HOME/opnfv-openrc.sh]]; then + if [[ ! -f $HOME/opnfv-openrc.sh ]]; then echo "Unable to access file $HOME/opnfv-openrc.sh" exit 1 fi source $HOME/opnfv-openrc.sh cd $WORKSPACE - - echo "Running QTIP dhrystone with First Test case" - ./QTIP.sh First dhrystone + python qtip.py -s compute -b dhrystone_serial.yaml - builder: - name: qtip-dhrystone-BM_vs_BM + name: qtip-ssl-parallel builders: - shell: | #!/bin/bash - - - if [[ ! -f $HOME/opnfv-openrc.sh]]; then + if [[ ! -f $HOME/opnfv-openrc.sh ]]; then echo "Unable to access file $HOME/opnfv-openrc.sh" exit 1 fi source $HOME/opnfv-openrc.sh cd $WORKSPACE - - echo "Running QTIP dhrystone with Second Test case" - ./QTIP.sh Second dhrystone + python qtip.py -s compute -b ssl_parallel.yaml - builder: name: qtip-fetch-os-cred builders: - - shell: | + - shell: !include-raw ../../utils/fetch_os_creds.sh diff --git a/jjb/yardstick/yardstick.yml b/jjb/yardstick/yardstick.yml index 50369ce73..60344fa11 100644 --- a/jjb/yardstick/yardstick.yml +++ b/jjb/yardstick/yardstick.yml @@ -1,18 +1,23 @@ - project: name: yardstick - installer: - - fuel: + project: 'yardstick' + + pod: + - lf: node: 'opnfv-jump-2' installer_type: 'fuel' installer_ip: '10.20.0.2' - - foreman: - node: 'opnfv-jump-2' - installer_type: 'foreman' - installer_ip: '172.30.10.73' + - ericsson: + node: 'yardstick-pod' + installer_type: 'fuel' + installer_ip: '10.20.0.2' + + installer: + - fuel jobs: - - 'yardstick-{installer}-{stream}' + - 'yardstick-{installer}-{pod}-{stream}' - 'yardstick-merge' - 'yardstick-verify' @@ -21,11 +26,6 @@ stream: - master: branch: 'master' - - stable-arno: - branch: 'stable/arno' - gs-pathname: '/arno' - - project: 'yardstick' - job-template: name: 'yardstick-verify' @@ -160,7 +160,7 @@ deactivate - job-template: - name: 'yardstick-{installer}-{stream}' + name: 'yardstick-{installer}-{pod}-{stream}' project-type: freestyle @@ -171,6 +171,11 @@ parameters: - project-parameter: project: '{project}' + - '{pod}-parameters' + - string: + name: POD_NAME + default: '{pod}' + description: "POD where the job runs" - string: name: INSTALLER_TYPE default: '{installer_type}' @@ -192,6 +197,9 @@ artifactDaysToKeep: -1 artifactNumToKeep: -1 + triggers: + - 'yardstick-trigger-{pod}' + builders: - 'yardstick-fetch-os-creds' - 'yardstick-daily' @@ -237,3 +245,35 @@ builders: - shell: !include-raw ../../utils/fetch_os_creds.sh + +######################## +# parameter macros +######################## +- parameter: + name: 'ericsson-parameters' + parameters: + - 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." + +- parameter: + name: 'lf-parameters' + parameters: + - string: + name: GIT_BASE + default: ssh://gerrit.opnfv.org:29418/$PROJECT + description: "URL for LF POD" + +######################## +# trigger macros +######################## +- trigger: + name: 'yardstick-trigger-ericsson' + triggers: + - timed: '@midnight' + +- trigger: + name: 'yardstick-trigger-lf' + triggers: + - timed: '#@midnight' diff --git a/utils/docu-build-new.sh b/utils/docu-build-new.sh index 00d046479..67a62e381 100755 --- a/utils/docu-build-new.sh +++ b/utils/docu-build-new.sh @@ -29,17 +29,22 @@ while read -d $'\n'; do done < <(find docs/ -name 'index.rst' -printf '%h\n' | sort -u ) for dir in "${{directories[@]}}"; do + _name="${{dir##*/}}" + _build="${{dir}}/build" + _output="docs/output/${{_name}}" echo - echo "#############################" - echo "Building DOCS in ${{dir##*/}}" - echo "#############################" + echo "#################${{_name//?/#}}" + echo "Building DOCS in ${{_name}}" + echo "#################${{_name//?/#}}" echo - if [[ ! -d docs/output/"${{dir##*/}}/" ]]; then - mkdir -p docs/output/"${{dir##*/}}/" - fi + mkdir -p "${{_output}}" + + sphinx-build -b html -E -c docs/etc "${{dir}}" "${{_output}}" - sphinx-build -b html -E -c docs/etc/ ""$dir"/" docs/output/"${{dir##*/}}/" + sphinx-build -b latex -E -c docs/etc "${{dir}}" "${{_build}}" + make -C "${{_build}}" LATEXOPTS='--interaction=nonstopmode' all-pdf + mv "${{_build}}"/*.pdf "${{_output}}" done diff --git a/utils/fetch_os_creds.sh b/utils/fetch_os_creds.sh index cefc85761..7a5f8121a 100755 --- a/utils/fetch_os_creds.sh +++ b/utils/fetch_os_creds.sh @@ -126,14 +126,12 @@ elif [ "$installer_type" == "foreman" ]; then | grep $admin_ip | sed 's/ /\n/g' | grep ^http | head -1) &> /dev/null elif [ "$installer_type" == "compass" ]; then - #ip_compass="10.1.0.12" verify_connectivity $installer_ip - - # controller_ip='10.1.0.222' - controller_ip=$(sshpass -p'root' ssh 2>/dev/null -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@10.1.0.12 \ - 'mysql -ucompass -pcompass -Dcompass -e"select package_config from cluster;"' \ - | awk -F"," '{for(i=1;i<NF;i++)if($i~/\"ha_proxy\": {\"vip\":/)print $i}' \ + controller_ip=$(sshpass -p'root' ssh 2>/dev/null $ssh_options root@${installer_ip} \ + 'mysql -ucompass -pcompass -Dcompass -e"select * from cluster;"' \ + | awk -F"," '{for(i=1;i<NF;i++)if($i~/\"host1\"/) {print $(i+1);break;}}' \ | grep -oP "\d+.\d+.\d+.\d+") + if [ -z $controller_ip ]; then error "The controller $controller_ip is not up. Please check that the POD is correctly deployed." fi |