Update to classic charms to build using charmcraft in CI
This update is to ensure that the Zuul Canonical CI builds the charm before functional tests and ensure that that artifact is used for the functional tests. This is to try to ensure that the charm that gets landed to the charmhub is the same charm that was tested with. Change-Id: I41b2b99a832879e786936f34937c6c876439e924
This commit is contained in:
parent
3d21ccf27f
commit
110fcddcf7
|
@ -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.
|
|
@ -10,10 +10,8 @@ parts:
|
||||||
- hooks/*
|
- hooks/*
|
||||||
- lib/*
|
- lib/*
|
||||||
- templates/*
|
- templates/*
|
||||||
- actions.yaml
|
|
||||||
- config.yaml
|
- config.yaml
|
||||||
- copyright
|
- copyright
|
||||||
- hardening.yaml
|
|
||||||
- icon.svg
|
- icon.svg
|
||||||
- LICENSE
|
- LICENSE
|
||||||
- Makefile
|
- Makefile
|
||||||
|
|
Binary file not shown.
|
@ -4,3 +4,7 @@
|
||||||
- charm-unit-jobs-py39
|
- charm-unit-jobs-py39
|
||||||
- charm-xena-functional-jobs
|
- charm-xena-functional-jobs
|
||||||
- charm-yoga-functional-jobs
|
- charm-yoga-functional-jobs
|
||||||
|
vars:
|
||||||
|
needs_charm_build: true
|
||||||
|
charm_build_name: cinder-backup
|
||||||
|
build_type: charmcraft
|
||||||
|
|
|
@ -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
|
|
@ -0,0 +1 @@
|
||||||
|
Dummy file to ensure build picks up templates dir
|
|
@ -13,11 +13,6 @@ setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb
|
||||||
|
|
||||||
requests>=2.18.4
|
requests>=2.18.4
|
||||||
|
|
||||||
# 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'
|
|
||||||
|
|
||||||
stestr>=2.2.0
|
stestr>=2.2.0
|
||||||
|
|
||||||
# Dependency of stestr. Workaround for
|
# Dependency of stestr. Workaround for
|
||||||
|
|
|
@ -54,7 +54,7 @@ applications:
|
||||||
openstack-origin: *openstack-origin
|
openstack-origin: *openstack-origin
|
||||||
to:
|
to:
|
||||||
- '3'
|
- '3'
|
||||||
channel: latest/edge
|
channel: yoga/edge
|
||||||
|
|
||||||
rabbitmq-server:
|
rabbitmq-server:
|
||||||
charm: ch:rabbitmq-server
|
charm: ch:rabbitmq-server
|
||||||
|
@ -73,7 +73,7 @@ applications:
|
||||||
- '5'
|
- '5'
|
||||||
- '6'
|
- '6'
|
||||||
- '7'
|
- '7'
|
||||||
channel: latest/edge
|
channel: quincy/edge
|
||||||
|
|
||||||
ceph-osd:
|
ceph-osd:
|
||||||
charm: ch:ceph-osd
|
charm: ch:ceph-osd
|
||||||
|
@ -87,7 +87,7 @@ applications:
|
||||||
- '8'
|
- '8'
|
||||||
- '9'
|
- '9'
|
||||||
- '10'
|
- '10'
|
||||||
channel: latest/edge
|
channel: quincy/edge
|
||||||
|
|
||||||
cinder:
|
cinder:
|
||||||
charm: ch:cinder
|
charm: ch:cinder
|
||||||
|
@ -98,10 +98,10 @@ applications:
|
||||||
openstack-origin: *openstack-origin
|
openstack-origin: *openstack-origin
|
||||||
to:
|
to:
|
||||||
- '11'
|
- '11'
|
||||||
channel: latest/edge
|
channel: yoga/edge
|
||||||
|
|
||||||
cinder-backup:
|
cinder-backup:
|
||||||
charm: ../../../cinder-backup
|
charm: ../../cinder-backup.charm
|
||||||
options:
|
options:
|
||||||
ceph-osd-replication-count: 3
|
ceph-osd-replication-count: 3
|
||||||
|
|
||||||
|
@ -109,21 +109,21 @@ applications:
|
||||||
charm: ch:cinder-ceph
|
charm: ch:cinder-ceph
|
||||||
options:
|
options:
|
||||||
ceph-osd-replication-count: 3
|
ceph-osd-replication-count: 3
|
||||||
channel: latest/edge
|
channel: yoga/edge
|
||||||
|
|
||||||
glance:
|
glance:
|
||||||
charm: ch:glance
|
charm: ch:glance
|
||||||
num_units: 1
|
num_units: 1
|
||||||
to:
|
to:
|
||||||
- '12'
|
- '12'
|
||||||
channel: latest/edge
|
channel: yoga/edge
|
||||||
|
|
||||||
nova-compute:
|
nova-compute:
|
||||||
charm: ch:nova-compute
|
charm: ch:nova-compute
|
||||||
num_units: 1
|
num_units: 1
|
||||||
to:
|
to:
|
||||||
- '13'
|
- '13'
|
||||||
channel: latest/edge
|
channel: yoga/edge
|
||||||
|
|
||||||
relations:
|
relations:
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ applications:
|
||||||
openstack-origin: *openstack-origin
|
openstack-origin: *openstack-origin
|
||||||
to:
|
to:
|
||||||
- '3'
|
- '3'
|
||||||
channel: latest/edge
|
channel: yoga/edge
|
||||||
|
|
||||||
rabbitmq-server:
|
rabbitmq-server:
|
||||||
charm: ch:rabbitmq-server
|
charm: ch:rabbitmq-server
|
||||||
|
@ -73,7 +73,7 @@ applications:
|
||||||
- '5'
|
- '5'
|
||||||
- '6'
|
- '6'
|
||||||
- '7'
|
- '7'
|
||||||
channel: latest/edge
|
channel: quincy/edge
|
||||||
|
|
||||||
ceph-osd:
|
ceph-osd:
|
||||||
charm: ch:ceph-osd
|
charm: ch:ceph-osd
|
||||||
|
@ -87,7 +87,7 @@ applications:
|
||||||
- '8'
|
- '8'
|
||||||
- '9'
|
- '9'
|
||||||
- '10'
|
- '10'
|
||||||
channel: latest/edge
|
channel: quincy/edge
|
||||||
|
|
||||||
cinder:
|
cinder:
|
||||||
charm: ch:cinder
|
charm: ch:cinder
|
||||||
|
@ -98,10 +98,10 @@ applications:
|
||||||
openstack-origin: *openstack-origin
|
openstack-origin: *openstack-origin
|
||||||
to:
|
to:
|
||||||
- '11'
|
- '11'
|
||||||
channel: latest/edge
|
channel: yoga/edge
|
||||||
|
|
||||||
cinder-backup:
|
cinder-backup:
|
||||||
charm: ../../../cinder-backup
|
charm: ../../cinder-backup.charm
|
||||||
options:
|
options:
|
||||||
ceph-osd-replication-count: 3
|
ceph-osd-replication-count: 3
|
||||||
|
|
||||||
|
@ -109,21 +109,21 @@ applications:
|
||||||
charm: ch:cinder-ceph
|
charm: ch:cinder-ceph
|
||||||
options:
|
options:
|
||||||
ceph-osd-replication-count: 3
|
ceph-osd-replication-count: 3
|
||||||
channel: latest/edge
|
channel: yoga/edge
|
||||||
|
|
||||||
glance:
|
glance:
|
||||||
charm: ch:glance
|
charm: ch:glance
|
||||||
num_units: 1
|
num_units: 1
|
||||||
to:
|
to:
|
||||||
- '12'
|
- '12'
|
||||||
channel: latest/edge
|
channel: yoga/edge
|
||||||
|
|
||||||
nova-compute:
|
nova-compute:
|
||||||
charm: ch:nova-compute
|
charm: ch:nova-compute
|
||||||
num_units: 1
|
num_units: 1
|
||||||
to:
|
to:
|
||||||
- '13'
|
- '13'
|
||||||
channel: latest/edge
|
channel: yoga/edge
|
||||||
|
|
||||||
relations:
|
relations:
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ applications:
|
||||||
openstack-origin: *openstack-origin
|
openstack-origin: *openstack-origin
|
||||||
to:
|
to:
|
||||||
- '3'
|
- '3'
|
||||||
channel: latest/edge
|
channel: yoga/edge
|
||||||
|
|
||||||
rabbitmq-server:
|
rabbitmq-server:
|
||||||
charm: ch:rabbitmq-server
|
charm: ch:rabbitmq-server
|
||||||
|
@ -73,7 +73,7 @@ applications:
|
||||||
- '5'
|
- '5'
|
||||||
- '6'
|
- '6'
|
||||||
- '7'
|
- '7'
|
||||||
channel: latest/edge
|
channel: quincy/edge
|
||||||
|
|
||||||
ceph-osd:
|
ceph-osd:
|
||||||
charm: ch:ceph-osd
|
charm: ch:ceph-osd
|
||||||
|
@ -87,7 +87,7 @@ applications:
|
||||||
- '8'
|
- '8'
|
||||||
- '9'
|
- '9'
|
||||||
- '10'
|
- '10'
|
||||||
channel: latest/edge
|
channel: quincy/edge
|
||||||
|
|
||||||
cinder:
|
cinder:
|
||||||
charm: ch:cinder
|
charm: ch:cinder
|
||||||
|
@ -98,10 +98,10 @@ applications:
|
||||||
openstack-origin: *openstack-origin
|
openstack-origin: *openstack-origin
|
||||||
to:
|
to:
|
||||||
- '11'
|
- '11'
|
||||||
channel: latest/edge
|
channel: yoga/edge
|
||||||
|
|
||||||
cinder-backup:
|
cinder-backup:
|
||||||
charm: ../../../cinder-backup
|
charm: ../../cinder-backup.charm
|
||||||
options:
|
options:
|
||||||
ceph-osd-replication-count: 3
|
ceph-osd-replication-count: 3
|
||||||
|
|
||||||
|
@ -109,21 +109,21 @@ applications:
|
||||||
charm: ch:cinder-ceph
|
charm: ch:cinder-ceph
|
||||||
options:
|
options:
|
||||||
ceph-osd-replication-count: 3
|
ceph-osd-replication-count: 3
|
||||||
channel: latest/edge
|
channel: yoga/edge
|
||||||
|
|
||||||
glance:
|
glance:
|
||||||
charm: ch:glance
|
charm: ch:glance
|
||||||
num_units: 1
|
num_units: 1
|
||||||
to:
|
to:
|
||||||
- '12'
|
- '12'
|
||||||
channel: latest/edge
|
channel: yoga/edge
|
||||||
|
|
||||||
nova-compute:
|
nova-compute:
|
||||||
charm: ch:nova-compute
|
charm: ch:nova-compute
|
||||||
num_units: 1
|
num_units: 1
|
||||||
to:
|
to:
|
||||||
- '13'
|
- '13'
|
||||||
channel: latest/edge
|
channel: yoga/edge
|
||||||
|
|
||||||
relations:
|
relations:
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ applications:
|
||||||
openstack-origin: *openstack-origin
|
openstack-origin: *openstack-origin
|
||||||
to:
|
to:
|
||||||
- '3'
|
- '3'
|
||||||
channel: latest/edge
|
channel: yoga/edge
|
||||||
|
|
||||||
rabbitmq-server:
|
rabbitmq-server:
|
||||||
charm: ch:rabbitmq-server
|
charm: ch:rabbitmq-server
|
||||||
|
@ -73,7 +73,7 @@ applications:
|
||||||
- '5'
|
- '5'
|
||||||
- '6'
|
- '6'
|
||||||
- '7'
|
- '7'
|
||||||
channel: latest/edge
|
channel: quincy/edge
|
||||||
|
|
||||||
ceph-osd:
|
ceph-osd:
|
||||||
charm: ch:ceph-osd
|
charm: ch:ceph-osd
|
||||||
|
@ -87,7 +87,7 @@ applications:
|
||||||
- '8'
|
- '8'
|
||||||
- '9'
|
- '9'
|
||||||
- '10'
|
- '10'
|
||||||
channel: latest/edge
|
channel: quincy/edge
|
||||||
|
|
||||||
cinder:
|
cinder:
|
||||||
charm: ch:cinder
|
charm: ch:cinder
|
||||||
|
@ -98,10 +98,10 @@ applications:
|
||||||
openstack-origin: *openstack-origin
|
openstack-origin: *openstack-origin
|
||||||
to:
|
to:
|
||||||
- '11'
|
- '11'
|
||||||
channel: latest/edge
|
channel: yoga/edge
|
||||||
|
|
||||||
cinder-backup:
|
cinder-backup:
|
||||||
charm: ../../../cinder-backup
|
charm: ../../cinder-backup.charm
|
||||||
options:
|
options:
|
||||||
ceph-osd-replication-count: 3
|
ceph-osd-replication-count: 3
|
||||||
|
|
||||||
|
@ -109,21 +109,21 @@ applications:
|
||||||
charm: ch:cinder-ceph
|
charm: ch:cinder-ceph
|
||||||
options:
|
options:
|
||||||
ceph-osd-replication-count: 3
|
ceph-osd-replication-count: 3
|
||||||
channel: latest/edge
|
channel: yoga/edge
|
||||||
|
|
||||||
glance:
|
glance:
|
||||||
charm: ch:glance
|
charm: ch:glance
|
||||||
num_units: 1
|
num_units: 1
|
||||||
to:
|
to:
|
||||||
- '12'
|
- '12'
|
||||||
channel: latest/edge
|
channel: yoga/edge
|
||||||
|
|
||||||
nova-compute:
|
nova-compute:
|
||||||
charm: ch:nova-compute
|
charm: ch:nova-compute
|
||||||
num_units: 1
|
num_units: 1
|
||||||
to:
|
to:
|
||||||
- '13'
|
- '13'
|
||||||
channel: latest/edge
|
channel: yoga/edge
|
||||||
|
|
||||||
relations:
|
relations:
|
||||||
|
|
||||||
|
|
12
tox.ini
12
tox.ini
|
@ -37,10 +37,20 @@ setenv = VIRTUAL_ENV={envdir}
|
||||||
install_command =
|
install_command =
|
||||||
{toxinidir}/pip.sh install {opts} {packages}
|
{toxinidir}/pip.sh install {opts} {packages}
|
||||||
commands = stestr run --slowest {posargs}
|
commands = stestr run --slowest {posargs}
|
||||||
allowlist_externals = juju
|
allowlist_externals =
|
||||||
|
charmcraft
|
||||||
|
rename.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
|
||||||
|
|
||||||
|
[testenv:build]
|
||||||
|
basepython = python3
|
||||||
|
deps = -r{toxinidir}/build-requirements.txt
|
||||||
|
commands =
|
||||||
|
charmcraft clean
|
||||||
|
charmcraft -v build
|
||||||
|
{toxinidir}/rename.sh
|
||||||
|
|
||||||
[testenv:py35]
|
[testenv:py35]
|
||||||
basepython = python3.5
|
basepython = python3.5
|
||||||
deps = -r{toxinidir}/requirements.txt
|
deps = -r{toxinidir}/requirements.txt
|
||||||
|
|
Loading…
Reference in New Issue