diff --git a/.zuul.yaml b/.zuul.yaml index fd20909..c7bcc8a 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -2,3 +2,8 @@ templates: - openstack-python3-charm-jobs - openstack-cover-jobs + check: + jobs: + - charmbuild + vars: + charm_build_name: barbican diff --git a/charmcraft.yaml b/charmcraft.yaml index 953004e..4d59dd9 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -19,36 +19,18 @@ parts: build-environment: - CHARM_INTERFACES_DIR: $CRAFT_PROJECT_DIR/interfaces/ - CHARM_LAYERS_DIR: $CRAFT_PROJECT_DIR/layers/ -bases: - - build-on: - - name: ubuntu - channel: "22.04" - architectures: [amd64] - run-on: - - name: ubuntu - channel: "22.04" - architectures: [amd64] - - build-on: - - name: ubuntu - channel: "22.04" - architectures: [s390x] - run-on: - - name: ubuntu - channel: "22.04" - architectures: [s390x] - - build-on: - - name: ubuntu - channel: "22.04" - architectures: [ppc64el] - run-on: - - name: ubuntu - channel: "22.04" - architectures: [ppc64el] - - build-on: - - name: ubuntu - channel: "22.04" - architectures: [arm64] - run-on: - - name: ubuntu - channel: "22.04" - architectures: [arm64] + +base: ubuntu@24.04 +platforms: + amd64: + build-on: amd64 + build-for: amd64 + arm64: + build-on: arm64 + build-for: arm64 + ppc64el: + build-on: ppc64el + build-for: ppc64el + s390x: + build-on: s390x + build-for: s390x diff --git a/osci.yaml b/osci.yaml index aa86e8b..9979ea8 100644 --- a/osci.yaml +++ b/osci.yaml @@ -6,4 +6,4 @@ needs_charm_build: true charm_build_name: barbican build_type: charmcraft - charmcraft_channel: 2.x/stable + charmcraft_channel: 3.x/stable diff --git a/rename.sh b/rename.sh new file mode 100755 index 0000000..d0c35c9 --- /dev/null +++ b/rename.sh @@ -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 diff --git a/requirements.txt b/requirements.txt index c5b8af3..e43a6ea 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,7 +13,5 @@ # * https://mail.python.org/pipermail/cryptography-dev/2021-January/001003.html # cryptography<3.4 - git+https://github.com/juju/charm-tools.git - simplejson diff --git a/src/config.yaml b/src/config.yaml index 1097fb3..a52f345 100644 --- a/src/config.yaml +++ b/src/config.yaml @@ -45,7 +45,7 @@ options: description: | Maximum allowed http request size against the barbican-api. openstack-origin: - default: bobcat + default: caracal use-internal-endpoints: default: True type: boolean diff --git a/src/metadata.yaml b/src/metadata.yaml index 8d37cfd..59d3583 100644 --- a/src/metadata.yaml +++ b/src/metadata.yaml @@ -7,8 +7,6 @@ description: | being useful for all environments, including large ephemeral Clouds tags: - openstack -series: - - jammy subordinate: false requires: shared-db: diff --git a/src/tests/bundles/jammy-antelope.yaml b/src/tests/bundles/jammy-antelope.yaml deleted file mode 100644 index d4799c1..0000000 --- a/src/tests/bundles/jammy-antelope.yaml +++ /dev/null @@ -1,81 +0,0 @@ -variables: - openstack-origin: &openstack-origin cloud:jammy-antelope - -local_overlay_enabled: False - -series: &series jammy - -machines: - '0': - constraints: mem=3072M - '1': - constraints: mem=3072M - '2': - constraints: mem=3072M - '3': - '4': - '5': - -applications: - - keystone-mysql-router: - charm: ch:mysql-router - channel: latest/edge - barbican-mysql-router: - charm: ch:mysql-router - channel: latest/edge - - mysql-innodb-cluster: - charm: ch:mysql-innodb-cluster - num_units: 3 - options: - source: *openstack-origin - to: - - '0' - - '1' - - '2' - channel: latest/edge - - keystone: - charm: ch:keystone - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '3' - channel: 2024.1/edge - - barbican: - series: *series - charm: ../../../barbican_ubuntu-22.04-amd64.charm - num_units: 1 - options: - openstack-origin: *openstack-origin - debug: true - to: - - '4' - - rabbitmq-server: - charm: ch:rabbitmq-server - num_units: 1 - to: - - '5' - channel: latest/edge - -relations: - - - - 'keystone:shared-db' - - 'keystone-mysql-router:shared-db' - - - 'keystone-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'barbican:shared-db' - - 'barbican-mysql-router:shared-db' - - - 'barbican-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'keystone:identity-service' - - 'barbican:identity-service' - - - - 'rabbitmq-server:amqp' - - 'barbican:amqp' diff --git a/src/tests/bundles/jammy-bobcat.yaml b/src/tests/bundles/jammy-bobcat.yaml deleted file mode 100644 index 226304c..0000000 --- a/src/tests/bundles/jammy-bobcat.yaml +++ /dev/null @@ -1,81 +0,0 @@ -variables: - openstack-origin: &openstack-origin cloud:jammy-bobcat - -local_overlay_enabled: False - -series: &series jammy - -machines: - '0': - constraints: mem=3072M - '1': - constraints: mem=3072M - '2': - constraints: mem=3072M - '3': - '4': - '5': - -applications: - - keystone-mysql-router: - charm: ch:mysql-router - channel: latest/edge - barbican-mysql-router: - charm: ch:mysql-router - channel: latest/edge - - mysql-innodb-cluster: - charm: ch:mysql-innodb-cluster - num_units: 3 - options: - source: *openstack-origin - to: - - '0' - - '1' - - '2' - channel: latest/edge - - keystone: - charm: ch:keystone - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '3' - channel: 2024.1/edge - - barbican: - series: *series - charm: ../../../barbican_ubuntu-22.04-amd64.charm - num_units: 1 - options: - openstack-origin: *openstack-origin - debug: true - to: - - '4' - - rabbitmq-server: - charm: ch:rabbitmq-server - num_units: 1 - to: - - '5' - channel: latest/edge - -relations: - - - - 'keystone:shared-db' - - 'keystone-mysql-router:shared-db' - - - 'keystone-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'barbican:shared-db' - - 'barbican-mysql-router:shared-db' - - - 'barbican-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'keystone:identity-service' - - 'barbican:identity-service' - - - - 'rabbitmq-server:amqp' - - 'barbican:amqp' diff --git a/src/tests/bundles/jammy-caracal.yaml b/src/tests/bundles/jammy-caracal.yaml deleted file mode 100644 index 2ea28db..0000000 --- a/src/tests/bundles/jammy-caracal.yaml +++ /dev/null @@ -1,81 +0,0 @@ -variables: - openstack-origin: &openstack-origin cloud:jammy-caracal - -local_overlay_enabled: False - -series: &series jammy - -machines: - '0': - constraints: mem=3072M - '1': - constraints: mem=3072M - '2': - constraints: mem=3072M - '3': - '4': - '5': - -applications: - - keystone-mysql-router: - charm: ch:mysql-router - channel: latest/edge - barbican-mysql-router: - charm: ch:mysql-router - channel: latest/edge - - mysql-innodb-cluster: - charm: ch:mysql-innodb-cluster - num_units: 3 - options: - source: *openstack-origin - to: - - '0' - - '1' - - '2' - channel: latest/edge - - keystone: - charm: ch:keystone - num_units: 1 - options: - openstack-origin: *openstack-origin - to: - - '3' - channel: 2024.1/edge - - barbican: - series: *series - charm: ../../../barbican_ubuntu-22.04-amd64.charm - num_units: 1 - options: - openstack-origin: *openstack-origin - debug: true - to: - - '4' - - rabbitmq-server: - charm: ch:rabbitmq-server - num_units: 1 - to: - - '5' - channel: latest/edge - -relations: - - - - 'keystone:shared-db' - - 'keystone-mysql-router:shared-db' - - - 'keystone-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'barbican:shared-db' - - 'barbican-mysql-router:shared-db' - - - 'barbican-mysql-router:db-router' - - 'mysql-innodb-cluster:db-router' - - - - 'keystone:identity-service' - - 'barbican:identity-service' - - - - 'rabbitmq-server:amqp' - - 'barbican:amqp' diff --git a/src/tests/bundles/noble-caracal.yaml b/src/tests/bundles/noble-caracal.yaml index 5f9a7fe..714c5b7 100644 --- a/src/tests/bundles/noble-caracal.yaml +++ b/src/tests/bundles/noble-caracal.yaml @@ -3,7 +3,7 @@ variables: local_overlay_enabled: False -series: &series noble +series: noble machines: '0': @@ -43,11 +43,11 @@ applications: openstack-origin: *openstack-origin to: - '3' - channel: 2024.1/edge + channel: latest/edge barbican: - series: *series - charm: ../../../barbican_ubuntu-22.04-amd64.charm + series: noble + charm: ../../../barbican.charm num_units: 1 options: openstack-origin: *openstack-origin diff --git a/src/tests/tests.yaml b/src/tests/tests.yaml index 21155b4..4175d0a 100644 --- a/src/tests/tests.yaml +++ b/src/tests/tests.yaml @@ -1,10 +1,8 @@ charm_name: barbican smoke_bundles: - - jammy-caracal + - noble-caracal gate_bundles: - - jammy-antelope - - jammy-bobcat - - jammy-caracal + - noble-caracal dev_bundles: - noble-caracal tests: diff --git a/src/tox.ini b/src/tox.ini index 2ddcccd..3ce5e85 100644 --- a/src/tox.ini +++ b/src/tox.ini @@ -26,7 +26,7 @@ passenv = OS_* TEST_* deps = - -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt} + -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-noble.txt} -r{toxinidir}/test-requirements.txt [testenv:pep8] diff --git a/tox.ini b/tox.ini index 3e2072b..325508c 100644 --- a/tox.ini +++ b/tox.ini @@ -33,6 +33,7 @@ allowlist_externals = charmcraft bash tox + {toxinidir}/rename.sh deps = -r{toxinidir}/requirements.txt @@ -45,6 +46,7 @@ basepython = python3 commands = charmcraft clean charmcraft -v pack + {toxinidir}/rename.sh charmcraft clean [testenv:build-reactive] @@ -60,21 +62,21 @@ commands = [testenv:py3] basepython = python3 deps = - -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt} + -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-noble.txt} -r{toxinidir}/test-requirements.txt commands = stestr run --slowest {posargs} [testenv:py310] basepython = python3.10 deps = - -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt} + -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-noble.txt} -r{toxinidir}/test-requirements.txt commands = stestr run --slowest {posargs} [testenv:py312] basepython = python3.12 deps = - -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt} + -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-noble.txt} -r{toxinidir}/test-requirements.txt commands = stestr run --slowest {posargs} @@ -89,7 +91,7 @@ commands = flake8 {posargs} src unit_tests # https://github.com/openstack/nova/blob/master/tox.ini basepython = python3 deps = - -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt} + -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-noble.txt} -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt setenv =