Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
auricom committed Sep 24, 2024
1 parent 79c744f commit fe79b59
Show file tree
Hide file tree
Showing 12 changed files with 267 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/scripts/prepare-matrices.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-applications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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) != '' }}
Expand Down
44 changes: 44 additions & 0 deletions apps/cosmos-sdk-comet/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
11 changes: 11 additions & 0 deletions apps/cosmos-sdk-comet/ci/goss.yaml
Original file line number Diff line number Diff line change
@@ -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
28 changes: 28 additions & 0 deletions apps/cosmos-sdk-comet/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -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} \
"$@"
44 changes: 44 additions & 0 deletions apps/ibc-go/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
11 changes: 11 additions & 0 deletions apps/ibc-go/ci/goss.yaml
Original file line number Diff line number Diff line change
@@ -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
28 changes: 28 additions & 0 deletions apps/ibc-go/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -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} \
"$@"
44 changes: 44 additions & 0 deletions apps/ignite-example/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
11 changes: 11 additions & 0 deletions apps/ignite-example/ci/goss.yaml
Original file line number Diff line number Diff line change
@@ -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
28 changes: 28 additions & 0 deletions apps/ignite-example/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -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} \
"$@"
14 changes: 14 additions & 0 deletions apps/ignite-example/metadata.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit fe79b59

Please sign in to comment.