summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Hellmann <doug@doughellmann.com>2018-09-09 06:00:52 -0400
committerNguyen Hai <nguyentrihai93@gmail.com>2018-09-14 13:54:10 +0000
commitb10b8170cd21f9fd40a4a85fc26075a2737fbe31 (patch)
tree7dfbc1dc7059fab833c0ac6fce9381fdaf759c8c
parent97dd5908f80ab7bb4b2e36c8bbf0c37739938439 (diff)
import zuul job settings from project-configstable/pike
This is a mechanically generated patch to complete step 1 of moving the zuul job settings out of project-config and into each project repository. Because there will be a separate patch on each branch, the branch specifiers for branch-specific jobs have been removed. Because this patch is generated by a script, there may be some cosmetic changes to the layout of the YAML file(s) as the contents are normalized. See the python3-first goal document for details: https://governance.openstack.org/tc/goals/stein/python3-first.html Change-Id: Ia95d44ff8d2b3666dff846a05b6cf1b03fb54428 Story: #2002586 Task: #24342
Notes
Notes (review): Code-Review+1: Nguyen Hai <nguyentrihai93@gmail.com> Code-Review+2: Sean McGinnis <sean.mcginnis@gmail.com> Workflow+1: Sean McGinnis <sean.mcginnis@gmail.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Thu, 04 Oct 2018 20:11:38 +0000 Reviewed-on: https://review.openstack.org/601574 Project: openstack/python-troveclient Branch: refs/heads/stable/pike
-rw-r--r--.zuul.yaml15
-rwxr-xr-xtools/tox_install.sh55
-rw-r--r--tox.ini7
3 files changed, 18 insertions, 59 deletions
diff --git a/.zuul.yaml b/.zuul.yaml
new file mode 100644
index 0000000..753791d
--- /dev/null
+++ b/.zuul.yaml
@@ -0,0 +1,15 @@
1- project:
2 templates:
3 - check-requirements
4 - publish-openstack-sphinx-docs
5 - openstack-python-jobs
6 - openstack-python35-jobs
7 - release-notes-jobs
8 - openstackclient-plugin-jobs
9 check:
10 jobs:
11 - trove-functional-mysql
12 gate:
13 queue: trove
14 jobs:
15 - trove-functional-mysql
diff --git a/tools/tox_install.sh b/tools/tox_install.sh
deleted file mode 100755
index 1a3164c..0000000
--- a/tools/tox_install.sh
+++ /dev/null
@@ -1,55 +0,0 @@
1#!/usr/bin/env bash
2
3# Client constraint file contains this client version pin that is in conflict
4# with installing the client from source. We should replace the version pin in
5# the constraints file before applying it for from-source installation.
6
7ZUUL_CLONER=/usr/zuul-env/bin/zuul-cloner
8BRANCH_NAME=master
9CLIENT_NAME=python-troveclient
10requirements_installed=$(echo "import openstack_requirements" | python 2>/dev/null ; echo $?)
11
12set -e
13
14CONSTRAINTS_FILE=$1
15shift
16
17install_cmd="pip install"
18mydir=$(mktemp -dt "$CLIENT_NAME-tox_install-XXXXXXX")
19trap "rm -rf $mydir" EXIT
20localfile=$mydir/upper-constraints.txt
21if [[ $CONSTRAINTS_FILE != http* ]]; then
22 CONSTRAINTS_FILE=file://$CONSTRAINTS_FILE
23fi
24curl $CONSTRAINTS_FILE -k -o $localfile
25install_cmd="$install_cmd -c$localfile"
26
27if [ $requirements_installed -eq 0 ]; then
28 echo "ALREADY INSTALLED" > /tmp/tox_install.txt
29 echo "Requirements already installed; using existing package"
30elif [ -x "$ZUUL_CLONER" ]; then
31 echo "ZUUL CLONER" > /tmp/tox_install.txt
32 pushd $mydir
33 $ZUUL_CLONER --cache-dir \
34 /opt/git \
35 --branch $BRANCH_NAME \
36 git://git.openstack.org \
37 openstack/requirements
38 cd openstack/requirements
39 $install_cmd -e .
40 popd
41else
42 echo "PIP HARDCODE" > /tmp/tox_install.txt
43 if [ -z "$REQUIREMENTS_PIP_LOCATION" ]; then
44 REQUIREMENTS_PIP_LOCATION="git+https://git.openstack.org/openstack/requirements@$BRANCH_NAME#egg=requirements"
45 fi
46 $install_cmd -U -e ${REQUIREMENTS_PIP_LOCATION}
47fi
48
49# This is the main purpose of the script: Allow local installation of
50# the current repo. It is listed in constraints file and thus any
51# install will be constrained and we need to unconstrain it.
52edit-constraints $localfile -- $CLIENT_NAME "-e file://$PWD#egg=$CLIENT_NAME"
53
54$install_cmd -U $*
55exit $?
diff --git a/tox.ini b/tox.ini
index de4f1a3..cd315cb 100644
--- a/tox.ini
+++ b/tox.ini
@@ -13,10 +13,9 @@ setenv = VIRTUAL_ENV={envdir}
13 NOSE_OPENSTACK_YELLOW=0.025 13 NOSE_OPENSTACK_YELLOW=0.025
14 NOSE_OPENSTACK_SHOW_ELAPSED=1 14 NOSE_OPENSTACK_SHOW_ELAPSED=1
15usedevelop = True 15usedevelop = True
16install_command = {toxinidir}/tools/tox_install.sh \ 16install_command = pip install {opts} {packages}
17 {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} \ 17deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/pike}
18 {opts} {packages} 18 -r{toxinidir}/requirements.txt
19deps = -r{toxinidir}/requirements.txt
20 -r{toxinidir}/test-requirements.txt 19 -r{toxinidir}/test-requirements.txt
21commands = find . -type f -name "*.pyc" -delete 20commands = find . -type f -name "*.pyc" -delete
22 rm -f .testrepository/times.dbm 21 rm -f .testrepository/times.dbm