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: I4ebaac856ddda643804454288961924c1c256aa9
This commit is contained in:
parent
127d176b2b
commit
ecceb52f33
|
@ -1,5 +1,6 @@
|
|||
bin/
|
||||
*.pyc
|
||||
*.charm
|
||||
.tox
|
||||
.testrepository
|
||||
.coverage
|
||||
|
|
|
@ -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,6 +6,7 @@ parts:
|
|||
source: .
|
||||
prime:
|
||||
- actions/*
|
||||
- charmhelpers/*
|
||||
- files/*
|
||||
- hooks/*
|
||||
- lib/*
|
||||
|
@ -13,7 +14,6 @@ parts:
|
|||
- actions.yaml
|
||||
- config.yaml
|
||||
- copyright
|
||||
- hardening.yaml
|
||||
- icon.svg
|
||||
- LICENSE
|
||||
- Makefile
|
||||
|
|
|
@ -4,3 +4,7 @@
|
|||
- charm-unit-jobs-py39
|
||||
- charm-xena-functional-jobs
|
||||
- charm-yoga-functional-jobs
|
||||
vars:
|
||||
needs_charm_build: true
|
||||
charm_build_name: hacluster
|
||||
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
|
|
@ -22,4 +22,3 @@ dnspython<2.0.0; python_version < '3.6'
|
|||
dnspython; python_version >= '3.6'
|
||||
|
||||
psutil>=1.1.1,<2.0.0
|
||||
cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35.
|
||||
|
|
|
@ -41,5 +41,3 @@ git+https://opendev.org/openstack/tempest.git#egg=tempest;python_version>='3.6'
|
|||
tempest<24.0.0;python_version<'3.6'
|
||||
|
||||
croniter # needed for charm-rabbitmq-server unit tests
|
||||
pyparsing<3.0.0 # but cffi needs it, so pin here.
|
||||
cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35.
|
||||
|
|
|
@ -44,7 +44,7 @@ applications:
|
|||
channel: latest/edge
|
||||
|
||||
hacluster:
|
||||
charm: ../../../hacluster
|
||||
charm: ../../hacluster.charm
|
||||
subordinate-to:
|
||||
- keystone
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ applications:
|
|||
channel: latest/edge
|
||||
|
||||
hacluster:
|
||||
charm: ../../../hacluster
|
||||
charm: ../../hacluster.charm
|
||||
subordinate-to:
|
||||
- keystone
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ applications:
|
|||
channel: latest/edge
|
||||
|
||||
hacluster:
|
||||
charm: ../../../hacluster
|
||||
charm: ../../hacluster.charm
|
||||
subordinate-to:
|
||||
- keystone
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ applications:
|
|||
channel: latest/edge
|
||||
|
||||
hacluster:
|
||||
charm: ../../../hacluster
|
||||
charm: ../../hacluster.charm
|
||||
subordinate-to:
|
||||
- keystone
|
||||
|
||||
|
|
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