From 651c735a3304f79b0e1365e03cf406f122bbc6c9 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Fri, 7 Jul 2017 17:05:01 -0500 Subject: [PATCH] Delete run-bindep role It's a leftover duplicate. The role is called bindep now. Change-Id: I4c9f3dd74dc8a16ec421aaba468269ffea00f28c --- roles/run-bindep/README.rst | 6 --- roles/run-bindep/defaults/main.yaml | 2 - roles/run-bindep/tasks/main.yaml | 69 ----------------------------- 3 files changed, 77 deletions(-) delete mode 100644 roles/run-bindep/README.rst delete mode 100644 roles/run-bindep/defaults/main.yaml delete mode 100644 roles/run-bindep/tasks/main.yaml diff --git a/roles/run-bindep/README.rst b/roles/run-bindep/README.rst deleted file mode 100644 index 6161bc282..000000000 --- a/roles/run-bindep/README.rst +++ /dev/null @@ -1,6 +0,0 @@ -Installs distro packages using bindep tool - -Looks for a ``bindep.txt`` in a project's source directory, or failing -that a ``other-requirements.txt``. If one exists, run ``bindep`` on the -file to produce a list of required distro packages that do not exist and -then install the missing packages. diff --git a/roles/run-bindep/defaults/main.yaml b/roles/run-bindep/defaults/main.yaml deleted file mode 100644 index a0afa22c5..000000000 --- a/roles/run-bindep/defaults/main.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -zuul_work_dir: "src/{{ zuul.project.canonical_name }}" diff --git a/roles/run-bindep/tasks/main.yaml b/roles/run-bindep/tasks/main.yaml deleted file mode 100644 index 1c59d2e93..000000000 --- a/roles/run-bindep/tasks/main.yaml +++ /dev/null @@ -1,69 +0,0 @@ ---- -- name: Install distro packages from bindep - args: - chdir: "src/{{ zuul.project.canonical_name }}" - shell: | - #!/bin/bash -xe - - # set a default path to the preinstalled bindep entrypoint - export BINDEP=${BINDEP:-/usr/bindep-env/bin/bindep} - - function is_fedora { - [ -f /usr/bin/yum ] && cat /etc/*release | grep -q -e "Fedora" - } - - YUM=yum - if is_fedora; then - YUM=dnf - fi - - # figure out which bindep list to use - if [ -n "$PACKAGES" ] ; then - # already set in the calling environment - : - elif [ -e bindep.txt ] ; then - # project has its own bindep list - export PACKAGES=bindep.txt - elif [ -e other-requirements.txt ] ; then - # project has its own bindep list - export PACKAGES=other-requirements.txt - else - # use the bindep fallback list preinstalled on the worker - export PACKAGES=/usr/local/jenkins/common_data/bindep-fallback.txt - fi - - # an install loop, retrying to check that all requested packages are - # obtained - try=0 - # Install test profile using bindep - until $BINDEP -b -f $PACKAGES test; do - if [ $try -gt 2 ] ; then - set +x - echo -e "\nERROR: These requested packages were not installed:\n" \ - "\n`$BINDEP -b -f $PACKAGES test`\n" 1>&2 - set -x - exit 1 - fi - - # don't abort inside the loop, we check for the desired outcome - set +e - if apt-get -v >/dev/null 2>&1 ; then - sudo apt-get -qq update - sudo PATH=/usr/sbin:/sbin:$PATH DEBIAN_FRONTEND=noninteractive \ - apt-get -q --option "Dpkg::Options::=--force-confold" \ - --assume-yes install `$BINDEP -b -f $PACKAGES test` - elif emerge --version >/dev/null 2>&1 ; then - sudo emerge -uDNq --jobs=4 @world - sudo PATH=/usr/sbin:/sbin:$PATH emerge -q --jobs=4 \ - `$BINDEP -b -f $PACKAGES test` - elif zypper --version >/dev/null 2>&1 ; then - sudo PATH=/usr/sbin:/sbin:$PATH zypper --non-interactive install \ - `$BINDEP -b -f $PACKAGES test` - else - sudo PATH=/usr/sbin:/sbin:$PATH $YUM install -y \ - `$BINDEP -b -f $PACKAGES test` - fi - set -e - - try=$(( $try+1 )) - done