Use ``uri`` property

Move workdir to avoid charm build error in gate test.  Move built
artifact back so CI can inspect it. (The layer build-only job in
CI should get an update to cope with this itself)

Change-Id: Icee40b83e6924a6adc9ee1f97eff04522121d5fa
Closes-Bug: #1823729
This commit is contained in:
Frode Nordahl 2019-04-08 17:29:22 +02:00
parent bfda016be4
commit 15c2ae30bb
No known key found for this signature in database
GPG Key ID: 6A5D59A3BA48373F
2 changed files with 12 additions and 4 deletions

View File

@ -1,5 +1,5 @@
{% if shared_db.host -%}
[database]
connection = {{ shared_db.type }}://{{ shared_db.username }}:{{ shared_db.password }}@{{ shared_db.host }}/{{ shared_db.database }}{% if database_ssl_ca %}?ssl_ca={{ database_ssl_ca }}{% if database_ssl_cert %}&ssl_cert={{ database_ssl_cert }}&ssl_key={{ database_ssl_key }}{% endif %}{% endif %}
connection = {{ shared_db.uri }}
{% endif -%}

14
tox.ini
View File

@ -1,24 +1,32 @@
[tox]
skipsdist = True
envlist = pep8
toxworkdir = /tmp/tox
[testenv]
basepython = python2.7
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
TERM=linux
JUJU_REPOSITORY={toxinidir}/build
JUJU_REPOSITORY={envdir}/tmp/build
passenv = http_proxy https_proxy
install_command =
pip install {opts} {packages}
deps =
-r{toxinidir}/requirements.txt
whitelist_externals = /bin/true /bin/echo
whitelist_externals = /bin/true /bin/echo /bin/mkdir /bin/ln
[testenv:build]
# ``charm build`` refuses to output to a subdirectory to the source tree
# The gate check will look for and validate the built artifacts in the source
# tree.
# Build the artifats under /tmp and link back to source directory to alleviate.
commands =
/bin/echo 'WARNING: *build* target is for testing only.'
charm-build --log-level DEBUG -o {toxinidir}/build .
/bin/mkdir -p {envdir}/tmp
charm-build --log-level DEBUG -o {envdir}/tmp/build .
/bin/ln -s {envdir}/tmp/build/builds {envdir}/tmp/build/trusty
/bin/ln -s {envdir}/tmp/build {toxinidir}/build
[testenv:venv]
basepython = python3