Skip to content

Commit

Permalink
Support older charm's osci.yaml
Browse files Browse the repository at this point in the history
insert default value for which doesn't have charmcraft_channel
  • Loading branch information
xtrusia committed Sep 6, 2024
1 parent 01b6add commit 2e9d3c9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion openstack/tools/charmed_openstack_functest_runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ export TEST_CONSTRAINTS_FILE=https://raw.githubusercontent.com/openstack-charmer

# 2. Build
if ! $SKIP_BUILD; then
sudo snap refresh charmcraft --channel $(grep charmcraft_channel osci.yaml| sed -r 's/.+:\s+(\S+)/\1/')
# default value is 1.5/stable, assumed that later charm likely have charmcraft_channel value
CHARMCRAFT_CHANNEL=$(grep charmcraft_channel osci.yaml | sed -r 's/.+:\s+(\S+)/\1/') || CHARMCRAFT_CHANNEL="1.5/stable"

sudo snap refresh charmcraft --channel "$CHARMCRAFT_CHANNEL"

# ensure lxc initialised
lxd init --auto || true
Expand Down

0 comments on commit 2e9d3c9

Please sign in to comment.