From 849489168af5c8c7ca298ce2e76c3bb25737a24b Mon Sep 17 00:00:00 2001 From: Alex Kavanagh Date: Tue, 16 Aug 2022 21:04:29 +0100 Subject: [PATCH] Update charmcraft.yaml for 1.7/2.0 The CHARMCRAFT_* vars changed to CRAFT_* and there has to be a file that is the 'entrypoint', a concept somewhat lost on reactive charms. At some point, update charm-tools to build an entry point. Change-Id: I86bef3d7cedb17a68539aad25ee6fe273da4b8cc --- charmcraft.yaml | 15 +++++++-------- osci.yaml | 1 + requirements.txt | 3 ++- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/charmcraft.yaml b/charmcraft.yaml index 86055a8..4eb763f 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -2,33 +2,32 @@ type: charm parts: charm: + charm-entrypoint: "hooks/install" build-packages: - tox - git - python3-dev + - libffi-dev - libmysqlclient-dev # for executable mysql_shell 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/ + echo "Copying charm to staging area: $CRAFT_STAGE" + NAME=$(ls $CRAFT_PART_BUILD/build/builds) + cp -r $CRAFT_PART_BUILD/build/builds/$NAME/* $CRAFT_STAGE/ override-prime: | # For some reason, the normal priming chokes on the fact that there's a # hooks directory. - cp -r $CHARMCRAFT_STAGE/* . + cp -r $CRAFT_STAGE/* . 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] diff --git a/osci.yaml b/osci.yaml index 47f141b..17daf06 100644 --- a/osci.yaml +++ b/osci.yaml @@ -12,6 +12,7 @@ needs_charm_build: true charm_build_name: mysql-innodb-cluster build_type: charmcraft + charmcraft_channel: "1.7/stable" - job: name: full_model-focal-full-ha diff --git a/requirements.txt b/requirements.txt index a68620f..6480df4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,8 @@ setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb # Build requirements cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35. -charm-tools==2.8.3 +charm-tools==2.8.3; python_version < '3.10' +charm-tools; python_version >= '3.10' simplejson