From 8087d7caa1386a9d3da32e1199e7374576f7c528 Mon Sep 17 00:00:00 2001 From: Andrey Kurilin Date: Thu, 2 Jul 2020 13:45:51 +0300 Subject: [PATCH] Add ubuntu-focal install job Change-Id: Ic5e4f41f142d978d5e85b27ea324805bef307983 --- .zuul.d/install-jobs.yaml | 27 ++++++++++++ .zuul.d/zuul.yaml | 24 +--------- tests/ci/playbooks/rally-install-pre.yaml | 54 +++++++++++------------ 3 files changed, 55 insertions(+), 50 deletions(-) create mode 100644 .zuul.d/install-jobs.yaml diff --git a/.zuul.d/install-jobs.yaml b/.zuul.d/install-jobs.yaml new file mode 100644 index 0000000000..82de036e67 --- /dev/null +++ b/.zuul.d/install-jobs.yaml @@ -0,0 +1,27 @@ +- job: + name: rally-install-base + parent: base + pre-run: tests/ci/playbooks/rally-install-pre.yaml + run: tests/ci/playbooks/rally-install-run.yaml + post-run: tests/ci/playbooks/fetch-html-and-json-reports.yaml + timeout: 1800 + +- job: + name: rally-install-ubuntu-bionic + parent: rally-install-base + nodeset: ubuntu-bionic + +- job: + name: rally-install-ubuntu-focal + parent: rally-install-base + nodeset: ubuntu-focal + +- job: + name: rally-install-centos-7 + parent: rally-install-base + nodeset: centos-7 + +- job: + name: rally-install-centos-8 + parent: rally-install-base + nodeset: centos-8 \ No newline at end of file diff --git a/.zuul.d/zuul.yaml b/.zuul.d/zuul.yaml index 76be5c1246..8d91839041 100644 --- a/.zuul.d/zuul.yaml +++ b/.zuul.d/zuul.yaml @@ -1,25 +1,3 @@ -- job: - name: rally-install-base - parent: base - pre-run: tests/ci/playbooks/rally-install-pre.yaml - run: tests/ci/playbooks/rally-install-run.yaml - post-run: tests/ci/playbooks/fetch-html-and-json-reports.yaml - timeout: 1800 - -- job: - name: rally-install-ubuntu-bionic - parent: rally-install-base - nodeset: ubuntu-bionic - -- job: - name: rally-install-centos-7 - parent: rally-install-base - nodeset: centos-7 - -- job: - name: rally-install-centos-8 - parent: rally-install-base - nodeset: centos-8 - project: templates: @@ -39,6 +17,7 @@ - rally-tox-functional-py38 - rally-tox-self - rally-install-ubuntu-bionic + - rally-install-ubuntu-focal - rally-install-centos-7 - rally-install-centos-8 - rally-docker-build @@ -53,6 +32,7 @@ - rally-tox-functional - rally-tox-self - rally-install-ubuntu-bionic + - rally-install-ubuntu-focal - rally-install-centos-7 - rally-install-centos-8 post: diff --git a/tests/ci/playbooks/rally-install-pre.yaml b/tests/ci/playbooks/rally-install-pre.yaml index 1502a8dcba..e1f6875810 100644 --- a/tests/ci/playbooks/rally-install-pre.yaml +++ b/tests/ci/playbooks/rally-install-pre.yaml @@ -1,29 +1,12 @@ - hosts: all name: Prepare host to install Rally tasks: - - name: Check whether apt is available - shell: - cmd: "apt-get --version" - executable: /bin/sh - register: apt_get_installed - ignore_errors: True - - - name: Check whether dnf is available - shell: - cmd: "dnf --version" - executable: /bin/sh - register: dnf_installed - ignore_errors: True - - - name: Check whether yum is available - shell: - cmd: "yum --version" - executable: /bin/sh - register: yum_installed - ignore_errors: True + - name: Set Apache URL + set_fact: + os_distro: '{{ ansible_distribution }} {{ ansible_distribution_version }}' - name: Install required packages (Centos-7) - when: yum_installed.rc == 0 + when: os_distro == "CentOS 7" shell: cmd: | sudo yum remove -y python-crypto || true @@ -35,18 +18,33 @@ sudo yum install -y https://centos7.iuscommunity.org/ius-release.rpm sudo yum install -y python36u python36u-devel - curl https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py - sudo python3 /tmp/get-pip.py - - - name: Install required packages (Ubuntu) - when: apt_get_installed.rc == 0 + - name: Install required packages (Ubuntu-Bionic) + when: os_distro == "Ubuntu 18.04" shell: chdir: '{{ zuul.project.src_dir }}' cmd: | # NOTE(pabelanger): We run apt-get update to ensure we dont have a stale # package cache in the gate. - sudo apt-get update - sudo apt-get install --yes python3.6-dev + sudo apt update + sudo apt install --yes python3.6-dev + + - name: Install required packages (Ubuntu-Focal) + when: os_distro == "Ubuntu 20.04" + shell: + chdir: '{{ zuul.project.src_dir }}' + cmd: | + # NOTE(pabelanger): We run apt-get update to ensure we dont have a stale + # package cache in the gate. + sudo apt update + sudo apt install --yes python3.8-dev + + - name: Install pip3 if needed + when: os_distro == "CentOS 7" or os_distro == "Ubuntu 18.04" or os_distro == "Ubuntu 20.04" + shell: + chdir: '{{ zuul.project.src_dir }}' + cmd: | + curl https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py + sudo python3 /tmp/get-pip.py - name: Install bindep shell: