From 5b3984022bdde98df0b03daa0813b47487bdda0a Mon Sep 17 00:00:00 2001 From: Laura Paduano Date: Mon, 16 Dec 2019 17:04:24 +0100 Subject: [PATCH] ceph-dashboard-*, ceph-api-nightly: Remove conditional-step; Replaced dir name; split-up scripts Split up the script which installs dependencies, since e2e and backend API tests require different packages. Adapt all jobs to use the dedicated scripts. Also remove the conditional step to not only execute the script that installs dependencies for e2e test environments Signed-off-by: Laura Paduano --- .../config/definitions/ceph-api-nightly.yml | 14 ++++++-------- .../definitions/ceph-dashboard-pr-backend.yml | 3 ++- .../definitions/ceph-dashboard-pull-requests.yml | 4 ++-- scripts/dashboard/install-backend-api-test-deps.sh | 8 ++++++++ .../install-e2e-test-deps.sh} | 5 +++-- 5 files changed, 21 insertions(+), 13 deletions(-) create mode 100644 scripts/dashboard/install-backend-api-test-deps.sh rename scripts/{e2e/install-e2e-tests-deps.sh => dashboard/install-e2e-test-deps.sh} (79%) diff --git a/ceph-api-nightly/config/definitions/ceph-api-nightly.yml b/ceph-api-nightly/config/definitions/ceph-api-nightly.yml index 50105c0d..923b6335 100644 --- a/ceph-api-nightly/config/definitions/ceph-api-nightly.yml +++ b/ceph-api-nightly/config/definitions/ceph-api-nightly.yml @@ -7,8 +7,10 @@ test_suite: - backend: test_suite_script: run-backend-api-tests.sh + test_deps_script: install-backend-api-test-deps.sh - e2e: test_suite_script: run-frontend-e2e-tests.sh + test_deps_script: install-e2e-test-deps.sh jobs: - '{name}-{ceph_branch}-{test_suite}' @@ -18,7 +20,7 @@ project-type: freestyle defaults: global concurrent: true - node: huge && x86_64 && centos7 && rebootable + node: huge && bionic && rebootable && x86_64 && !xenial && !trusty quiet-period: 5 block-downstream: false block-upstream: false @@ -51,13 +53,9 @@ builders: - shell: "export NPROC=$(nproc); {ceph_build}" - - conditional-step: - condition-kind: strings-match - condition-string1: '{test_suite}' - condition-string2: 'e2e' - steps: - - shell: - !include-raw: ../../../scripts/e2e/install-e2e-tests-deps.sh + - shell: + !include-raw: + - ../../../scripts/dashboard/{test_deps_script} - shell: "cd src/pybind/mgr/dashboard; timeout 2h ./{test_suite_script}" publishers: diff --git a/ceph-dashboard-pr-backend/config/definitions/ceph-dashboard-pr-backend.yml b/ceph-dashboard-pr-backend/config/definitions/ceph-dashboard-pr-backend.yml index 65c263dd..c6a0e4b6 100644 --- a/ceph-dashboard-pr-backend/config/definitions/ceph-dashboard-pr-backend.yml +++ b/ceph-dashboard-pr-backend/config/definitions/ceph-dashboard-pr-backend.yml @@ -3,7 +3,7 @@ project-type: freestyle defaults: global concurrent: true - node: huge && x86_64 && centos7 && rebootable + node: huge && bionic && rebootable && x86_64 && !xenial && !trusty display-name: 'ceph: dashboard Pull Requests backend' quiet-period: 5 block-downstream: false @@ -61,4 +61,5 @@ !include-raw: - ../../../scripts/build_utils.sh - ../../build/build + - ../../../scripts/dashboard/install-backend-api-test-deps.sh - shell: "cd src/pybind/mgr/dashboard; timeout 7200 ./run-backend-api-tests.sh" diff --git a/ceph-dashboard-pull-requests/config/definitions/ceph-dashboard-pull-requests.yml b/ceph-dashboard-pull-requests/config/definitions/ceph-dashboard-pull-requests.yml index 458d2d64..94f247a4 100644 --- a/ceph-dashboard-pull-requests/config/definitions/ceph-dashboard-pull-requests.yml +++ b/ceph-dashboard-pull-requests/config/definitions/ceph-dashboard-pull-requests.yml @@ -3,7 +3,7 @@ project-type: freestyle defaults: global concurrent: true - node: huge && x86_64 && centos7 && rebootable + node: huge && bionic && rebootable && x86_64 && !xenial && !trusty display-name: 'ceph: dashboard Pull Requests' quiet-period: 5 block-downstream: false @@ -61,5 +61,5 @@ - shell: "export NPROC=$(nproc) CHECK_MAKEOPTS='-j$(nproc) -N -Q'; timeout 7200 ./run-make-check.sh" - shell: !include-raw: - - ../../../scripts/e2e/install-e2e-tests-deps.sh + - ../../../scripts/dashboard/install-e2e-test-deps.sh - shell: "cd src/pybind/mgr/dashboard; timeout 7200 ./run-frontend-e2e-tests.sh" diff --git a/scripts/dashboard/install-backend-api-test-deps.sh b/scripts/dashboard/install-backend-api-test-deps.sh new file mode 100644 index 00000000..69b81009 --- /dev/null +++ b/scripts/dashboard/install-backend-api-test-deps.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set -ex + +if grep -q debian /etc/*-release; then + sudo apt-get install -y python-scipy python3-scipy python-routes python3-routes +elif grep -q rhel /etc/*-release; then + sudo yum install -y scipy python-routes python3-routes +fi diff --git a/scripts/e2e/install-e2e-tests-deps.sh b/scripts/dashboard/install-e2e-test-deps.sh similarity index 79% rename from scripts/e2e/install-e2e-tests-deps.sh rename to scripts/dashboard/install-e2e-test-deps.sh index b05cef03..936cf6e0 100644 --- a/scripts/e2e/install-e2e-tests-deps.sh +++ b/scripts/dashboard/install-e2e-test-deps.sh @@ -11,7 +11,8 @@ if grep -q debian /etc/*-release; then curl -fsSL https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - sudo apt-get update sudo apt-get install -y google-chrome-stable - sudo apt-get install -y python-requests python-openssl python-jinja2 python-jwt python-scipy + sudo apt-get install -y python-requests python3-requests python-openssl python3-openssl python-jinja2 python3-jinja2 \ + python-jwt python3-jwt python-scipy python3-scipy python-routes python3-routes sudo rm /etc/apt/sources.list.d/google-chrome.list elif grep -q rhel /etc/*-release; then sudo dd of=/etc/yum.repos.d/google-chrome.repo status=none <