Add tox targets for managing dependencies
This commit is contained in:
parent
b30ed57436
commit
1a0d76317e
@ -219,6 +219,14 @@ Alternatively, configuration can be provided as part of a bundle:
|
|||||||
> **Warning**: As of the time of writing the workaround to set the CHAP
|
> **Warning**: As of the time of writing the workaround to set the CHAP
|
||||||
credentials via the esx cli is still needed.
|
credentials via the esx cli is still needed.
|
||||||
|
|
||||||
|
## Development
|
||||||
|
|
||||||
|
The charm needs to pull in its dependencies before it can be deployed. To
|
||||||
|
pull in the dependency versions that correspond to this version of the
|
||||||
|
charm then run the `build` tox target.
|
||||||
|
|
||||||
|
To update all dependencies to their latest versions then run the `update-deps`
|
||||||
|
tox target.
|
||||||
|
|
||||||
<!-- LINKS -->
|
<!-- LINKS -->
|
||||||
|
|
||||||
|
@ -1,2 +1 @@
|
|||||||
mod/charm-helpers
|
mod/charm-helpers
|
||||||
#file:///home/ubuntu/branches/ceph-iscsi/mod/charm-helpers
|
|
||||||
|
24
charm-init.sh
Executable file
24
charm-init.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
UPDATE=""
|
||||||
|
while getopts ":u" opt; do
|
||||||
|
case $opt in
|
||||||
|
u) UPDATE=true;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
git submodule update --init
|
||||||
|
|
||||||
|
if [[ -z "$UPDATE" ]]; then
|
||||||
|
pip install -t lib -r build-requirements.txt
|
||||||
|
else
|
||||||
|
git -C mod/operator pull origin master
|
||||||
|
git -C mod/ops-openstack pull origin master
|
||||||
|
git -C mod/charm-helpers pull origin master
|
||||||
|
pip install -t lib -r build-requirements.txt --upgrade
|
||||||
|
fi
|
||||||
|
|
||||||
|
ln -f -t lib -s ../mod/operator/ops
|
||||||
|
ln -f -t lib -s ../mod/interface-ceph-client/interface_ceph_client.py
|
||||||
|
ln -f -t lib -s ../mod/ops-openstack/ops_openstack.py
|
||||||
|
ln -f -t lib -s ../mod/ops-openstack/adapters.py
|
@ -1,15 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
rm -rf lib/*
|
|
||||||
|
|
||||||
pip install -t lib/ git+https://github.com/juju/charm-helpers.git
|
|
||||||
|
|
||||||
git submodule init
|
|
||||||
git submodule update
|
|
||||||
(cd lib; ln -s ../mod/operator/ops;)
|
|
||||||
(cd lib; ln -s ../mod/interface-ceph-client/interface_ceph_client.py;)
|
|
||||||
(cd lib; ln -s ../mod/ops-openstack/ops_openstack.py)
|
|
||||||
(cd lib; ln -s ../mod/ops-openstack/adapters.py)
|
|
||||||
(cd mod/interface-ceph-client; git pull origin master)
|
|
||||||
(cd mod/operator; git pull origin master)
|
|
||||||
(cd mod/ops-openstack; git pull origin master)
|
|
@ -1 +1 @@
|
|||||||
Subproject commit 60c43f81e36139ab4044c185247eb27fe389bce6
|
Subproject commit 58ff602b29763172c39502de0fa64de965cfbea7
|
18
tox.ini
18
tox.ini
@ -18,6 +18,7 @@ commands = stestr run --slowest {posargs}
|
|||||||
whitelist_externals =
|
whitelist_externals =
|
||||||
git
|
git
|
||||||
ln
|
ln
|
||||||
|
charm-init.sh
|
||||||
passenv = HOME TERM CS_* OS_* TEST_*
|
passenv = HOME TERM CS_* OS_* TEST_*
|
||||||
deps = -r{toxinidir}/test-requirements.txt
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
|
|
||||||
@ -83,26 +84,13 @@ commands = {posargs}
|
|||||||
basepython = python3
|
basepython = python3
|
||||||
deps =
|
deps =
|
||||||
commands =
|
commands =
|
||||||
git submodule update --init
|
./charm-init.sh
|
||||||
pip install -t lib -r build-requirements.txt
|
|
||||||
ln -f -t lib -s ../mod/operator/ops
|
|
||||||
ln -f -t lib -s ../mod/interface-ceph-client/interface_ceph_client.py
|
|
||||||
ln -f -t lib -s ../mod/ops-openstack/ops_openstack.py
|
|
||||||
ln -f -t lib -s ../mod/ops-openstack/adapters.py
|
|
||||||
|
|
||||||
[testenv:update-deps]
|
[testenv:update-deps]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
deps =
|
deps =
|
||||||
commands =
|
commands =
|
||||||
git submodule update --init
|
./charm-init.sh -u
|
||||||
git -C mod/operator pull origin master
|
|
||||||
git -C mod/ops-openstack pull origin master
|
|
||||||
git -C mod/charm-helpers pull origin master
|
|
||||||
pip install -t lib -r build-requirements.txt --upgrade
|
|
||||||
ln -f -t lib -s ../mod/operator/ops
|
|
||||||
ln -f -t lib -s ../mod/interface-ceph-client/interface_ceph_client.py
|
|
||||||
ln -f -t lib -s ../mod/ops-openstack/ops_openstack.py
|
|
||||||
ln -f -t lib -s ../mod/ops-openstack/adapters.py
|
|
||||||
|
|
||||||
[testenv:func-noop]
|
[testenv:func-noop]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
Loading…
Reference in New Issue
Block a user