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: I83118e15ff91480370182b404b3d3b7d24b5c67c
This commit is contained in:
parent
a5e0c6ed99
commit
c3e89c09bd
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,6 +5,7 @@
|
||||
.stestr
|
||||
bin
|
||||
*.sw[nop]
|
||||
*.charm
|
||||
*.pyc
|
||||
.unit-state.db
|
||||
.idea
|
||||
|
7
build-requirements.txt
Normal file
7
build-requirements.txt
Normal 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.
|
@ -4,3 +4,7 @@
|
||||
- charm-unit-jobs-py39
|
||||
- charm-xena-functional-jobs
|
||||
- charm-yoga-functional-jobs
|
||||
vars:
|
||||
needs_charm_build: true
|
||||
charm_build_name: ceph-osd
|
||||
build_type: charmcraft
|
||||
|
13
rename.sh
Executable file
13
rename.sh
Executable 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
|
@ -22,6 +22,3 @@ dnspython<2.0.0; python_version < '3.6'
|
||||
dnspython; python_version >= '3.6'
|
||||
|
||||
psutil>=1.1.1,<2.0.0
|
||||
|
||||
# cffi 1.15.0 drops support for py35
|
||||
cffi==1.14.6; python_version < '3.6'
|
||||
|
@ -13,7 +13,6 @@ setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb
|
||||
|
||||
requests>=2.18.4
|
||||
|
||||
flake8>=2.2.4,<=2.4.1
|
||||
stestr>=2.2.0
|
||||
|
||||
# Dependency of stestr. Workaround for
|
||||
|
@ -56,7 +56,7 @@ applications:
|
||||
channel: latest/edge
|
||||
|
||||
ceph-osd:
|
||||
charm: ../../../ceph-osd
|
||||
charm: ../../ceph-osd.charm
|
||||
num_units: 3
|
||||
storage:
|
||||
osd-devices: 'cinder,10G'
|
||||
@ -78,7 +78,7 @@ applications:
|
||||
- '6'
|
||||
- '7'
|
||||
- '8'
|
||||
channel: latest/edge
|
||||
channel: quincy/edge
|
||||
|
||||
rabbitmq-server:
|
||||
charm: ch:rabbitmq-server
|
||||
@ -97,7 +97,7 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '10'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
nova-compute:
|
||||
charm: ch:nova-compute
|
||||
@ -106,7 +106,7 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '11'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
glance:
|
||||
expose: True
|
||||
@ -116,7 +116,7 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '12'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
cinder:
|
||||
expose: True
|
||||
@ -128,11 +128,11 @@ applications:
|
||||
glance-api-version: '2'
|
||||
to:
|
||||
- '13'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
cinder-ceph:
|
||||
charm: ch:cinder-ceph
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
nova-cloud-controller:
|
||||
expose: True
|
||||
@ -142,7 +142,7 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '14'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
placement:
|
||||
charm: ch:placement
|
||||
@ -151,7 +151,7 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '15'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
relations:
|
||||
- - 'nova-compute:amqp'
|
||||
|
@ -56,7 +56,7 @@ applications:
|
||||
channel: latest/edge
|
||||
|
||||
ceph-osd:
|
||||
charm: ../../../ceph-osd
|
||||
charm: ../../ceph-osd.charm
|
||||
num_units: 3
|
||||
storage:
|
||||
osd-devices: 'cinder,10G'
|
||||
@ -78,7 +78,7 @@ applications:
|
||||
- '6'
|
||||
- '7'
|
||||
- '8'
|
||||
channel: latest/edge
|
||||
channel: quincy/edge
|
||||
|
||||
rabbitmq-server:
|
||||
charm: ch:rabbitmq-server
|
||||
@ -97,7 +97,7 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '10'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
nova-compute:
|
||||
charm: ch:nova-compute
|
||||
@ -106,7 +106,7 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '11'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
glance:
|
||||
expose: True
|
||||
@ -116,7 +116,7 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '12'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
cinder:
|
||||
expose: True
|
||||
@ -128,11 +128,11 @@ applications:
|
||||
glance-api-version: '2'
|
||||
to:
|
||||
- '13'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
cinder-ceph:
|
||||
charm: ch:cinder-ceph
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
nova-cloud-controller:
|
||||
expose: True
|
||||
@ -142,7 +142,7 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '14'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
placement:
|
||||
charm: ch:placement
|
||||
@ -151,7 +151,7 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '15'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
relations:
|
||||
- - 'nova-compute:amqp'
|
||||
|
@ -56,7 +56,7 @@ applications:
|
||||
channel: latest/edge
|
||||
|
||||
ceph-osd:
|
||||
charm: ../../../ceph-osd
|
||||
charm: ../../ceph-osd.charm
|
||||
num_units: 3
|
||||
storage:
|
||||
osd-devices: 'cinder,10G'
|
||||
@ -78,7 +78,7 @@ applications:
|
||||
- '6'
|
||||
- '7'
|
||||
- '8'
|
||||
channel: latest/edge
|
||||
channel: quincy/edge
|
||||
|
||||
rabbitmq-server:
|
||||
charm: ch:rabbitmq-server
|
||||
@ -97,7 +97,7 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '10'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
nova-compute:
|
||||
charm: ch:nova-compute
|
||||
@ -106,7 +106,7 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '11'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
glance:
|
||||
expose: True
|
||||
@ -116,7 +116,7 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '12'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
cinder:
|
||||
expose: True
|
||||
@ -128,11 +128,11 @@ applications:
|
||||
glance-api-version: '2'
|
||||
to:
|
||||
- '13'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
cinder-ceph:
|
||||
charm: ch:cinder-ceph
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
nova-cloud-controller:
|
||||
expose: True
|
||||
@ -142,7 +142,7 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '14'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
placement:
|
||||
charm: ch:placement
|
||||
@ -151,7 +151,7 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '15'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
relations:
|
||||
- - 'nova-compute:amqp'
|
||||
|
@ -56,7 +56,7 @@ applications:
|
||||
channel: latest/edge
|
||||
|
||||
ceph-osd:
|
||||
charm: ../../../ceph-osd
|
||||
charm: ../../ceph-osd.charm
|
||||
num_units: 3
|
||||
storage:
|
||||
osd-devices: 'cinder,10G'
|
||||
@ -78,7 +78,7 @@ applications:
|
||||
- '6'
|
||||
- '7'
|
||||
- '8'
|
||||
channel: latest/edge
|
||||
channel: quincy/edge
|
||||
|
||||
rabbitmq-server:
|
||||
charm: ch:rabbitmq-server
|
||||
@ -97,7 +97,7 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '10'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
nova-compute:
|
||||
charm: ch:nova-compute
|
||||
@ -106,7 +106,7 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '11'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
glance:
|
||||
expose: True
|
||||
@ -116,7 +116,7 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '12'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
cinder:
|
||||
expose: True
|
||||
@ -128,11 +128,11 @@ applications:
|
||||
glance-api-version: '2'
|
||||
to:
|
||||
- '13'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
cinder-ceph:
|
||||
charm: ch:cinder-ceph
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
nova-cloud-controller:
|
||||
expose: True
|
||||
@ -142,7 +142,7 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '14'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
placement:
|
||||
charm: ch:placement
|
||||
@ -151,7 +151,7 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '15'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
relations:
|
||||
- - 'nova-compute:amqp'
|
||||
|
12
tox.ini
12
tox.ini
@ -37,10 +37,20 @@ setenv = VIRTUAL_ENV={envdir}
|
||||
install_command =
|
||||
{toxinidir}/pip.sh install {opts} {packages}
|
||||
commands = stestr run --slowest {posargs}
|
||||
allowlist_externals = juju
|
||||
allowlist_externals =
|
||||
charmcraft
|
||||
rename.sh
|
||||
passenv = HOME TERM CS_* OS_* TEST_*
|
||||
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]
|
||||
basepython = python3.5
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
|
Loading…
x
Reference in New Issue
Block a user