diff --git a/.github/scripts/prepare-matrices.py b/.github/scripts/prepare-matrices.py index 7b893a6..64f84b2 100644 --- a/.github/scripts/prepare-matrices.py +++ b/.github/scripts/prepare-matrices.py @@ -91,6 +91,9 @@ def get_app_metadata(subdir, meta, forRelease=False, channels=None): platformToBuild["update_modules"] = channel["update_modules"] appsToBuild["appsPlatforms"].append(platformToBuild) + if channel["update_modules"]: + platformToBuild["update_modules"] = False + appsToBuild["appsPlatforms"].append(platformToBuild) appsToBuild["apps"].append(toBuild) return appsToBuild diff --git a/.github/workflows/build-applications.yaml b/.github/workflows/build-applications.yaml index 23a47d2..ef0a86f 100644 --- a/.github/workflows/build-applications.yaml +++ b/.github/workflows/build-applications.yaml @@ -60,7 +60,7 @@ jobs: echo "${matrices}" build-platform-app: - name: Build/Test ${{ matrix.app.name }} ${{ matrix.app.channel }} (${{ matrix.app.platform }}) + name: Build/Test ${{ matrix.app.name }} ${{ matrix.app.channel }} ${{ matrix.app.update_modules && 'mods ' }}(${{ matrix.app.platform }}) needs: prepare runs-on: ubuntu-latest if: ${{ toJSON(fromJSON(needs.prepare.outputs.matrices).appsPlatforms) != '[]' && toJSON(fromJSON(needs.prepare.outputs.matrices).appsPlatforms) != '' }} diff --git a/apps/cosmos-sdk-comet/Dockerfile b/apps/cosmos-sdk-comet/Dockerfile new file mode 100644 index 0000000..b6009ed --- /dev/null +++ b/apps/cosmos-sdk-comet/Dockerfile @@ -0,0 +1,44 @@ +FROM cgr.dev/chainguard/wolfi-base:latest@sha256:0f1d81605bda6e2388c3c7f731700d8c12e17259d58ffba11f36ddc81d9c0a76 + +ARG BINARY + +WORKDIR /app + +USER root + +COPY ./$BINARY /app/node + +RUN apk update && \ + apk add --no-cache \ + bash \ + libstdc++ \ + jq \ + tini \ + && \ + mkdir -p /config && \ + chown -R nonroot:nonroot /app /config && \ + chmod -R u=rwX,go=rX /app /config && \ + chmod +x /app/node + +USER nonroot + +COPY ./entrypoint.sh /entrypoint.sh + +# API Server +EXPOSE 1317 + +# Pprof Server +EXPOSE 6060 + +# gRPC Server +EXPOSE 9090 + +# CometBFT RPC interface +EXPOSE 26657 + +HEALTHCHECK --interval=1m --timeout=3s CMD /app/node query node status | grep validator_hash || exit 1 + +VOLUME ["/config"] + +ENTRYPOINT ["tini", "--"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/apps/cosmos-sdk-comet/ci/goss.yaml b/apps/cosmos-sdk-comet/ci/goss.yaml new file mode 100644 index 0000000..b33a2f7 --- /dev/null +++ b/apps/cosmos-sdk-comet/ci/goss.yaml @@ -0,0 +1,11 @@ +--- +# https://github.com/aelsabbahy/goss/blob/master/docs/manual.md#process +process: + node: + running: true + +# https://github.com/aelsabbahy/goss/blob/master/docs/manual.md#port +port: + # https://github.com/aelsabbahy/goss/issues/149 + tcp:26657: + listening: true \ No newline at end of file diff --git a/apps/cosmos-sdk-comet/entrypoint.sh b/apps/cosmos-sdk-comet/entrypoint.sh new file mode 100755 index 0000000..3b06239 --- /dev/null +++ b/apps/cosmos-sdk-comet/entrypoint.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +set -x + +NODE_HOME=${NODE_HOME:-/config} +START_CMD=${START_CMD:-start} + +if [[ ! -f "${NODE_HOME}/config.json" ]]; then + echo "Launch init procedure..." + /app/node config set client chain-id testchain --home ${NODE_HOME} + /app/node config set client keyring-backend test --home ${NODE_HOME} + /app/node config set client keyring-default-keyname alice --home ${NODE_HOME} + /app/node config set app api.enable true --home ${NODE_HOME} + /app/node keys add alice --home ${NODE_HOME} + /app/node keys add bob --home ${NODE_HOME} + /app/node init testchain-node --chain-id testchain --home ${NODE_HOME} + jq '.app_state.gov.params.voting_period = "600s"' ${NODE_HOME}/config/genesis.json > temp.json && mv temp.json $SIMD_HOME/config/genesis.json + jq '.app_state.gov.params.expedited_voting_period = "300s"' ${NODE_HOME}/config/genesis.json > temp.json && mv temp.json $SIMD_HOME/config/genesis.json + jq '.app_state.mint.minter.inflation = "0.300000000000000000"' ${NODE_HOME}/config/genesis.json > temp.json && mv temp.json $SIMD_HOME/config/genesis.json # to change the inflation + /app/node genesis add-genesis-account alice 5000000000stake --keyring-backend test --home ${NODE_HOME} + /app/node genesis add-genesis-account bob 5000000000stake --keyring-backend test --home ${NODE_HOME} + /app/node genesis gentx alice 1000000stake --chain-id testchain --home ${NODE_HOME} + /app/node genesis collect-gentxs --home ${NODE_HOME} +fi + +exec \ + /app/node ${START_CMD} --home ${NODE_HOME} \ + "$@" \ No newline at end of file diff --git a/apps/ibc-go/Dockerfile b/apps/ibc-go/Dockerfile new file mode 100644 index 0000000..b6009ed --- /dev/null +++ b/apps/ibc-go/Dockerfile @@ -0,0 +1,44 @@ +FROM cgr.dev/chainguard/wolfi-base:latest@sha256:0f1d81605bda6e2388c3c7f731700d8c12e17259d58ffba11f36ddc81d9c0a76 + +ARG BINARY + +WORKDIR /app + +USER root + +COPY ./$BINARY /app/node + +RUN apk update && \ + apk add --no-cache \ + bash \ + libstdc++ \ + jq \ + tini \ + && \ + mkdir -p /config && \ + chown -R nonroot:nonroot /app /config && \ + chmod -R u=rwX,go=rX /app /config && \ + chmod +x /app/node + +USER nonroot + +COPY ./entrypoint.sh /entrypoint.sh + +# API Server +EXPOSE 1317 + +# Pprof Server +EXPOSE 6060 + +# gRPC Server +EXPOSE 9090 + +# CometBFT RPC interface +EXPOSE 26657 + +HEALTHCHECK --interval=1m --timeout=3s CMD /app/node query node status | grep validator_hash || exit 1 + +VOLUME ["/config"] + +ENTRYPOINT ["tini", "--"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/apps/ibc-go/ci/goss.yaml b/apps/ibc-go/ci/goss.yaml new file mode 100644 index 0000000..b33a2f7 --- /dev/null +++ b/apps/ibc-go/ci/goss.yaml @@ -0,0 +1,11 @@ +--- +# https://github.com/aelsabbahy/goss/blob/master/docs/manual.md#process +process: + node: + running: true + +# https://github.com/aelsabbahy/goss/blob/master/docs/manual.md#port +port: + # https://github.com/aelsabbahy/goss/issues/149 + tcp:26657: + listening: true \ No newline at end of file diff --git a/apps/ibc-go/entrypoint.sh b/apps/ibc-go/entrypoint.sh new file mode 100755 index 0000000..3b06239 --- /dev/null +++ b/apps/ibc-go/entrypoint.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +set -x + +NODE_HOME=${NODE_HOME:-/config} +START_CMD=${START_CMD:-start} + +if [[ ! -f "${NODE_HOME}/config.json" ]]; then + echo "Launch init procedure..." + /app/node config set client chain-id testchain --home ${NODE_HOME} + /app/node config set client keyring-backend test --home ${NODE_HOME} + /app/node config set client keyring-default-keyname alice --home ${NODE_HOME} + /app/node config set app api.enable true --home ${NODE_HOME} + /app/node keys add alice --home ${NODE_HOME} + /app/node keys add bob --home ${NODE_HOME} + /app/node init testchain-node --chain-id testchain --home ${NODE_HOME} + jq '.app_state.gov.params.voting_period = "600s"' ${NODE_HOME}/config/genesis.json > temp.json && mv temp.json $SIMD_HOME/config/genesis.json + jq '.app_state.gov.params.expedited_voting_period = "300s"' ${NODE_HOME}/config/genesis.json > temp.json && mv temp.json $SIMD_HOME/config/genesis.json + jq '.app_state.mint.minter.inflation = "0.300000000000000000"' ${NODE_HOME}/config/genesis.json > temp.json && mv temp.json $SIMD_HOME/config/genesis.json # to change the inflation + /app/node genesis add-genesis-account alice 5000000000stake --keyring-backend test --home ${NODE_HOME} + /app/node genesis add-genesis-account bob 5000000000stake --keyring-backend test --home ${NODE_HOME} + /app/node genesis gentx alice 1000000stake --chain-id testchain --home ${NODE_HOME} + /app/node genesis collect-gentxs --home ${NODE_HOME} +fi + +exec \ + /app/node ${START_CMD} --home ${NODE_HOME} \ + "$@" \ No newline at end of file diff --git a/apps/ignite-example/Dockerfile b/apps/ignite-example/Dockerfile new file mode 100644 index 0000000..b6009ed --- /dev/null +++ b/apps/ignite-example/Dockerfile @@ -0,0 +1,44 @@ +FROM cgr.dev/chainguard/wolfi-base:latest@sha256:0f1d81605bda6e2388c3c7f731700d8c12e17259d58ffba11f36ddc81d9c0a76 + +ARG BINARY + +WORKDIR /app + +USER root + +COPY ./$BINARY /app/node + +RUN apk update && \ + apk add --no-cache \ + bash \ + libstdc++ \ + jq \ + tini \ + && \ + mkdir -p /config && \ + chown -R nonroot:nonroot /app /config && \ + chmod -R u=rwX,go=rX /app /config && \ + chmod +x /app/node + +USER nonroot + +COPY ./entrypoint.sh /entrypoint.sh + +# API Server +EXPOSE 1317 + +# Pprof Server +EXPOSE 6060 + +# gRPC Server +EXPOSE 9090 + +# CometBFT RPC interface +EXPOSE 26657 + +HEALTHCHECK --interval=1m --timeout=3s CMD /app/node query node status | grep validator_hash || exit 1 + +VOLUME ["/config"] + +ENTRYPOINT ["tini", "--"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/apps/ignite-example/ci/goss.yaml b/apps/ignite-example/ci/goss.yaml new file mode 100644 index 0000000..b33a2f7 --- /dev/null +++ b/apps/ignite-example/ci/goss.yaml @@ -0,0 +1,11 @@ +--- +# https://github.com/aelsabbahy/goss/blob/master/docs/manual.md#process +process: + node: + running: true + +# https://github.com/aelsabbahy/goss/blob/master/docs/manual.md#port +port: + # https://github.com/aelsabbahy/goss/issues/149 + tcp:26657: + listening: true \ No newline at end of file diff --git a/apps/ignite-example/entrypoint.sh b/apps/ignite-example/entrypoint.sh new file mode 100755 index 0000000..3b06239 --- /dev/null +++ b/apps/ignite-example/entrypoint.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +set -x + +NODE_HOME=${NODE_HOME:-/config} +START_CMD=${START_CMD:-start} + +if [[ ! -f "${NODE_HOME}/config.json" ]]; then + echo "Launch init procedure..." + /app/node config set client chain-id testchain --home ${NODE_HOME} + /app/node config set client keyring-backend test --home ${NODE_HOME} + /app/node config set client keyring-default-keyname alice --home ${NODE_HOME} + /app/node config set app api.enable true --home ${NODE_HOME} + /app/node keys add alice --home ${NODE_HOME} + /app/node keys add bob --home ${NODE_HOME} + /app/node init testchain-node --chain-id testchain --home ${NODE_HOME} + jq '.app_state.gov.params.voting_period = "600s"' ${NODE_HOME}/config/genesis.json > temp.json && mv temp.json $SIMD_HOME/config/genesis.json + jq '.app_state.gov.params.expedited_voting_period = "300s"' ${NODE_HOME}/config/genesis.json > temp.json && mv temp.json $SIMD_HOME/config/genesis.json + jq '.app_state.mint.minter.inflation = "0.300000000000000000"' ${NODE_HOME}/config/genesis.json > temp.json && mv temp.json $SIMD_HOME/config/genesis.json # to change the inflation + /app/node genesis add-genesis-account alice 5000000000stake --keyring-backend test --home ${NODE_HOME} + /app/node genesis add-genesis-account bob 5000000000stake --keyring-backend test --home ${NODE_HOME} + /app/node genesis gentx alice 1000000stake --chain-id testchain --home ${NODE_HOME} + /app/node genesis collect-gentxs --home ${NODE_HOME} +fi + +exec \ + /app/node ${START_CMD} --home ${NODE_HOME} \ + "$@" \ No newline at end of file diff --git a/apps/ignite-example/metadata.yaml b/apps/ignite-example/metadata.yaml new file mode 100644 index 0000000..f687339 --- /dev/null +++ b/apps/ignite-example/metadata.yaml @@ -0,0 +1,14 @@ +--- +app: ignite-example +repository: ignite/example +path: ./ +build_command: go install +build_artifacts: true +channels: + - name: master + platforms: ["linux/amd64","linux/arm64"] + branch: master + update_modules: true + tests: + enabled: true + command: make init-simapp && simd start