Commit Graph

35 Commits

Author SHA1 Message Date
Alex Kavanagh 2b3865167c Updates for caracal tox.ini
Update the tox.ini file(s) to use the constraints file from
zaza-openstack-tests.

Change-Id: I3d29f7bc329dc8702469cc36ca01bc2c4f3bea5c
2024-02-24 20:11:06 +00:00
Liam Young 389c3919a4 Fix charm for tox4 compatibility
Related-Bug: 2002788
Change-Id: I3b662aa9c3026e85d088350d969e743a116401a4
2023-01-17 14:57:23 +00:00
Corey Bryant 6cc6006572 Build separately for each supported series and use binary builds
Charms for OpenStack Yoga supports both Ubuntu Focal and Jammy
which means Python 3.8 and Python 3.10.  Managing dependencies
across those two versions is non-trivial and we need to build
the charm on the series the charm is supposed to support.

Switch to using a binary build which allows pip's dependency
resolution to work.

Change-Id: I6ab47c1c94249c194bf55650e26737fefe5838b3
2022-09-27 17:31:32 +00:00
Corey Bryant 2c99cba7e0 Add Kinetic and Zed support
* sync charm-helpers to classic charms
* change openstack-origin/source default to zed
* align testing with zed
* add new zed bundles
* add zed bundles to tests.yaml
* add zed tests to osci.yaml and .zuul.yaml
* update build-on and run-on bases
* add bindep.txt for py310
* sync tox.ini and requirements.txt for ruamel
* use charmcraft_channel 2.0/stable
* drop reactive plugin overrides
* move interface/layer env vars to charmcraft.yaml

Change-Id: I054650d578c30b5c865cbd7a567eb5d7c8032d01
2022-08-31 18:48:39 +01:00
Alex Kavanagh 8415ded62a Updates to enable jammy and finalise charmcraft builds
- Add 22.04 to charmcraft.yaml
- Update metadata to include jammy
- Remove impish from metadata
- Update osci.yaml to include py3.10 default job
- Modify tox.ini to remove py35,py36,py37 tox target and add py310
  target.
- ensure that the openstack-origin is yoga

Change-Id: Ib993e07f73d694d9d0189dc55d6ab1e3c9d31938
2022-04-04 15:48:41 +01:00
Alex Kavanagh 9d5b82ebfb Update to build using charmcraft
Due to a build problem with the reactive plugin, this change falls back
on overriding the steps and doing a manual build, but it also ensures
the CI system builds the charm using charmcraft.  Changes:

- add a build-requirements.txt
- modify charmcraft.yaml
- modify osci.yaml
    -> indicate build with charmcraft
- modify tox.ini
    -> tox -e build does charmcraft build/rename
    -> tox -e build-reactive does the reactive build
- modify bundles to use the <charm>.charm artifact in tests.
  and fix deprecation warning re: prefix
- tox inception to enable tox -e func-test in the CI

Change-Id: I826947b1b358c4b04ba18135035292e135cce985
2022-02-01 18:29:11 +00:00
Corey Bryant 81bd8f7ef9 Additional test updates
* switch to release-specific zosci functional tests
* switch to yoga zosci unit test job
* add py39

Change-Id: I9e922e77175fb117a2d98a3c42f2cddfae0dc326
2021-11-17 14:45:54 -05:00
Alex Kavanagh 3ac1472fe6 Add xena bundles
- add non-voting focal-xena bundle
- add non-voting impish-xena bundle
- rebuild to pick up charm-helpers changes
- update tox/pip.sh to ensure setuptools<50.0.0

Change-Id: Icbc9877edc720792f9bb09d8b246d38748b5f5ba
2021-09-21 13:58:47 +01:00
Aurelien Lourot dbf5142802 Sync release-tools
In order to fix ResolutionImpossible on tox invocation.

https://github.com/openstack-charmers/release-tools/issues/151
https://github.com/openstack-charmers/release-tools/pull/152

Change-Id: Ib7f509be145966bbe09cbf1aff7b08923de10fe9
2021-07-22 14:51:27 +02:00
Alex Kavanagh 07b76d50e7 21.04 libraries freeze for charms on master branch
* charm-helpers sync for classic charms
* build.lock file for reactive charms
* ensure tox.ini is from release-tools
* ensure requirements.txt files are from release-tools
* On reactive charms:
  - ensure stable/21.04 branch for charms.openstack
  - ensure stable/21.04 branch for charm-helpers

Change-Id: I0f28e1e28ee9cb5712ef5b7b007903d317a5f61a
2021-04-03 20:20:30 +01:00
Alex Kavanagh c9095fbc01 Updates to pin charm-tools to 2.8.3
* Update requirements.txt to pin charm-tools to 2.8.3
* Update tox.ini to change the build parameters.
* This upgrades from <2.7 which adds reproducible charms
* Bug was fixed that controlled the default output directory
  doesn't get 'builds' appended.  The tox change puts it
  back so that stable & master both build to the same
  directory.  This may be reviewed in the future.

Change-Id: Ie41022bf94c69019799d87abf138228ff27dddb8
2021-02-17 12:06:51 +00:00
Alex Kavanagh f4ed57fc08 Sync libraries & common files prior to freeze
* charm-helpers sync for classic charms
* charms.ceph sync for ceph charms
* rebuild for reactive charms
* sync tox.ini files as needed
* sync requirements.txt files to sync to standard

Change-Id: Ic9b019feec791d33f45e71264f4649d60b75f958
2020-09-26 18:28:48 +01:00
Aurelien Lourot cccfdc343a Porting tests from Amulet to Zaza
Change-Id: I84fe9bbb195871f2e2a9caffc2c32253616ffd33
Func-Test-PR: https://github.com/openstack-charmers/zaza-openstack-tests/pull/240
Closes-Bug: #1828424
2020-04-20 14:46:34 +02:00
Ryan Beisner 1b6e560404
Sync charm/ceph helpers, tox, and requirements
Change-Id: Ib116be42e6ddebb747324470339c0f85b7fb0dbd
2019-09-30 22:41:22 -05:00
Camille Rodriguez 2f65734249 Add disco-stein bundle to gate tests
The bundle disco-stein was in the dev bundles because
a bug with the Python 3.7 syntax prevented the success of
the deployment of HA clusters. This bug is fixed, we can
reintegrate disco-stein in the gate bundles.

Other small additions:
- removing sitepackages in tox.ini to avoid test env pollution
- skip_missing_interpreters in tox.ini set to False to avoid false
positives by skipping missing interpreters.

LP Related-Bug: #1823718

Change-Id: Ie3d970ffde85b8f447ec7d2a95041ef59a747d8c
2019-09-02 10:47:23 -04:00
Corey Bryant 6d5218137f Add Python 3 Train unit tests
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.

See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Note that python35-charm-jobs is retained since this charm is supported
on Xenial.

Change-Id: I62dabc049b8730ad6a22e863c65136a82cc8e62c
Story: #2005924
Task: #34228
2019-07-30 10:17:00 -04:00
Pete Vander Giessen fac18726b7 Replace ostestr with stestr in testing framework.
A system upgrade broke ostestr. We can fix it by just calling stestr
directly.

Change-Id: Icface3ab69059083e172a4c16f721f783a5ff5e0
2019-03-07 17:00:58 -05:00
Paul Goins b9a6d50d50 Excluding unit_tests from coverage
Unit tests generally will all be executed, and measuring them will
skew the overall coverage numbers.  Thus, I'm excluding the unit_tests
folder.

Change-Id: Id819ecd1c02d82ef9ef41e95e1923801a13f6452
2019-03-01 15:03:20 +01:00
Paul Goins 78a0a9eb71 Added tox environment for gathering coverage
This technique was borrowed from the tox "cover" environment in
openstack/nova's tox.ini.  This leverages the fact that stestr lets
you override the python executable via the PYTHON environment
variable.  Doing this allows us to easily generate coverage for our
unit tests.

An important caveat is that this does not provide any coverage for
tests via zaza, amulet, etc.  It is purely focused on the unit tests.

Note that this replaces the previous .coveragerc; coverage
configuration is instead pulled from tox.ini.

Change-Id: I81c0bc6de21394540b67a954d0034af6ca96cfc5
2019-03-01 11:07:32 +01:00
Zuul aded798caa Merge "Add support for pluggable secrets backend" 2018-10-22 22:31:58 +00:00
Zuul 22628f2cbc Merge "Charm refresh" 2018-10-22 21:11:48 +00:00
Frode Nordahl fea4e7e77a
Add support for pluggable secrets backend
Secrets configuration will be provided from a subordinate charm
utilizing the barbican-secrets interface.

Switch to .stestr.conf

Depends-On: I9d52243ab0ccc60eade6c8023d9c5831a1637338
Change-Id: Ibac7465f30c9a6d3e838d38b80df4092b737251b
2018-10-22 07:36:39 +02:00
Frode Nordahl 3082897e9e
Charm refresh
At present the ``barbican`` charm is released as a Development /
Preview charm.

When it was first developed the upstream project had a separate
workflow for configuring Keystone authentication and authorization
which involved customization of the API paste configuration.

Since then the upstream project has gained support for standard
authentication and authorization configuration through the
``keystone_authtoken`` section in the configuration file.

We are bringing the charm into full support and do not want to
carry forward the legacy API paste configuration support, we also
want to integrate the charm with pluggable secrets support which
dependencies first are available in OpenStack ``rocky``.

Remove support for OpenStack versions prior to ``rocky``.

Remove surplus configuration options either provided through
charm layers or deemed unnecessary.

Change-Id: I4f0bbca5bbafa40d8bd6036a0743da642cab3d99
2018-10-22 07:34:59 +02:00
Doug Hellmann 6878cabac4 fix tox python3 overrides
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: I1f71d6641d4c9bf93266e75f5f39ba3297f89869
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:37:13 -04:00
Vu Cong Tuan ea5b7fe921 Add py36 testenv
Python 3.6 is installed by default in Ubuntu 18.04 LTS.
Therefore, according to Transition Plan [1],
it'll be handy to have py36 testenv.

For more details, please check Python2 Deprecation Timeline [2]
and Python3-first Goal - Completion Criteria [3].

[1] https://wiki.ubuntu.com/Python/Python36Transition
[2] https://governance.openstack.org/tc/resolutions/20180529-python2-deprecation-timeline.html
[3] https://review.openstack.org/#/c/575933/8/goals/stein/python3-first.rst@42

Change-Id: I48dfc9146c81c4f51031de1ffbe3b939fb0fcdd3
2018-06-28 08:45:40 +07:00
Ryan Beisner 75af1509af Update tox.ini for py27 requirement
Reactive source charms are Python3-only, but have py27 unit tests
declared in project-config.

The Tox tool recently changed behavior.  It used to pass when a tox
target was missing commands.  Now it fails in that case.

This commit places a py27 no-op shim to allow gate tests to pass,
effectively restoring the original behavior for these py3x-only repos.

Change-Id: I652ae850c2cb8de7103cfe41caa861751893e9da
Partial-Bug: 1642981
2016-11-28 18:20:54 -06:00
Ryan Beisner 5048222e3d Update tox.ini files from release-tools gold copy
All OpenStack Charms now contain identical tox.ini files,
not to be modified or made unique within each charm repo.

This is to ensure consistency across charm repos in tox
target naming, approach and purpose, also giving the
charm dev and test experience additional consistency.

Also create empty dirs with .keep files where necessary.
Some classic charms have actions and/or lib dirs, and some
do not. In all classic charms, flake will now check those
dirs to ensure lint coverage of existing or future content.

Rename bespoke amulet smoke test file name to standard.

Change-Id: I0ddef0f8bc000581fc8369e0b837c580b44e6a78
2016-09-08 23:10:13 +00:00
Ryan Beisner 88b5bd5490 Add .gitreview and clean up repo
Add src/README.md placeholder to prevent inheritence of the
lower layer readme file in the built charm.

Add src/tox.ini and test-requirements for Amulet prep.

Update metadata.yaml for series.

Update tox.ini to minimize and clarify pep8 ignores.

Resolve flake8/pbr test-requirements version range conflict.

Remove legacy lint and test targets from Makefile, ensuring
these tests will execute via tox.  Trusty test runners have
no py35 interpreter, and would have failed in running both
py34 and py35 in succession as it was defined.

Update src/layer.yaml repo value to point to official location
and remove unnecessary options.

Change-Id: Ia663fda7761dca6dc08583314f00beedf1db60cc
2016-08-03 18:54:57 +00:00
Alex Kavanagh 281e0a6896 Renamed barbican-hsm-plugin to barbican-hsm
The interface name has been changed, so this ripples it through the charm.
Also fixed the README, and ensured that tox.it has a pep8 target.
2016-07-13 15:42:33 +00:00
Alex Kavanagh 6d0248e9d9 Add barbican-hsm-plugin interface support
The barbican-hsm-plugin interface provides a mechanism for the Barbican
charm to communicate with an HSM plugin.  The plugin (from the Barbican
perspective) is provided as a PKCS#11 compliant library (.so) and so is
local to the Barbican installation.  Thus, the hsm-plugin charms are
subordinate to the Barbican charm and run on the same unit.

This change also provides two actions (generate-mkek and generate-hmac)
which are 'one-off' operations to initialise the HSM with the global
master keys.

Add a note to the README that the generate-mkek and generate-hmac
actions may only be done once as the HSM may reject overwriting the key.

Add Apache2.0 LICENSE and license headers to files
Removed redundant copyright file

Change the reference for the internal port to 9311 The barbican project
changed the INTERNAL port to the same as the PUBLIC port.

Add in seed_file and seed_length to template. These are needed for a
change in Barbican to support seeding the RNG in the HSM if required.
They are set to /dev/random and 32.

Fetch the barbican sources from a PPA (for bug: 1599550)

Remove the trusty support for Py3 from install hook
2016-07-12 12:35:51 +00:00
Alex Kavanagh 71f1af340f Make the charm Python3 compliant
These changes enable the charm code to work under Python2 and Python3.  All
reactive charms should be Python3 compliant.
2016-05-24 09:08:43 +00:00
Alex Kavanagh 1ea4507ced Initial unit_tests added - NOT FUNCTIONAL at this stage
This adds in the unit_test framework but there is a name collision
between charm.openstack as a module, and charm.openstack here which the
package loader can't resolve.  Therefore, going to change the
charm.openstack package to charms.openstack to avoid the collision.
2016-05-19 18:00:23 +00:00
Alex Kavanagh eac71d72cd Get charm to build
This is still missing the charm.openstack module dependency
2016-05-19 12:15:53 +00:00
Alex Kavanagh 43b577b75a Mod tox.ini so that it works with new build syntax 2016-05-18 14:32:41 +00:00
Liam Young 9989fd8cb3 Barbican charm build env 2015-12-11 10:32:58 +00:00