Add Antelope support
* sync charm-helpers to classic charms * change openstack-origin/source default to antelope * align testing with antelope * add new antelope bundles * add antelope bundles to tests.yaml * add antelope tests to osci.yaml and .zuul.yaml * update build-on and run-on bases Change-Id: Iba947a200a27463ea95ff600fc1bd68df97169c6
This commit is contained in:
parent
3756e8e4d7
commit
a3eb2876e7
4
bindep.txt
Normal file
4
bindep.txt
Normal file
@ -0,0 +1,4 @@
|
||||
libffi-dev [platform:dpkg]
|
||||
libpq-dev [platform:dpkg]
|
||||
libxml2-dev [platform:dpkg]
|
||||
libxslt1-dev [platform:dpkg]
|
@ -1,7 +0,0 @@
|
||||
# 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.
|
@ -2,32 +2,27 @@ 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/* .
|
||||
source: src/
|
||||
plugin: reactive
|
||||
build-snaps:
|
||||
- charm
|
||||
build-environment:
|
||||
- CHARM_INTERFACES_DIR: /root/project/interfaces/
|
||||
- CHARM_LAYERS_DIR: /root/project/layers/
|
||||
|
||||
bases:
|
||||
- build-on:
|
||||
- name: ubuntu
|
||||
channel: "20.04"
|
||||
channel: "22.04"
|
||||
architectures:
|
||||
- amd64
|
||||
run-on:
|
||||
- name: ubuntu
|
||||
channel: "20.04"
|
||||
architectures: [amd64, s390x, ppc64el, arm64]
|
||||
- name: ubuntu
|
||||
channel: "22.04"
|
||||
architectures: [amd64, s390x, ppc64el, arm64]
|
||||
- name: ubuntu
|
||||
channel: "22.10"
|
||||
architectures: [amd64, s390x, ppc64el, arm64]
|
||||
- name: ubuntu
|
||||
channel: "23.04"
|
||||
architectures: [amd64, s390x, ppc64el, arm64]
|
||||
|
17
osci.yaml
17
osci.yaml
@ -1,10 +1,21 @@
|
||||
- project:
|
||||
templates:
|
||||
- charm-unit-jobs-py38
|
||||
- charm-unit-jobs-py310
|
||||
- charm-xena-functional-jobs
|
||||
- charm-yoga-functional-jobs
|
||||
# Note(coreycb): Switch to non-voting until charm-lldpd supports jammy:
|
||||
# https://bugs.launchpad.net/charm-neutron-api-plugin-arista/+bug/2003771
|
||||
# - charm-functional-jobs
|
||||
check:
|
||||
jobs:
|
||||
- jammy-zed:
|
||||
voting: false
|
||||
- kinetic-zed:
|
||||
voting: false
|
||||
- jammy-antelope:
|
||||
voting: false
|
||||
- lunar-antelope:
|
||||
voting: false
|
||||
vars:
|
||||
needs_charm_build: true
|
||||
charm_build_name: neutron-api-plugin-arista
|
||||
build_type: charmcraft
|
||||
charmcraft_channel: 2.1/stable
|
||||
|
18
pip.sh
18
pip.sh
@ -1,18 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# This file is managed centrally by release-tools and should not be modified
|
||||
# within individual charm repos. See the 'global' dir contents for available
|
||||
# choices of tox.ini for OpenStack Charms:
|
||||
# https://github.com/openstack-charmers/release-tools
|
||||
#
|
||||
# setuptools 58.0 dropped the support for use_2to3=true which is needed to
|
||||
# install blessings (an indirect dependency of charm-tools).
|
||||
#
|
||||
# More details on the beahvior of tox and virtualenv creation can be found at
|
||||
# https://github.com/tox-dev/tox/issues/448
|
||||
#
|
||||
# This script is wrapper to force the use of the pinned versions early in the
|
||||
# process when the virtualenv was created and upgraded before installing the
|
||||
# depedencies declared in the target.
|
||||
pip install 'pip<20.3' 'setuptools<50.0.0'
|
||||
pip "$@"
|
@ -9,8 +9,9 @@ tags:
|
||||
- networking
|
||||
subordinate: true
|
||||
series:
|
||||
- focal
|
||||
- jammy
|
||||
- kinetic
|
||||
- lunar
|
||||
provides:
|
||||
neutron-plugin-api-subordinate:
|
||||
interface: neutron-plugin-api-subordinate
|
||||
|
@ -4,9 +4,6 @@
|
||||
# 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
|
||||
|
@ -1,9 +1,9 @@
|
||||
variables:
|
||||
openstack-origin: &openstack-origin cloud:focal-yoga
|
||||
openstack-origin: &openstack-origin cloud:jammy-antelope
|
||||
|
||||
local_overlay_enabled: False
|
||||
|
||||
series: &series focal
|
||||
series: &series jammy
|
||||
|
||||
applications:
|
||||
|
||||
@ -130,6 +130,7 @@ applications:
|
||||
short-name: true
|
||||
|
||||
arista-virt-test-fixture:
|
||||
series: focal
|
||||
charm: cs:~openstack-charmers-next/arista-virt-test-fixture
|
||||
num_units: 1
|
||||
constraints: mem=4G
|
@ -1,9 +1,9 @@
|
||||
variables:
|
||||
openstack-origin: &openstack-origin cloud:focal-xena
|
||||
openstack-origin: &openstack-origin cloud:jammy-zed
|
||||
|
||||
local_overlay_enabled: False
|
||||
|
||||
series: &series focal
|
||||
series: &series jammy
|
||||
|
||||
applications:
|
||||
|
||||
@ -130,6 +130,7 @@ applications:
|
||||
short-name: true
|
||||
|
||||
arista-virt-test-fixture:
|
||||
series: focal
|
||||
charm: cs:~openstack-charmers-next/arista-virt-test-fixture
|
||||
num_units: 1
|
||||
constraints: mem=4G
|
@ -3,7 +3,7 @@ variables:
|
||||
|
||||
local_overlay_enabled: False
|
||||
|
||||
series: &series impish
|
||||
series: &series kinetic
|
||||
|
||||
applications:
|
||||
|
@ -3,7 +3,7 @@ variables:
|
||||
|
||||
local_overlay_enabled: False
|
||||
|
||||
series: &series jammy
|
||||
series: &series lunar
|
||||
|
||||
applications:
|
||||
|
@ -1 +0,0 @@
|
||||
arista-virt-test-fixture-image.yaml.j2
|
@ -1 +0,0 @@
|
||||
arista-virt-test-fixture-image.yaml.j2
|
@ -1 +0,0 @@
|
||||
arista-virt-test-fixture-image.yaml.j2
|
@ -1 +0,0 @@
|
||||
arista-virt-test-fixture-image.yaml.j2
|
@ -1 +0,0 @@
|
||||
arista-virt-test-fixture-image.yaml.j2
|
@ -1 +0,0 @@
|
||||
arista-virt-test-fixture-image.yaml.j2
|
@ -1 +0,0 @@
|
||||
arista-virt-test-fixture-image.yaml.j2
|
@ -1 +0,0 @@
|
||||
arista-virt-test-fixture-image.yaml.j2
|
@ -1 +0,0 @@
|
||||
arista-virt-test-fixture-image.yaml.j2
|
@ -1 +0,0 @@
|
||||
arista-virt-test-fixture-image.yaml.j2
|
@ -1,15 +1,15 @@
|
||||
charm_name: neutron-api-plugin-arista
|
||||
|
||||
smoke_bundles:
|
||||
- focal-xena
|
||||
- jammy-zed
|
||||
|
||||
gate_bundles:
|
||||
- focal-xena
|
||||
- impish-xena
|
||||
- jammy-zed
|
||||
|
||||
dev_bundles:
|
||||
- focal-yoga
|
||||
- jammy-yoga
|
||||
- jammy-antelope
|
||||
- kinetic-zed
|
||||
- lunar-antelope
|
||||
|
||||
before_deploy:
|
||||
- zaza.openstack.charm_tests.neutron_arista.setup.download_arista_image
|
||||
@ -22,5 +22,7 @@ tests:
|
||||
|
||||
tests_options:
|
||||
force_deploy:
|
||||
- impish-xena
|
||||
- jammy-yoga
|
||||
- jammy-zed
|
||||
- jammy-antelope
|
||||
- kinetic-zed
|
||||
- lunar-antelope
|
||||
|
26
src/tox.ini
26
src/tox.ini
@ -6,32 +6,26 @@
|
||||
|
||||
[tox]
|
||||
envlist = pep8
|
||||
skipsdist = True
|
||||
# NOTE: Avoid build/test env pollution by not enabling sitepackages.
|
||||
sitepackages = False
|
||||
# NOTE: Avoid false positives by not skipping missing interpreters.
|
||||
skip_missing_interpreters = False
|
||||
# NOTES:
|
||||
# * We avoid the new dependency resolver by pinning pip < 20.3, see
|
||||
# https://github.com/pypa/pip/issues/9187
|
||||
# * Pinning dependencies requires tox >= 3.2.0, see
|
||||
# https://tox.readthedocs.io/en/latest/config.html#conf-requires
|
||||
# * It is also necessary to pin virtualenv as a newer virtualenv would still
|
||||
# lead to fetching the latest pip in the func* tox targets, see
|
||||
# https://stackoverflow.com/a/38133283
|
||||
requires = pip < 20.3
|
||||
virtualenv < 20.0
|
||||
# NOTE: https://wiki.canonical.com/engineering/OpenStack/InstallLatestToxOnOsci
|
||||
minversion = 3.18.0
|
||||
|
||||
[testenv]
|
||||
# We use tox mainly for virtual environment management for test requirements
|
||||
# and do not install the charm code as a Python package into that environment.
|
||||
# Ref: https://tox.wiki/en/latest/config.html#skip_install
|
||||
skip_install = True
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
PYTHONHASHSEED=0
|
||||
allowlist_externals = juju
|
||||
passenv = HOME TERM CS_* OS_* TEST_*
|
||||
passenv =
|
||||
HOME
|
||||
TERM
|
||||
CS_*
|
||||
OS_*
|
||||
TEST_*
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
install_command =
|
||||
pip install {opts} {packages}
|
||||
|
||||
[testenv:pep8]
|
||||
basepython = python3
|
||||
|
73
tox.ini
73
tox.ini
@ -5,53 +5,49 @@
|
||||
# https://github.com/openstack-charmers/release-tools
|
||||
|
||||
[tox]
|
||||
skipsdist = True
|
||||
envlist = pep8,py3
|
||||
# NOTE: Avoid build/test env pollution by not enabling sitepackages.
|
||||
sitepackages = False
|
||||
# NOTE: Avoid false positives by not skipping missing interpreters.
|
||||
skip_missing_interpreters = False
|
||||
# NOTES:
|
||||
# * We avoid the new dependency resolver by pinning pip < 20.3, see
|
||||
# https://github.com/pypa/pip/issues/9187
|
||||
# * Pinning dependencies requires tox >= 3.2.0, see
|
||||
# https://tox.readthedocs.io/en/latest/config.html#conf-requires
|
||||
# * It is also necessary to pin virtualenv as a newer virtualenv would still
|
||||
# lead to fetching the latest pip in the func* tox targets, see
|
||||
# https://stackoverflow.com/a/38133283
|
||||
requires =
|
||||
pip < 20.3
|
||||
virtualenv < 20.0
|
||||
setuptools<50.0.0
|
||||
|
||||
# NOTE: https://wiki.canonical.com/engineering/OpenStack/InstallLatestToxOnOsci
|
||||
minversion = 3.18.0
|
||||
|
||||
[testenv]
|
||||
# We use tox mainly for virtual environment management for test requirements
|
||||
# and do not install the charm code as a Python package into that environment.
|
||||
# Ref: https://tox.wiki/en/latest/config.html#skip_install
|
||||
skip_install = True
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
PYTHONHASHSEED=0
|
||||
TERM=linux
|
||||
LAYER_PATH={toxinidir}/layers
|
||||
INTERFACE_PATH={toxinidir}/interfaces
|
||||
CHARM_LAYERS_DIR={toxinidir}/layers
|
||||
CHARM_INTERFACES_DIR={toxinidir}/interfaces
|
||||
JUJU_REPOSITORY={toxinidir}/build
|
||||
passenv = http_proxy https_proxy INTERFACE_PATH LAYER_PATH JUJU_REPOSITORY
|
||||
install_command =
|
||||
{toxinidir}/pip.sh install {opts} {packages}
|
||||
passenv =
|
||||
no_proxy
|
||||
http_proxy
|
||||
https_proxy
|
||||
CHARM_INTERFACES_DIR
|
||||
CHARM_LAYERS_DIR
|
||||
JUJU_REPOSITORY
|
||||
allowlist_externals =
|
||||
charmcraft
|
||||
bash
|
||||
tox
|
||||
rename.sh
|
||||
{toxinidir}/rename.sh
|
||||
deps =
|
||||
-r{toxinidir}/requirements.txt
|
||||
|
||||
[testenv:build]
|
||||
basepython = python3
|
||||
deps = -r{toxinidir}/build-requirements.txt
|
||||
# charmcraft clean is done to ensure that
|
||||
# `tox -e build` always performs a clean, repeatable build.
|
||||
# For faster rebuilds during development,
|
||||
# directly run `charmcraft -v pack && ./rename.sh`.
|
||||
commands =
|
||||
charmcraft clean
|
||||
charmcraft -v build
|
||||
charmcraft -v pack
|
||||
{toxinidir}/rename.sh
|
||||
charmcraft clean
|
||||
|
||||
[testenv:build-reactive]
|
||||
basepython = python3
|
||||
@ -68,21 +64,6 @@ basepython = python3
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
commands = stestr run --slowest {posargs}
|
||||
|
||||
[testenv:py36]
|
||||
basepython = python3.6
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
commands = stestr run --slowest {posargs}
|
||||
|
||||
[testenv:py38]
|
||||
basepython = python3.8
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
commands = stestr run --slowest {posargs}
|
||||
|
||||
[testenv:py39]
|
||||
basepython = python3.9
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
commands = stestr run --slowest {posargs}
|
||||
|
||||
[testenv:py310]
|
||||
basepython = python3.10
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
@ -91,21 +72,9 @@ commands = stestr run --slowest {posargs}
|
||||
[testenv:pep8]
|
||||
basepython = python3
|
||||
deps = flake8==3.9.2
|
||||
charm-tools==2.8.3
|
||||
git+https://github.com/juju/charm-tools.git
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user