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: I7c695c77c67f43f02c72c3b50d949c451be53bc3
This commit is contained in:
parent
690d1d190c
commit
1c7f320cb6
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,6 +5,7 @@ bin
|
||||
tags
|
||||
*.sw[nop]
|
||||
*.pyc
|
||||
*.charm
|
||||
.unit-state.db
|
||||
trusty/
|
||||
xenial/
|
||||
|
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.
|
@ -6,9 +6,11 @@ parts:
|
||||
source: .
|
||||
prime:
|
||||
- actions/*
|
||||
- charmhelpers/*
|
||||
- files/*
|
||||
- hooks/*
|
||||
- lib/*
|
||||
- scripts/*
|
||||
- templates/*
|
||||
- actions.yaml
|
||||
- config.yaml
|
||||
|
@ -11,11 +11,16 @@
|
||||
voting: false
|
||||
- vault-jammy-yoga:
|
||||
voting: false
|
||||
vars:
|
||||
needs_charm_build: true
|
||||
charm_build_name: nova-cloud-controller
|
||||
build_type: charmcraft
|
||||
|
||||
- job:
|
||||
name: vault-focal-xena
|
||||
parent: func-target
|
||||
dependencies:
|
||||
- charm-build
|
||||
- osci-lint
|
||||
- tox-py38
|
||||
- tox-py39
|
||||
|
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
|
@ -69,7 +69,7 @@ applications:
|
||||
channel: latest/edge
|
||||
|
||||
nova-cloud-controller:
|
||||
charm: ../../../nova-cloud-controller
|
||||
charm: ../../nova-cloud-controller.charm
|
||||
num_units: 1
|
||||
options:
|
||||
openstack-origin: *openstack-origin
|
||||
@ -92,7 +92,7 @@ applications:
|
||||
neutron-security-groups: true
|
||||
to:
|
||||
- '5'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
keystone:
|
||||
charm: ch:keystone
|
||||
@ -101,7 +101,7 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '6'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
neutron-gateway:
|
||||
charm: ch:neutron-gateway
|
||||
@ -111,7 +111,7 @@ applications:
|
||||
bridge-mappings: physnet1:br-ex
|
||||
to:
|
||||
- '7'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
glance:
|
||||
charm: ch:glance
|
||||
@ -120,11 +120,11 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '8'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
neutron-openvswitch:
|
||||
charm: ch:neutron-openvswitch
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
placement:
|
||||
charm: ch:placement
|
||||
@ -133,7 +133,7 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '9'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
nova-compute:
|
||||
charm: ch:nova-compute
|
||||
@ -149,7 +149,7 @@ applications:
|
||||
to:
|
||||
- '10'
|
||||
- '11'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
vault:
|
||||
charm: ch:vault
|
||||
|
@ -69,7 +69,7 @@ applications:
|
||||
channel: latest/edge
|
||||
|
||||
nova-cloud-controller:
|
||||
charm: ../../../nova-cloud-controller
|
||||
charm: ../../nova-cloud-controller.charm
|
||||
num_units: 1
|
||||
options:
|
||||
openstack-origin: *openstack-origin
|
||||
@ -92,7 +92,7 @@ applications:
|
||||
neutron-security-groups: true
|
||||
to:
|
||||
- '5'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
keystone:
|
||||
charm: ch:keystone
|
||||
@ -101,7 +101,7 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '6'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
neutron-gateway:
|
||||
charm: ch:neutron-gateway
|
||||
@ -111,7 +111,7 @@ applications:
|
||||
bridge-mappings: physnet1:br-ex
|
||||
to:
|
||||
- '7'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
glance:
|
||||
charm: ch:glance
|
||||
@ -120,11 +120,11 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '8'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
neutron-openvswitch:
|
||||
charm: ch:neutron-openvswitch
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
placement:
|
||||
charm: ch:placement
|
||||
@ -133,7 +133,7 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '9'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
nova-compute:
|
||||
charm: ch:nova-compute
|
||||
@ -149,7 +149,7 @@ applications:
|
||||
to:
|
||||
- '10'
|
||||
- '11'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
vault:
|
||||
charm: ch:vault
|
||||
|
@ -69,7 +69,7 @@ applications:
|
||||
channel: latest/edge
|
||||
|
||||
nova-cloud-controller:
|
||||
charm: ../../../nova-cloud-controller
|
||||
charm: ../../nova-cloud-controller.charm
|
||||
num_units: 1
|
||||
options:
|
||||
openstack-origin: *openstack-origin
|
||||
@ -92,7 +92,7 @@ applications:
|
||||
neutron-security-groups: true
|
||||
to:
|
||||
- '5'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
keystone:
|
||||
charm: ch:keystone
|
||||
@ -101,7 +101,7 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '6'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
neutron-gateway:
|
||||
charm: ch:neutron-gateway
|
||||
@ -111,7 +111,7 @@ applications:
|
||||
bridge-mappings: physnet1:br-ex
|
||||
to:
|
||||
- '7'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
glance:
|
||||
charm: ch:glance
|
||||
@ -120,11 +120,11 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '8'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
neutron-openvswitch:
|
||||
charm: ch:neutron-openvswitch
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
placement:
|
||||
charm: ch:placement
|
||||
@ -133,7 +133,7 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '9'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
nova-compute:
|
||||
charm: ch:nova-compute
|
||||
@ -149,7 +149,7 @@ applications:
|
||||
to:
|
||||
- '10'
|
||||
- '11'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
vault:
|
||||
charm: ch:vault
|
||||
|
@ -69,7 +69,7 @@ applications:
|
||||
channel: latest/edge
|
||||
|
||||
nova-cloud-controller:
|
||||
charm: ../../../nova-cloud-controller
|
||||
charm: ../../nova-cloud-controller.charm
|
||||
num_units: 1
|
||||
options:
|
||||
openstack-origin: *openstack-origin
|
||||
@ -92,7 +92,7 @@ applications:
|
||||
neutron-security-groups: true
|
||||
to:
|
||||
- '5'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
keystone:
|
||||
charm: ch:keystone
|
||||
@ -101,7 +101,7 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '6'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
neutron-gateway:
|
||||
charm: ch:neutron-gateway
|
||||
@ -111,7 +111,7 @@ applications:
|
||||
bridge-mappings: physnet1:br-ex
|
||||
to:
|
||||
- '7'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
glance:
|
||||
charm: ch:glance
|
||||
@ -120,11 +120,11 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '8'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
neutron-openvswitch:
|
||||
charm: ch:neutron-openvswitch
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
placement:
|
||||
charm: ch:placement
|
||||
@ -133,7 +133,7 @@ applications:
|
||||
openstack-origin: *openstack-origin
|
||||
to:
|
||||
- '9'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
nova-compute:
|
||||
charm: ch:nova-compute
|
||||
@ -149,7 +149,7 @@ applications:
|
||||
to:
|
||||
- '10'
|
||||
- '11'
|
||||
channel: latest/edge
|
||||
channel: yoga/edge
|
||||
|
||||
vault:
|
||||
charm: ch:vault
|
||||
|
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…
Reference in New Issue
Block a user