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
This commit is contained in:
Alex Kavanagh
2022-08-16 21:04:29 +01:00
parent a37932f887
commit 849489168a
3 changed files with 10 additions and 9 deletions

View File

@@ -2,33 +2,32 @@ type: charm
parts: parts:
charm: charm:
charm-entrypoint: "hooks/install"
build-packages: build-packages:
- tox - tox
- git - git
- python3-dev - python3-dev
- libffi-dev
- libmysqlclient-dev # for executable mysql_shell - libmysqlclient-dev # for executable mysql_shell
override-build: | override-build: |
apt-get install ca-certificates -y apt-get install ca-certificates -y
tox -e build-reactive tox -e build-reactive
override-stage: | override-stage: |
echo "Copying charm to staging area: $CHARMCRAFT_STAGE" echo "Copying charm to staging area: $CRAFT_STAGE"
NAME=$(ls $CHARMCRAFT_PART_BUILD/build/builds) NAME=$(ls $CRAFT_PART_BUILD/build/builds)
cp -r $CHARMCRAFT_PART_BUILD/build/builds/$NAME/* $CHARMCRAFT_STAGE/ cp -r $CRAFT_PART_BUILD/build/builds/$NAME/* $CRAFT_STAGE/
override-prime: | override-prime: |
# For some reason, the normal priming chokes on the fact that there's a # For some reason, the normal priming chokes on the fact that there's a
# hooks directory. # hooks directory.
cp -r $CHARMCRAFT_STAGE/* . cp -r $CRAFT_STAGE/* .
bases: bases:
- build-on: - build-on:
- name: ubuntu - name: ubuntu
channel: "20.04" channel: "22.04"
architectures: architectures:
- amd64 - amd64
run-on: run-on:
- name: ubuntu
channel: "20.04"
architectures: [amd64, s390x, ppc64el, arm64]
- name: ubuntu - name: ubuntu
channel: "22.04" channel: "22.04"
architectures: [amd64, s390x, ppc64el, arm64] architectures: [amd64, s390x, ppc64el, arm64]

View File

@@ -12,6 +12,7 @@
needs_charm_build: true needs_charm_build: true
charm_build_name: mysql-innodb-cluster charm_build_name: mysql-innodb-cluster
build_type: charmcraft build_type: charmcraft
charmcraft_channel: "1.7/stable"
- job: - job:
name: full_model-focal-full-ha name: full_model-focal-full-ha

View File

@@ -10,7 +10,8 @@ setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb
# Build requirements # Build requirements
cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35. 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 simplejson