diff --git a/charts/devnet/Chart.yaml b/charts/devnet/Chart.yaml index f7798c266..8ce0e1745 100644 --- a/charts/devnet/Chart.yaml +++ b/charts/devnet/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.7 +version: 0.1.8 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/devnet/scripts/build_chain.sh b/charts/devnet/scripts/build_chain.sh index b567ca242..a6646c11a 100644 --- a/charts/devnet/scripts/build_chain.sh +++ b/charts/devnet/scripts/build_chain.sh @@ -1,17 +1,27 @@ #!/bin/bash -set -eu +set -euxo pipefail mkdir -p /tmp/chains $UPGRADE_DIR echo "Fetching code from tag" mkdir -p /tmp/chains/$CHAIN_NAME cd /tmp/chains/$CHAIN_NAME -curl -LO $CODE_REPO/archive/refs/tags/$CODE_TAG.zip -unzip $CODE_TAG.zip -cd ${CODE_REPO##*/}-${CODE_TAG#"v"} + +if [[ $CODE_TAG = v* ]]; then + echo "Trying to fetch code from tag" + curl -LO $CODE_REPO/archive/refs/tags/$CODE_TAG.zip + unzip $CODE_TAG.zip + code_dir=${CODE_REPO##*/}-${CODE_TAG#"v"} +else + echo "Trying to fetch code from branch" + curl -LO $CODE_REPO/archive/refs/heads/$CODE_TAG.zip + unzip $(echo $CODE_TAG | rev | cut -d "/" -f 1 | rev).zip + code_dir=${CODE_REPO##*/}-${CODE_TAG/\//-} +fi echo "Fetch wasmvm if needed" +cd /tmp/chains/$CHAIN_NAME/$code_dir WASM_VERSION=$(cat go.mod | grep -oe "github.com/CosmWasm/wasmvm v[0-9.]*" | cut -d ' ' -f 2) if [[ WASM_VERSION != "" ]]; then mkdir -p /tmp/chains/libwasmvm_muslc @@ -21,8 +31,8 @@ if [[ WASM_VERSION != "" ]]; then fi echo "Build chain binary" -cd /tmp/chains/$CHAIN_NAME/${CODE_REPO##*/}-${CODE_TAG#"v"} -BUILD_TAGS="muslc linkstatic" LINK_STATICALLY=true LEDGER_ENABLED=false make install +cd /tmp/chains/$CHAIN_NAME/$code_dir +CGO_ENABLED=1 BUILD_TAGS="muslc linkstatic" LINK_STATICALLY=true LEDGER_ENABLED=false make install echo "Copy created binary to the upgrade directories" if [[ $UPGRADE_NAME == "genesis" ]]; then diff --git a/docker/builder/Dockerfile b/docker/builder/Dockerfile index cecc39936..bb8885693 100644 --- a/docker/builder/Dockerfile +++ b/docker/builder/Dockerfile @@ -1,7 +1,7 @@ -FROM golang:1.18-alpine3.16 +FROM golang:1.19-alpine3.16 # Set up dependencies -ENV PACKAGES curl unzip make git libusb-dev libc-dev bash gcc linux-headers eudev-dev python3 musl-dev build-base +ENV PACKAGES curl unzip make git libusb-dev libc-dev bash gcc linux-headers eudev-dev python3 musl-dev # Install ca-certificates RUN set -eux; apk add --no-cache ca-certificates build-base; diff --git a/examples/Makefile b/examples/Makefile index ba7aa9350..66bf87ae1 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -1,4 +1,4 @@ -EXAMPLE = mesh-security +EXAMPLE = upgrade-testing FILE = custom-values.yaml HELM_REPO = shuttle diff --git a/examples/upgrade-testing/custom-values.yaml b/examples/upgrade-testing/custom-values.yaml index c353c30e4..1ca8cb1ef 100644 --- a/examples/upgrade-testing/custom-values.yaml +++ b/examples/upgrade-testing/custom-values.yaml @@ -15,6 +15,8 @@ chains: upgrades: - name: v5 version: v5.0.0-rc2 + - name: v6 + version: anmol/v6 ports: rpc: 26657 rest: 1317