diff options
-rw-r--r-- | jjb/apex/apex.yml | 2 | ||||
-rw-r--r-- | jjb/apex/apex.yml.j2 | 2 | ||||
-rw-r--r-- | jjb/armband/armband-ci-jobs.yml | 13 | ||||
-rw-r--r-- | jjb/armband/armband-verify-jobs.yml | 2 | ||||
-rw-r--r-- | jjb/ci_gate_security/anteater-security-audit.sh | 2 | ||||
-rw-r--r-- | jjb/ci_gate_security/opnfv-ci-gate-security.yml | 2 | ||||
-rw-r--r-- | jjb/fuel/fuel-daily-jobs.yml | 14 | ||||
-rw-r--r-- | jjb/fuel/fuel-project-jobs.yml | 2 | ||||
-rw-r--r-- | jjb/fuel/fuel-verify-jobs.yml | 2 | ||||
-rw-r--r-- | jjb/fuel/fuel-weekly-jobs.yml | 2 | ||||
-rwxr-xr-x | jjb/functest/functest-alpine.sh | 6 | ||||
-rw-r--r-- | jjb/functest/functest-daily-jobs.yml | 1 | ||||
-rw-r--r-- | jjb/qtip/qtip-validate-jobs.yml | 13 | ||||
-rw-r--r-- | jjb/releng/opnfv-docker.yml | 40 | ||||
-rw-r--r-- | utils/test/opts/one_click_deploy.py | 67 | ||||
-rw-r--r-- | utils/test/opts/watchdog.sh (renamed from utils/test/testapi/tools/watchdog/docker_watch.sh) | 17 | ||||
-rw-r--r-- | utils/test/testapi/deployment/deploy.py | 40 | ||||
-rw-r--r-- | utils/test/testapi/deployment/docker-compose.yml.template | 15 | ||||
-rw-r--r-- | utils/test/testapi/opts/deploy.py | 55 |
19 files changed, 212 insertions, 85 deletions
diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml index 4162c9e70..bed67f416 100644 --- a/jjb/apex/apex.yml +++ b/jjb/apex/apex.yml @@ -1300,7 +1300,7 @@ - 'apex-run.*' triggers: - - timed: '0 12 * * *' + - timed: '0 1 * * *' builders: - description-setter: diff --git a/jjb/apex/apex.yml.j2 b/jjb/apex/apex.yml.j2 index a8fc70f0c..3c36e8f62 100644 --- a/jjb/apex/apex.yml.j2 +++ b/jjb/apex/apex.yml.j2 @@ -1170,7 +1170,7 @@ - 'apex-run.*' triggers: - - timed: '0 12 * * *' + - timed: '0 1 * * *' builders: - description-setter: diff --git a/jjb/armband/armband-ci-jobs.yml b/jjb/armband/armband-ci-jobs.yml index 23bb64119..4c2656067 100644 --- a/jjb/armband/armband-ci-jobs.yml +++ b/jjb/armband/armband-ci-jobs.yml @@ -16,7 +16,7 @@ stream: euphrates branch: 'stable/{stream}' gs-pathname: '/{stream}' - disabled: true + disabled: false # ------------------------------- # POD, INSTALLER, AND BRANCH MAPPING # ------------------------------- @@ -136,7 +136,8 @@ failure-threshold: 'never' unstable-threshold: 'FAILURE' # 1.dovetail only master, based on D release - # 2.here the stream means the SUT stream, dovetail stream is defined in its own job + # 2.here the stream means the SUT stream, + # dovetail stream is defined in its own job # 3.only proposed_tests testsuite here(refstack, ha, ipv6, bgpvpn) # 4.not used for release criteria or compliance, # only to debug the dovetail tool bugs with arm pods @@ -215,7 +216,7 @@ - trigger: name: 'fuel-os-nosdn-nofeature-ha-armband-baremetal-master-trigger' triggers: - - timed: '0 1 * * *' + - timed: '0 16 * * 2,4,6' - trigger: name: 'fuel-os-nosdn-nofeature-noha-armband-baremetal-master-trigger' triggers: @@ -223,14 +224,14 @@ - trigger: name: 'fuel-os-odl-nofeature-ha-armband-baremetal-master-trigger' triggers: - - timed: '0 16 * * *' + - timed: '0 16 * * 1,3,5,7' # --------------------------------------------------------------------- # Enea Armband CI Baremetal Triggers running against euphrates branch # --------------------------------------------------------------------- - trigger: name: 'fuel-os-nosdn-nofeature-ha-armband-baremetal-euphrates-trigger' triggers: - - timed: '' + - timed: '0 1 * * 2,4,6' - trigger: name: 'fuel-os-nosdn-nofeature-noha-armband-baremetal-euphrates-trigger' triggers: @@ -238,7 +239,7 @@ - trigger: name: 'fuel-os-odl-nofeature-ha-armband-baremetal-euphrates-trigger' triggers: - - timed: '' + - timed: '0 1 * * 1,3,5,7' # -------------------------------------------------------------- # Enea Armband CI Virtual Triggers running against master branch # -------------------------------------------------------------- diff --git a/jjb/armband/armband-verify-jobs.yml b/jjb/armband/armband-verify-jobs.yml index 9e8691804..04ade724a 100644 --- a/jjb/armband/armband-verify-jobs.yml +++ b/jjb/armband/armband-verify-jobs.yml @@ -16,7 +16,7 @@ - euphrates: branch: 'stable/{stream}' gs-pathname: '/{stream}' - disabled: true + disabled: false ##################################### # patch verification phases ##################################### diff --git a/jjb/ci_gate_security/anteater-security-audit.sh b/jjb/ci_gate_security/anteater-security-audit.sh index 35f9354e0..8a170b044 100644 --- a/jjb/ci_gate_security/anteater-security-audit.sh +++ b/jjb/ci_gate_security/anteater-security-audit.sh @@ -2,6 +2,8 @@ cd $WORKSPACE REPORTDIR='.reports' mkdir -p $REPORTDIR +# Ensure any user can read the reports directory +chmod 777 $REPORTDIR echo "Generating patchset file to list changed files" git diff HEAD^1 --name-only | sed "s#^#/home/opnfv/anteater/$PROJECT/#" > $WORKSPACE/patchset echo "Changed files are" diff --git a/jjb/ci_gate_security/opnfv-ci-gate-security.yml b/jjb/ci_gate_security/opnfv-ci-gate-security.yml index 33179537c..e09339a4b 100644 --- a/jjb/ci_gate_security/opnfv-ci-gate-security.yml +++ b/jjb/ci_gate_security/opnfv-ci-gate-security.yml @@ -50,7 +50,7 @@ parameters: - label: name: SLAVE_LABEL - default: 'ericsson-build3' + default: 'opnfv-build' description: 'Slave label on Jenkins' - project-parameter: project: $GERRIT_PROJECT diff --git a/jjb/fuel/fuel-daily-jobs.yml b/jjb/fuel/fuel-daily-jobs.yml index 4bdfa5b01..baf44c5d2 100644 --- a/jjb/fuel/fuel-daily-jobs.yml +++ b/jjb/fuel/fuel-daily-jobs.yml @@ -18,7 +18,7 @@ euphrates: &euphrates stream: euphrates branch: 'stable/{stream}' - disabled: true + disabled: false gs-pathname: '/{stream}' danube: &danube stream: danube @@ -358,11 +358,11 @@ - trigger: name: 'fuel-os-nosdn-nofeature-ha-baremetal-daily-euphrates-trigger' triggers: - - timed: '' # '0 20 * * *' + - timed: '0 20 * * *' - trigger: name: 'fuel-os-odl-nofeature-ha-baremetal-daily-euphrates-trigger' triggers: - - timed: '' # '0 2 * * *' + - timed: '0 2 * * *' - trigger: name: 'fuel-os-onos-sfc-ha-baremetal-daily-euphrates-trigger' triggers: @@ -378,7 +378,7 @@ - trigger: name: 'fuel-os-nosdn-ovs-ha-baremetal-daily-euphrates-trigger' triggers: - - timed: '' # '0 20 * * *' + - timed: '0 20 * * *' - trigger: name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-baremetal-daily-euphrates-trigger' triggers: @@ -527,11 +527,11 @@ - trigger: name: 'fuel-os-nosdn-nofeature-noha-virtual-daily-euphrates-trigger' triggers: - - timed: '' # '0 13 * * *' + - timed: '0 13 * * *' - trigger: name: 'fuel-os-odl-nofeature-noha-virtual-daily-euphrates-trigger' triggers: - - timed: '' # '0 18 * * *' + - timed: '0 18 * * *' - trigger: name: 'fuel-os-onos-sfc-noha-virtual-daily-euphrates-trigger' triggers: @@ -547,7 +547,7 @@ - trigger: name: 'fuel-os-nosdn-ovs-noha-virtual-daily-euphrates-trigger' triggers: - - timed: '' # '0 9 * * *' + - timed: '0 9 * * *' - trigger: name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-virtual-daily-euphrates-trigger' triggers: diff --git a/jjb/fuel/fuel-project-jobs.yml b/jjb/fuel/fuel-project-jobs.yml index cfcbf3695..09342b500 100644 --- a/jjb/fuel/fuel-project-jobs.yml +++ b/jjb/fuel/fuel-project-jobs.yml @@ -16,7 +16,7 @@ - euphrates: branch: 'stable/{stream}' gs-pathname: '/{stream}' - disabled: true + disabled: false jobs: - 'fuel-deploy-generic-daily-{stream}' diff --git a/jjb/fuel/fuel-verify-jobs.yml b/jjb/fuel/fuel-verify-jobs.yml index 45197fc4e..d605e308a 100644 --- a/jjb/fuel/fuel-verify-jobs.yml +++ b/jjb/fuel/fuel-verify-jobs.yml @@ -15,7 +15,7 @@ - euphrates: branch: 'stable/{stream}' gs-pathname: '/{stream}' - disabled: true + disabled: false ##################################### # patch verification phases ##################################### diff --git a/jjb/fuel/fuel-weekly-jobs.yml b/jjb/fuel/fuel-weekly-jobs.yml index e1563ea38..c8a8c17e8 100644 --- a/jjb/fuel/fuel-weekly-jobs.yml +++ b/jjb/fuel/fuel-weekly-jobs.yml @@ -18,7 +18,7 @@ euphrates: &euphrates stream: euphrates branch: 'stable/{stream}' - disabled: true + disabled: false gs-pathname: '/{stream}' #-------------------------------- # POD, INSTALLER, AND BRANCH MAPPING diff --git a/jjb/functest/functest-alpine.sh b/jjb/functest/functest-alpine.sh index 81aee0d9c..c9484304f 100755 --- a/jjb/functest/functest-alpine.sh +++ b/jjb/functest/functest-alpine.sh @@ -86,6 +86,8 @@ else fi cmd_opt='prepare_env start && run_tests -r -t all' +ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value" +echo 0 > ${ret_val_file} for tier in ${tiers[@]}; do FUNCTEST_IMAGE=opnfv/functest-${tier} @@ -94,4 +96,8 @@ for tier in ${tiers[@]}; do cmd="docker run --privileged=true ${envs} ${volumes} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'" echo "Running Functest tier '${tier}'. CMD: ${cmd}" eval ${cmd} + ret_value=$? + if [ ${ret_value} != 0 ]; then + echo ${ret_value} > ${ret_val_file} + fi done diff --git a/jjb/functest/functest-daily-jobs.yml b/jjb/functest/functest-daily-jobs.yml index 0d504f3d8..ea39de44b 100644 --- a/jjb/functest/functest-daily-jobs.yml +++ b/jjb/functest/functest-daily-jobs.yml @@ -380,6 +380,7 @@ - 'functest-cleanup' - 'functest-daily' - 'functest-store-results' + - 'functest-exit' - builder: name: functest-arm-daily-builder diff --git a/jjb/qtip/qtip-validate-jobs.yml b/jjb/qtip/qtip-validate-jobs.yml index b63782b8c..75c475abe 100644 --- a/jjb/qtip/qtip-validate-jobs.yml +++ b/jjb/qtip/qtip-validate-jobs.yml @@ -14,6 +14,11 @@ branch: '{stream}' gs-pathname: '' docker-tag: latest + euphrates: &euphrates + stream: euphrates + branch: 'stable/{stream}' + gs-pathname: '{stream}' + docker-tag: 'stable' # ------------------------------- # JOB VARIABLES @@ -27,6 +32,14 @@ installer: apex pod: zte-pod4 <<: *master + - compute: + installer: apex + pod: zte-pod4 + <<: *euphrates + - storage: + installer: apex + pod: zte-pod4 + <<: *euphrates # ------------------------------- # JOB LIST diff --git a/jjb/releng/opnfv-docker.yml b/jjb/releng/opnfv-docker.yml index 3b506bb54..2b8fd2726 100644 --- a/jjb/releng/opnfv-docker.yml +++ b/jjb/releng/opnfv-docker.yml @@ -118,6 +118,46 @@ project: 'functest' <<: *euphrates <<: *functest-receivers + - 'functest-core': + project: 'functest' + dockerdir: 'docker/core' + <<: *euphrates + <<: *functest-receivers + - 'functest-healthcheck': + project: 'functest' + dockerdir: 'docker/healthcheck' + <<: *euphrates + <<: *functest-receivers + - 'functest-smoke': + project: 'functest' + dockerdir: 'docker/smoke' + <<: *euphrates + <<: *functest-receivers + - 'functest-features': + project: 'functest' + dockerdir: 'docker/features' + <<: *euphrates + <<: *functest-receivers + - 'functest-components': + project: 'functest' + dockerdir: 'docker/components' + <<: *euphrates + <<: *functest-receivers + - 'functest-vnf': + project: 'functest' + dockerdir: 'docker/vnf' + <<: *euphrates + <<: *functest-receivers + - 'functest-parser': + project: 'functest' + dockerdir: 'docker/parser' + <<: *euphrates + <<: *functest-receivers + - 'functest-restapi': + project: 'functest' + dockerdir: 'docker/restapi' + <<: *euphrates + <<: *functest-receivers - 'storperf-master': project: 'storperf' dockerdir: 'docker/storperf-master' diff --git a/utils/test/opts/one_click_deploy.py b/utils/test/opts/one_click_deploy.py new file mode 100644 index 000000000..074827021 --- /dev/null +++ b/utils/test/opts/one_click_deploy.py @@ -0,0 +1,67 @@ +import argparse +import os + +from jinja2 import Environment + +DOCKER_COMPOSE_FILE = './docker-compose.yml' +DOCKER_COMPOSE_TEMPLATE = """ +version: '2' +services: + mongo: + image: mongo:3.2.1 + container_name: opnfv-mongo + testapi: + image: opnfv/testapi:latest + container_name: opnfv-testapi + environment: + - mongodb_url=mongodb://mongo:27017/ + - base_url={{ vars.base_url }} + ports: + - "{{ vars.testapi_port }}:8000" + links: + - mongo + reporting: + image: opnfv/reporting:latest + container_name: opnfv-reporting + ports: + - "{{ vars.reporting_port }}:8000" +""" + + +def render_docker_compose(testapi_port, reporting_port, testapi_base_url): + vars = { + "testapi_port": testapi_port, + "reporting_port": reporting_port, + "base_url": testapi_base_url, + } + yml = Environment().from_string(DOCKER_COMPOSE_TEMPLATE).render(vars=vars) + with open(DOCKER_COMPOSE_FILE, 'w') as f: + f.write(yml) + f.close() + + +def main(args): + render_docker_compose(args.testapi_port, + args.reporting_port, + args.testapi_base_url) + os.system('docker-compose -f {} up -d'.format(DOCKER_COMPOSE_FILE)) + + +if __name__ == '__main__': + parser = argparse.ArgumentParser(description='Backup MongoDBs') + parser.add_argument('-tp', '--testapi-port', + type=int, + required=False, + default=8082, + help='testapi exposed port') + parser.add_argument('-tl', '--testapi-base-url', + type=str, + required=True, + help='testapi exposed base-url') + parser.add_argument('-rp', '--reporting-port', + type=int, + required=False, + default=8084, + help='reporting exposed port') + + main(parser.parse_args()) diff --git a/utils/test/testapi/tools/watchdog/docker_watch.sh b/utils/test/opts/watchdog.sh index f1d8946b6..51868d709 100644 --- a/utils/test/testapi/tools/watchdog/docker_watch.sh +++ b/utils/test/opts/watchdog.sh @@ -27,7 +27,7 @@ declare -A urls=( ["testapi"]="http://testresults.opnfv.org/test/" \ ### Functions related to checking. function is_deploying() { - xml=$(curl -m10 "https://build.opnfv.org/ci/job/${1}-automate-master/lastBuild/api/xml?depth=1") + xml=$(curl -m10 "https://build.opnfv.org/ci/job/${1}-automate-docker-deploy-master/lastBuild/api/xml?depth=1") building=$(grep -oPm1 "(?<=<building>)[^<]+" <<< "$xml") if [[ $building == "false" ]] then @@ -64,12 +64,11 @@ function check_modules() { failed_modules=() for module in "${modules[@]}" do - if is_deploying $module; then - continue - fi if ! check_connectivity $module "${urls[$module]}"; then - echo -e "$module failed" - failed_modules+=($module) + if ! is_deploying $module; then + echo -e "$module failed" + failed_modules+=($module) + fi fi done if [ ! -z "$failed_modules" ]; then @@ -114,13 +113,11 @@ function start_containers_fix() { function start_container_fix() { echo -e "Starting a container $module" - sudo docker stop $module - sudo docker start $module + sudo docker restart $module sleep 5 if ! check_connectivity $module "${urls[$module]}"; then echo -e "Starting an old container $module_old" - sudo docker stop $module - sudo docker start $module"_old" + sudo docker restart $module"_old" sleep 5 fi } diff --git a/utils/test/testapi/deployment/deploy.py b/utils/test/testapi/deployment/deploy.py deleted file mode 100644 index 6433fa6b2..000000000 --- a/utils/test/testapi/deployment/deploy.py +++ /dev/null @@ -1,40 +0,0 @@ -import argparse -import os - -from jinja2 import Environment, FileSystemLoader - -env = Environment(loader=FileSystemLoader('./')) -docker_compose_yml = './docker-compose.yml' -docker_compose_template = './docker-compose.yml.template' - - -def render_docker_compose(port, base_url): - vars = { - "expose_port": port, - "base_url": base_url, - } - template = env.get_template(docker_compose_template) - yml = template.render(vars=vars) - - with open(docker_compose_yml, 'w') as f: - f.write(yml) - f.close() - - -def main(args): - render_docker_compose(args.expose_port, args.base_url) - os.system('docker-compose -f {} up -d'.format(docker_compose_yml)) - - -if __name__ == '__main__': - parser = argparse.ArgumentParser(description='Backup MongoDBs') - parser.add_argument('-p', '--expose-port', - type=int, - required=False, - default=8000, - help='testapi exposed port') - parser.add_argument('-l', '--base-url', - type=str, - required=True, - help='testapi exposed base-url') - main(parser.parse_args()) diff --git a/utils/test/testapi/deployment/docker-compose.yml.template b/utils/test/testapi/deployment/docker-compose.yml.template deleted file mode 100644 index cd684048e..000000000 --- a/utils/test/testapi/deployment/docker-compose.yml.template +++ /dev/null @@ -1,15 +0,0 @@ -version: '2' -services: - mongo: - image: mongo:3.2.1 - container_name: opnfv-mongo - testapi: - image: opnfv/testapi:latest - container_name: opnfv-testapi - environment: - - mongodb_url=mongodb://mongo:27017/ - - base_url={{ vars.base_url }} - ports: - - "{{ vars.expose_port }}:8000" - links: - - mongo diff --git a/utils/test/testapi/opts/deploy.py b/utils/test/testapi/opts/deploy.py new file mode 100644 index 000000000..f58690c5d --- /dev/null +++ b/utils/test/testapi/opts/deploy.py @@ -0,0 +1,55 @@ +import argparse +import os + +from jinja2 import Environment + +DOCKER_COMPOSE_FILE = './docker-compose.yml' +DOCKER_COMPOSE_TEMPLATE = """ +version: '2' +services: + mongo: + image: mongo:3.2.1 + container_name: opnfv-mongo + testapi: + image: opnfv/testapi:latest + container_name: opnfv-testapi + environment: + - mongodb_url=mongodb://mongo:27017/ + - base_url={{ vars.testapi_base_url }} + ports: + - "{{ vars.testapi_port }}:8000" + links: + - mongo +""" + + +def render_docker_compose(testapi_port, testapi_base_url): + vars = { + "testapi_port": testapi_port, + "testapi_base_url": testapi_base_url, + } + + yml = Environment().from_string(DOCKER_COMPOSE_TEMPLATE).render(vars=vars) + + with open(DOCKER_COMPOSE_FILE, 'w') as f: + f.write(yml) + f.close() + + +def main(args): + render_docker_compose(args.testapi_port, args.testapi_base_url) + os.system('docker-compose -f {} up -d'.format(DOCKER_COMPOSE_FILE)) + + +if __name__ == '__main__': + parser = argparse.ArgumentParser(description='Backup MongoDBs') + parser.add_argument('-tp', '--testapi-port', + type=int, + required=False, + default=8000, + help='testapi exposed port') + parser.add_argument('-tl', '--testapi-base-url', + type=str, + required=True, + help='testapi exposed base-url') + main(parser.parse_args()) |