Update to build using charmcraft

Due to a build problem with the reactive plugin, this change falls back
on overriding the steps and doing a manual build, but it also ensures
the CI system builds the charm using charmcraft.  Changes:

- add a build-requirements.txt
- modify charmcraft.yaml
- modify osci.yaml
    -> indicate build with charmcraft
- modify tox.ini
    -> tox -e build does charmcraft build/rename
    -> tox -e build-reactive does the reactive build
- modify bundles to use the <charm>.charm artifact in tests.
  and fix deprecation warning re: prefix
- tox inception to enable tox -e func-test in the CI

Change-Id: I8da1d8c2ac7a8f2ae180bb82eb9d5a4abd9eaeb9
This commit is contained in:
Alex Kavanagh 2022-01-27 13:11:01 +00:00
parent 58cce9ede9
commit 7eae2f1a7c
23 changed files with 145 additions and 634 deletions

7
build-requirements.txt Normal file
View File

@ -0,0 +1,7 @@
# NOTES(lourot):
# * We don't install charmcraft via pip anymore because it anyway spins up a
# container and scp the system's charmcraft snap inside it. So the charmcraft
# snap is necessary on the system anyway.
# * `tox -e build` successfully validated with charmcraft 1.2.1
cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35.

25
charmcraft.yaml Normal file
View File

@ -0,0 +1,25 @@
type: charm
parts:
charm:
build-packages:
- tox
- git
- python3-dev
override-build: |
apt-get install ca-certificates -y
tox -e build-reactive
override-stage: |
echo "Copying charm to staging area: $CHARMCRAFT_STAGE"
NAME=$(ls $CHARMCRAFT_PART_BUILD/build/builds)
cp -r $CHARMCRAFT_PART_BUILD/build/builds/$NAME/* $CHARMCRAFT_STAGE/
override-prime: |
# For some reason, the normal priming chokes on the fact that there's a
# hooks directory.
cp -r $CHARMCRAFT_STAGE/* .
bases:
- name: ubuntu
channel: "20.04"
architectures:
- amd64

1
metadata.yaml Symbolic link
View File

@ -0,0 +1 @@
src/metadata.yaml

View File

@ -1,13 +1,10 @@
- project:
templates:
- charm-yoga-unit-jobs
- charm-yoga-functional-jobs
- charm-unit-jobs-py38
- charm-unit-jobs-py39
- charm-xena-functional-jobs
- charm-wallaby-functional-jobs
- charm-victoria-functional-jobs
- charm-ussuri-functional-jobs
- charm-stein-functional-jobs
- charm-queens-functional-jobs
- charm-yoga-functional-jobs
vars:
needs_charm_build: true
charm_build_name: cinder-purestorage
build_type: charmcraft

13
rename.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
charm=$(grep "charm_build_name" osci.yaml | awk '{print $2}')
echo "renaming ${charm}_*.charm to ${charm}.charm"
echo -n "pwd: "
pwd
ls -al
echo "Removing bad downloaded charm maybe?"
if [[ -e "${charm}.charm" ]];
then
rm "${charm}.charm"
fi
echo "Renaming charm here."
mv ${charm}_*.charm ${charm}.charm

View File

@ -11,10 +11,7 @@ tags:
- file-servers
- misc
series:
- bionic
- focal
- groovy
- hirsute
- impish
subordinate: true
provides:

View File

@ -4,6 +4,9 @@
# https://github.com/openstack-charmers/release-tools
#
# Need tox to be available from tox... inception yes, but its a workaround for now
tox
# Functional Test Requirements (let Zaza's dependencies solve all dependencies here!)
git+https://github.com/openstack-charmers/zaza.git#egg=zaza
git+https://github.com/openstack-charmers/zaza-openstack-tests.git#egg=zaza.openstack

View File

@ -1,49 +0,0 @@
series: bionic
comment:
- 'machines section to decide order of deployment. database sooner = faster'
machines:
'0':
constraints: mem=3072M
'1':
'2':
'3':
relations:
- - keystone:shared-db
- mysql:shared-db
- - cinder:shared-db
- mysql:shared-db
- - cinder:identity-service
- keystone:identity-service
- - cinder:amqp
- rabbitmq-server:amqp
- - cinder:storage-backend
- cinder-purestorage:storage-backend
applications:
mysql:
charm: cs:~openstack-charmers-next/percona-cluster
num_units: 1
to:
- '0'
keystone:
charm: cs:~openstack-charmers-next/keystone
num_units: 1
to:
- '1'
cinder:
charm: cs:~openstack-charmers-next/cinder
num_units: 1
to:
- '2'
cinder-purestorage:
series: bionic
charm: ../../../cinder-purestorage
options:
# Add config options here
driver-source: ppa:openstack-charmers/purestorage-stable
protocol: iscsi
volume-backend-name: cinder-pure
rabbitmq-server:
charm: cs:~openstack-charmers-next/rabbitmq-server
num_units: 1
to:
- '3'

View File

@ -1,53 +0,0 @@
series: bionic
comment:
- 'machines section to decide order of deployment. database sooner = faster'
machines:
'0':
constraints: mem=3072M
'1':
'2':
'3':
relations:
- - keystone:shared-db
- mysql:shared-db
- - cinder:shared-db
- mysql:shared-db
- - cinder:identity-service
- keystone:identity-service
- - cinder:amqp
- rabbitmq-server:amqp
- - cinder:storage-backend
- cinder-purestorage:storage-backend
applications:
mysql:
charm: cs:~openstack-charmers-next/percona-cluster
num_units: 1
to:
- '0'
keystone:
charm: cs:~openstack-charmers-next/keystone
num_units: 1
options:
openstack-origin: cloud:bionic-rocky
to:
- '1'
cinder:
charm: cs:~openstack-charmers-next/cinder
num_units: 1
options:
openstack-origin: cloud:bionic-rocky
to:
- '2'
cinder-purestorage:
series: bionic
charm: ../../../cinder-purestorage
options:
# Add config options here
driver-source: ppa:openstack-charmers/purestorage-stable
protocol: iscsi
volume-backend-name: cinder-pure
rabbitmq-server:
charm: cs:~openstack-charmers-next/rabbitmq-server
num_units: 1
to:
- '3'

View File

@ -1,53 +0,0 @@
series: bionic
comment:
- 'machines section to decide order of deployment. database sooner = faster'
machines:
'0':
constraints: mem=3072M
'1':
'2':
'3':
relations:
- - keystone:shared-db
- mysql:shared-db
- - cinder:shared-db
- mysql:shared-db
- - cinder:identity-service
- keystone:identity-service
- - cinder:amqp
- rabbitmq-server:amqp
- - cinder:storage-backend
- cinder-purestorage:storage-backend
applications:
mysql:
charm: cs:~openstack-charmers-next/percona-cluster
num_units: 1
to:
- '0'
keystone:
charm: cs:~openstack-charmers-next/keystone
num_units: 1
options:
openstack-origin: cloud:bionic-stein
to:
- '1'
cinder:
charm: cs:~openstack-charmers-next/cinder
num_units: 1
options:
openstack-origin: cloud:bionic-stein
to:
- '2'
cinder-purestorage:
series: bionic
charm: ../../../cinder-purestorage
options:
# Add config options here
driver-source: ppa:openstack-charmers/purestorage-stable
protocol: iscsi
volume-backend-name: cinder-pure
rabbitmq-server:
charm: cs:~openstack-charmers-next/rabbitmq-server
num_units: 1
to:
- '3'

View File

@ -1,53 +0,0 @@
series: bionic
comment:
- 'machines section to decide order of deployment. database sooner = faster'
machines:
'0':
constraints: mem=3072M
'1':
'2':
'3':
relations:
- - keystone:shared-db
- mysql:shared-db
- - cinder:shared-db
- mysql:shared-db
- - cinder:identity-service
- keystone:identity-service
- - cinder:amqp
- rabbitmq-server:amqp
- - cinder:storage-backend
- cinder-purestorage:storage-backend
applications:
mysql:
charm: cs:~openstack-charmers-next/percona-cluster
num_units: 1
to:
- '0'
keystone:
charm: cs:~openstack-charmers-next/keystone
num_units: 1
options:
openstack-origin: cloud:bionic-train
to:
- '1'
cinder:
charm: cs:~openstack-charmers-next/cinder
num_units: 1
options:
openstack-origin: cloud:bionic-train
to:
- '2'
cinder-purestorage:
series: bionic
charm: ../../../cinder-purestorage
options:
# Add config options here
driver-source: ppa:openstack-charmers/purestorage-stable
protocol: iscsi
volume-backend-name: cinder-pure
rabbitmq-server:
charm: cs:~openstack-charmers-next/rabbitmq-server
num_units: 1
to:
- '3'

View File

@ -1,53 +0,0 @@
series: bionic
comment:
- 'machines section to decide order of deployment. database sooner = faster'
machines:
'0':
consussurits: mem=3072M
'1':
'2':
'3':
relations:
- - keystone:shared-db
- mysql:shared-db
- - cinder:shared-db
- mysql:shared-db
- - cinder:identity-service
- keystone:identity-service
- - cinder:amqp
- rabbitmq-server:amqp
- - cinder:storage-backend
- cinder-purestorage:storage-backend
applications:
mysql:
charm: cs:~openstack-charmers-next/percona-cluster
num_units: 1
to:
- '0'
keystone:
charm: cs:~openstack-charmers-next/keystone
num_units: 1
options:
openstack-origin: cloud:bionic-ussuri
to:
- '1'
cinder:
charm: cs:~openstack-charmers-next/cinder
num_units: 1
options:
openstack-origin: cloud:bionic-ussuri
to:
- '2'
cinder-purestorage:
series: bionic
charm: ../../../cinder-purestorage
options:
# Add config options here
driver-source: ppa:openstack-charmers/purestorage-stable
protocol: iscsi
volume-backend-name: cinder-pure
rabbitmq-server:
charm: cs:~openstack-charmers-next/rabbitmq-server
num_units: 1
to:
- '3'

View File

@ -1,80 +0,0 @@
variables:
openstack-origin: &openstack-origin distro
series: focal
comment:
- 'machines section to decide order of deployment. database sooner = faster'
machines:
'0':
constraints: mem=3072M
'1':
constraints: mem=3072M
'2':
constraints: mem=3072M
'3':
'4':
'5':
relations:
- - 'cinder:identity-service'
- 'keystone:identity-service'
- - 'cinder:amqp'
- 'rabbitmq-server:amqp'
- - 'cinder:storage-backend'
- 'cinder-purestorage:storage-backend'
- - 'keystone:shared-db'
- 'keystone-mysql-router:shared-db'
- - 'keystone-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'cinder:shared-db'
- 'cinder-mysql-router:shared-db'
- - 'cinder-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
applications:
keystone-mysql-router:
charm: cs:~openstack-charmers-next/mysql-router
cinder-mysql-router:
charm: cs:~openstack-charmers-next/mysql-router
mysql-innodb-cluster:
charm: cs:~openstack-charmers-next/mysql-innodb-cluster
num_units: 3
options:
source: *openstack-origin
to:
- '0'
- '1'
- '2'
keystone:
charm: cs:~openstack-charmers-next/keystone
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '3'
cinder:
charm: cs:~openstack-charmers-next/cinder
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '4'
cinder-purestorage:
series: focal
charm: ../../../cinder-purestorage
options:
# Add config options here
driver-source: ppa:openstack-charmers/purestorage-stable
protocol: iscsi
volume-backend-name: cinder-pure
rabbitmq-server:
charm: cs:~openstack-charmers-next/rabbitmq-server
num_units: 1
to:
- '5'

View File

@ -1,80 +0,0 @@
variables:
openstack-origin: &openstack-origin cloud:focal-victoria
series: focal
comment:
- 'machines section to decide order of deployment. database sooner = faster'
machines:
'0':
constraints: mem=3072M
'1':
constraints: mem=3072M
'2':
constraints: mem=3072M
'3':
'4':
'5':
relations:
- - 'cinder:identity-service'
- 'keystone:identity-service'
- - 'cinder:amqp'
- 'rabbitmq-server:amqp'
- - 'cinder:storage-backend'
- 'cinder-purestorage:storage-backend'
- - 'keystone:shared-db'
- 'keystone-mysql-router:shared-db'
- - 'keystone-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'cinder:shared-db'
- 'cinder-mysql-router:shared-db'
- - 'cinder-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
applications:
keystone-mysql-router:
charm: cs:~openstack-charmers-next/mysql-router
cinder-mysql-router:
charm: cs:~openstack-charmers-next/mysql-router
mysql-innodb-cluster:
charm: cs:~openstack-charmers-next/mysql-innodb-cluster
num_units: 3
options:
source: *openstack-origin
to:
- '0'
- '1'
- '2'
keystone:
charm: cs:~openstack-charmers-next/keystone
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '3'
cinder:
charm: cs:~openstack-charmers-next/cinder
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '4'
cinder-purestorage:
series: focal
charm: ../../../cinder-purestorage
options:
# Add config options here
driver-source: ppa:openstack-charmers/purestorage-stable
protocol: iscsi
volume-backend-name: cinder-pure
rabbitmq-server:
charm: cs:~openstack-charmers-next/rabbitmq-server
num_units: 1
to:
- '5'

View File

@ -1,80 +0,0 @@
variables:
openstack-origin: &openstack-origin cloud:focal-wallaby
series: focal
comment:
- 'machines section to decide order of deployment. database sooner = faster'
machines:
'0':
constraints: mem=3072M
'1':
constraints: mem=3072M
'2':
constraints: mem=3072M
'3':
'4':
'5':
relations:
- - 'cinder:identity-service'
- 'keystone:identity-service'
- - 'cinder:amqp'
- 'rabbitmq-server:amqp'
- - 'cinder:storage-backend'
- 'cinder-purestorage:storage-backend'
- - 'keystone:shared-db'
- 'keystone-mysql-router:shared-db'
- - 'keystone-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'cinder:shared-db'
- 'cinder-mysql-router:shared-db'
- - 'cinder-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
applications:
keystone-mysql-router:
charm: cs:~openstack-charmers-next/mysql-router
cinder-mysql-router:
charm: cs:~openstack-charmers-next/mysql-router
mysql-innodb-cluster:
charm: cs:~openstack-charmers-next/mysql-innodb-cluster
num_units: 3
options:
source: *openstack-origin
to:
- '0'
- '1'
- '2'
keystone:
charm: cs:~openstack-charmers-next/keystone
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '3'
cinder:
charm: cs:~openstack-charmers-next/cinder
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '4'
cinder-purestorage:
series: focal
charm: ../../../cinder-purestorage
options:
# Add config options here
driver-source: ppa:openstack-charmers/purestorage-stable
protocol: iscsi
volume-backend-name: cinder-pure
rabbitmq-server:
charm: cs:~openstack-charmers-next/rabbitmq-server
num_units: 1
to:
- '5'

View File

@ -1,6 +1,8 @@
variables:
openstack-origin: &openstack-origin cloud:focal-xena
local_overlay_enabled: False
series: focal
comment:
@ -38,12 +40,14 @@ relations:
applications:
keystone-mysql-router:
charm: cs:~openstack-charmers-next/mysql-router
charm: ch:mysql-router
channel: latest/edge
cinder-mysql-router:
charm: cs:~openstack-charmers-next/mysql-router
charm: ch:mysql-router
channel: latest/edge
mysql-innodb-cluster:
charm: cs:~openstack-charmers-next/mysql-innodb-cluster
charm: ch:mysql-innodb-cluster
num_units: 3
options:
source: *openstack-origin
@ -51,30 +55,33 @@ applications:
- '0'
- '1'
- '2'
channel: latest/edge
keystone:
charm: cs:~openstack-charmers-next/keystone
charm: ch:keystone
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '3'
channel: latest/edge
cinder:
charm: cs:~openstack-charmers-next/cinder
charm: ch:cinder
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '4'
channel: latest/edge
cinder-purestorage:
series: focal
charm: ../../../cinder-purestorage
charm: ../../../cinder-purestorage.charm
options:
# Add config options here
driver-source: ppa:openstack-charmers/purestorage-stable
protocol: iscsi
volume-backend-name: cinder-pure
rabbitmq-server:
charm: cs:~openstack-charmers-next/rabbitmq-server
charm: ch:rabbitmq-server
num_units: 1
to:
- '5'
channel: latest/edge

View File

@ -1,6 +1,8 @@
variables:
openstack-origin: &openstack-origin cloud:focal-yoga
local_overlay_enabled: False
series: focal
comment:
@ -38,12 +40,14 @@ relations:
applications:
keystone-mysql-router:
charm: cs:~openstack-charmers-next/mysql-router
charm: ch:mysql-router
channel: latest/edge
cinder-mysql-router:
charm: cs:~openstack-charmers-next/mysql-router
charm: ch:mysql-router
channel: latest/edge
mysql-innodb-cluster:
charm: cs:~openstack-charmers-next/mysql-innodb-cluster
charm: ch:mysql-innodb-cluster
num_units: 3
options:
source: *openstack-origin
@ -51,30 +55,33 @@ applications:
- '0'
- '1'
- '2'
channel: latest/edge
keystone:
charm: cs:~openstack-charmers-next/keystone
charm: ch:keystone
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '3'
channel: latest/edge
cinder:
charm: cs:~openstack-charmers-next/cinder
charm: ch:cinder
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '4'
channel: latest/edge
cinder-purestorage:
series: focal
charm: ../../../cinder-purestorage
charm: ../../../cinder-purestorage.charm
options:
# Add config options here
driver-source: ppa:openstack-charmers/purestorage-stable
protocol: iscsi
volume-backend-name: cinder-pure
rabbitmq-server:
charm: cs:~openstack-charmers-next/rabbitmq-server
charm: ch:rabbitmq-server
num_units: 1
to:
- '5'
channel: latest/edge

View File

@ -1,80 +0,0 @@
variables:
openstack-origin: &openstack-origin distro
series: hirsute
comment:
- 'machines section to decide order of deployment. database sooner = faster'
machines:
'0':
constraints: mem=3072M
'1':
constraints: mem=3072M
'2':
constraints: mem=3072M
'3':
'4':
'5':
relations:
- - 'cinder:identity-service'
- 'keystone:identity-service'
- - 'cinder:amqp'
- 'rabbitmq-server:amqp'
- - 'cinder:storage-backend'
- 'cinder-purestorage:storage-backend'
- - 'keystone:shared-db'
- 'keystone-mysql-router:shared-db'
- - 'keystone-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
- - 'cinder:shared-db'
- 'cinder-mysql-router:shared-db'
- - 'cinder-mysql-router:db-router'
- 'mysql-innodb-cluster:db-router'
applications:
keystone-mysql-router:
charm: cs:~openstack-charmers-next/mysql-router
cinder-mysql-router:
charm: cs:~openstack-charmers-next/mysql-router
mysql-innodb-cluster:
charm: cs:~openstack-charmers-next/mysql-innodb-cluster
num_units: 3
options:
source: *openstack-origin
to:
- '0'
- '1'
- '2'
keystone:
charm: cs:~openstack-charmers-next/keystone
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '3'
cinder:
charm: cs:~openstack-charmers-next/cinder
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '4'
cinder-purestorage:
series: groovy
charm: ../../../cinder-purestorage
options:
# Add config options here
driver-source: ppa:openstack-charmers/purestorage-stable
protocol: iscsi
volume-backend-name: cinder-pure
rabbitmq-server:
charm: cs:~openstack-charmers-next/rabbitmq-server
num_units: 1
to:
- '5'

View File

@ -1,6 +1,8 @@
variables:
openstack-origin: &openstack-origin distro
local_overlay_enabled: False
series: impish
comment:
@ -38,12 +40,14 @@ relations:
applications:
keystone-mysql-router:
charm: cs:~openstack-charmers-next/mysql-router
charm: ch:mysql-router
channel: latest/edge
cinder-mysql-router:
charm: cs:~openstack-charmers-next/mysql-router
charm: ch:mysql-router
channel: latest/edge
mysql-innodb-cluster:
charm: cs:~openstack-charmers-next/mysql-innodb-cluster
charm: ch:mysql-innodb-cluster
num_units: 3
options:
source: *openstack-origin
@ -51,30 +55,33 @@ applications:
- '0'
- '1'
- '2'
channel: latest/edge
keystone:
charm: cs:~openstack-charmers-next/keystone
charm: ch:keystone
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '3'
channel: latest/edge
cinder:
charm: cs:~openstack-charmers-next/cinder
charm: ch:cinder
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '4'
channel: latest/edge
cinder-purestorage:
series: groovy
charm: ../../../cinder-purestorage
charm: ../../../cinder-purestorage.charm
options:
# Add config options here
driver-source: ppa:openstack-charmers/purestorage-stable
protocol: iscsi
volume-backend-name: cinder-pure
rabbitmq-server:
charm: cs:~openstack-charmers-next/rabbitmq-server
charm: ch:rabbitmq-server
num_units: 1
to:
- '5'
channel: latest/edge

View File

@ -1,6 +1,8 @@
variables:
openstack-origin: &openstack-origin distro
local_overlay_enabled: False
series: jammy
comment:
@ -38,12 +40,14 @@ relations:
applications:
keystone-mysql-router:
charm: cs:~openstack-charmers-next/mysql-router
charm: ch:mysql-router
channel: latest/edge
cinder-mysql-router:
charm: cs:~openstack-charmers-next/mysql-router
charm: ch:mysql-router
channel: latest/edge
mysql-innodb-cluster:
charm: cs:~openstack-charmers-next/mysql-innodb-cluster
charm: ch:mysql-innodb-cluster
num_units: 3
options:
source: *openstack-origin
@ -51,30 +55,33 @@ applications:
- '0'
- '1'
- '2'
channel: latest/edge
keystone:
charm: cs:~openstack-charmers-next/keystone
charm: ch:keystone
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '3'
channel: latest/edge
cinder:
charm: cs:~openstack-charmers-next/cinder
charm: ch:cinder
num_units: 1
options:
openstack-origin: *openstack-origin
to:
- '4'
channel: latest/edge
cinder-purestorage:
series: groovy
charm: ../../../cinder-purestorage
charm: ../../../cinder-purestorage.charm
options:
# Add config options here
driver-source: ppa:openstack-charmers/purestorage-stable
protocol: iscsi
volume-backend-name: cinder-pure
rabbitmq-server:
charm: cs:~openstack-charmers-next/rabbitmq-server
charm: ch:rabbitmq-server
num_units: 1
to:
- '5'
channel: latest/edge

View File

@ -6,24 +6,14 @@ tests:
configure:
- zaza.openstack.charm_tests.keystone.setup.add_demo_user
gate_bundles:
- bionic-queens
- bionic-stein
- bionic-ussuri
- focal-ussuri
- focal-victoria
- focal-wallaby
- focal-xena
- hirsute-wallaby
- impish-xena
smoke_bundles:
- focal-ussuri
- focal-xena
dev_bundles:
- bionic-rocky
- bionic-train
- focal-yoga
- jammy-yoga
tests_options:
force_deploy:
- hirsute-wallaby
- impish-xena
- jammy-yoga

View File

@ -28,6 +28,11 @@ oslo.utils<=3.41.0;python_version<'3.6'
requests>=2.18.4
charms.reactive
# Newer mock seems to have some syntax which is newer than python3.5 (e.g.
# f'{something}'
mock>=1.2,<4.0.0; python_version < '3.6'
mock>=1.2; python_version >= '3.6'
nose>=1.3.7
coverage>=3.6
git+https://github.com/openstack/charms.openstack.git#egg=charms.openstack
@ -46,3 +51,4 @@ pbr==5.6.0 # vault
cryptography<3.4 # vault, keystone-saml-mellon
lxml # keystone-saml-mellon
hvac # vault, barbican-vault
psutil # cinder-lvm

25
tox.ini
View File

@ -37,11 +37,24 @@ setenv = VIRTUAL_ENV={envdir}
passenv = http_proxy https_proxy INTERFACE_PATH LAYER_PATH JUJU_REPOSITORY
install_command =
{toxinidir}/pip.sh install {opts} {packages}
allowlist_externals =
charmcraft
bash
tox
rename.sh
deps =
-r{toxinidir}/requirements.txt
[testenv:build]
basepython = python3
deps = -r{toxinidir}/build-requirements.txt
commands =
charmcraft clean
charmcraft -v build
{toxinidir}/rename.sh
[testenv:build-reactive]
basepython = python3
commands =
charm-build --log-level DEBUG --use-lock-file-branches -o {toxinidir}/build/builds src {posargs}
@ -86,6 +99,18 @@ deps = flake8==3.9.2
charm-tools==2.8.3
commands = flake8 {posargs} src unit_tests
[testenv:func-target]
# Hack to get functional tests working in the charmcraft
# world. We should fix this.
basepython = python3
passenv = HOME TERM CS_* OS_* TEST_*
deps = -r{toxinidir}/src/test-requirements.txt
changedir = {toxinidir}/src
commands =
bash -c "if [ ! -f ../*.charm ]; then echo 'Charm does not exist. Run tox -e build'; exit 1; fi"
tox --version
tox -e func-target {posargs}
[testenv:cover]
# Technique based heavily upon
# https://github.com/openstack/nova/blob/master/tox.ini