Skip to content

Commit

Permalink
chore: make release/v2 as the main branch (#437)
Browse files Browse the repository at this point in the history
* chore: rename chain name and type to id and name (#433)

* rename chains[].name to chains[].id and chains[].type to chains[].name

* fix typo in env variable

* set chart version to 0.2.0 and fix typo in registry

* fix port-forwrad script

* upgrade starship-action version

* fix relayers for v2

* fix hermes configmap (#436)

* chore: starship js merge into monorepo (#434)

* 🚀

* workflow

* proxy

* port forward

* snaps and logs

* client

* simpler names

* cleanup and docs

* chore(release): publish

 - @starship-ci/[email protected]
 - [email protected]

* readme

* chore(release): publish

 - @starship-ci/[email protected]
 - [email protected]

* ensure config exists

* chore(release): publish

 - @starship-ci/[email protected]

* readme

* readme

* chore(release): publish

 - @starship-ci/[email protected]
 - [email protected]

* workflow

* link

* remove `yq` as a dependency

* chore(release): publish

 - @starship-ci/[email protected]
 - [email protected]

* repo

* chore(release): publish

 - @starship-ci/[email protected]
 - [email protected]

* readme

* chore(release): publish

 - @starship-ci/[email protected]
 - [email protected]

* readme

* deps

* readme

* deps

* test

* CLI

* README

* readme

* main readme

* readme

* readme

* chore(release): publish

 - @starship-ci/[email protected]
 - @starship-ci/[email protected]
 - [email protected]

* readme

* deps

* chore(release): publish

 - @starship-ci/[email protected]

* remove stub

* chore(release): publish

 - @starship-ci/[email protected]

* ports

* chore(release): publish

 - @starship-ci/[email protected]
 - @starship-ci/[email protected]

* add installer

* pids

* chore(release): publish

 - @starship-ci/[email protected]
 - @starship-ci/[email protected]

* starshipjs

* chore(release): publish

 - [email protected]

* readme

* readme

* recommended usage

* chore(release): publish

 - @starship-ci/[email protected]
 - @starship-ci/[email protected]
 - [email protected]

* readme

* chore(release): publish

 - @starship-ci/[email protected]
 - @starship-ci/[email protected]
 - [email protected]

* readme

* chore(release): publish

 - @starship-ci/[email protected]

* config

* chore(release): publish

 - [email protected]

* cmds

* chore(release): publish

 - @starship-ci/[email protected]
 - @starship-ci/[email protected]

* tty

* chore(release): publish

 - @starship-ci/[email protected]

* readme

* chore(release): publish

 - @starship-ci/[email protected]

* readme

* chore(release): publish

 - [email protected]

* readme

* chore(release): publish

 - @starship-ci/[email protected]
 - @starship-ci/[email protected]

* readme

* readme

* snaps

* readme

* chore(release): publish

 - @starship-ci/[email protected]
 - @starship-ci/[email protected]
 - [email protected]

* readme

* chore(release): publish

 - @starship-ci/[email protected]
 - @starship-ci/[email protected]

* proxy

* readme

* chore(release): publish

 - @starship-ci/[email protected]
 - @starship-ci/[email protected]
 - [email protected]

* prepare for monorepo merge

* rename root folder to match monorepo

* change dir for running starshipjs tests

* rename run-tests workflows for js clients

* set working dir in ci workflow

* use defaults, update symlink workspace

* inquirerer

* chore(release): publish

 - @starship-ci/[email protected]
 - @starship-ci/[email protected]

* prepare for monorepo merge

* rename root folder to match monorepo

* rename clients/js/starshipjs to clients/js

* update urls to use starship instead of starshipjs repo

---------

Co-authored-by: Dan Lynch <[email protected]>

* push latest stuff

* update gitignore

* ignore

* chore(release): publish

 - @starship-ci/[email protected]
 - @starship-ci/[email protected]
 - [email protected]

* utils

* chore(release): publish

 - @starship-ci/[email protected]

* wait-for-pods command

* chore(release): publish

 - @starship-ci/[email protected]
 - @starship-ci/[email protected]

* update run-client-tests

---------

Co-authored-by: Dan Lynch <[email protected]>
  • Loading branch information
Anmol1696 and pyramation authored May 3, 2024
1 parent 428b8ef commit e4e442d
Show file tree
Hide file tree
Showing 117 changed files with 10,481 additions and 293 deletions.
4 changes: 2 additions & 2 deletions .github/actions/e2e-test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ runs:

- name: Setup Test infra
id: starship-action
uses: cosmology-tech/starship-action@dda9039c44960084db5955b3ad4720b2255da430
uses: cosmology-tech/starship-action@0.2.19
with:
values: ${{ env.CONFIG_FILE }}
port-forward: true
version: 0.0.0
chart: ./charts/devnet
kubeconfig: ${{ steps.kubeconfig.outputs.content }}
cli-version: d60aa2158bbcd43a3ed8ab3558f50f9618677e05
cli-version: f35dc85407b350077765a0b3c17a4c1632c7d53c

- name: Run tests
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ jobs:

- name: Setup Test infra
id: starship-action
uses: cosmology-tech/starship-action@dda9039c44960084db5955b3ad4720b2255da430
uses: cosmology-tech/starship-action@0.2.19
with:
values: ${{ env.CONFIG_FILE }}
port-forward: true
version: 0.0.0
chart: ./charts/devnet
cli-version: d60aa2158bbcd43a3ed8ab3558f50f9618677e05
cli-version: f35dc85407b350077765a0b3c17a4c1632c7d53c

- name: Run tests
run: |
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/run-client-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Run Client Tests

on:
push:
branches:
- main
- release/*
pull_request:
types: [opened, reopened]

workflow_dispatch:

jobs:
starshipjs-tests:
runs-on: ubuntu-latest

defaults:
run:
working-directory: clients/js

steps:
- name: Checkout Repository 🛎️
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'

- name: Install Dependencies
run: yarn install

- name: Build Project
run: yarn build

- name: Test @starship-ci/client
run: cd packages/client && yarn test

# - name: Test starshipjs
# run: cd js/starshipjs && yarn test
12 changes: 6 additions & 6 deletions .github/workflows/smoke-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ jobs:

- name: Setup Test infra
id: starship-action
uses: cosmology-tech/starship-action@dda9039c44960084db5955b3ad4720b2255da430
uses: cosmology-tech/starship-action@0.2.19
with:
values: ${{ env.CONFIG_FILE }}
port-forward: true
version: 0.0.0
chart: ./charts/devnet
timeout: 10m
cli-version: d60aa2158bbcd43a3ed8ab3558f50f9618677e05
cli-version: f35dc85407b350077765a0b3c17a4c1632c7d53c

# todo: change this to be post step of the action
- name: Cleanup cluster
Expand Down Expand Up @@ -67,14 +67,14 @@ jobs:

- name: Setup Test infra
id: starship-action
uses: cosmology-tech/starship-action@dda9039c44960084db5955b3ad4720b2255da430
uses: cosmology-tech/starship-action@0.2.19
with:
values: ${{ env.CONFIG_FILE }}
port-forward: true
version: 0.0.0
chart: ./charts/devnet
timeout: 10m
cli-version: d60aa2158bbcd43a3ed8ab3558f50f9618677e05
cli-version: f35dc85407b350077765a0b3c17a4c1632c7d53c

# todo: change this to be post step of the action
- name: Cleanup cluster
Expand Down Expand Up @@ -105,14 +105,14 @@ jobs:

- name: Setup Test infra
id: starship-action
uses: cosmology-tech/starship-action@dda9039c44960084db5955b3ad4720b2255da430
uses: cosmology-tech/starship-action@0.2.19
with:
values: ${{ env.CONFIG_FILE }}
port-forward: true
version: 0.0.0
chart: ./charts/devnet
timeout: 10m
cli-version: d60aa2158bbcd43a3ed8ab3558f50f9618677e05
cli-version: f35dc85407b350077765a0b3c17a4c1632c7d53c

# todo: change this to be post step of the action
- name: Cleanup cluster
Expand Down
2 changes: 1 addition & 1 deletion charts/devnet/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.49-rc1
version: 0.2.0

# 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
Expand Down
8 changes: 4 additions & 4 deletions charts/devnet/templates/_chains.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ Usage:
{{- required "default file must have setup" $defaultFile.defaultChains -}}
{{- $chain := dict -}}
{{- range $chainIter := $.context.Values.chains -}}
{{- if eq $chainIter.name $.name -}}
{{- if eq $chainIter.id $.name -}}
{{- $chain = $chainIter | deepCopy -}}
{{- end }}
{{- end }}
{{- required "chain need to exist" $chain.type -}}
{{- required "chain need to exist" $chain.id -}}

{{- $defaultChain := get $defaultFile.defaultChains $chain.type | default dict -}}
{{- $defaultChain := get $defaultFile.defaultChains $chain.name | default dict -}}

{{/* merge defaultChain values into the $chain dict*/}}
{{- $chain = merge $chain $defaultChain -}}

{{ $_ := set $chain "hostname" (include "devnet.chain.name" $chain.name) }}
{{ $_ := set $chain "hostname" (include "devnet.chain.name" $chain.id) }}

{{- $faucet := get $chain "faucet" | default dict -}}
{{- $faucet = mergeOverwrite ($.context.Values.faucet | deepCopy) $faucet -}}
Expand Down
22 changes: 11 additions & 11 deletions charts/devnet/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Convert $chain.name to name usable by templates
Convert $chain.id to name usable by templates
*/}}
{{- define "devnet.chain.name" -}}
{{- printf "%s" . | replace "_" "-" | trunc 63 }}
Expand Down Expand Up @@ -82,7 +82,7 @@ Environment variables for chain from configmaps
*/}}
{{- define "devnet.evnVars" }}
- name: CHAIN_ID
value: {{ .name }}
value: {{ .id }}
{{- end }}

{{/*
Expand Down Expand Up @@ -159,7 +159,7 @@ Returns a comma seperated list of chain id
{{- define "devnet.chains.ids" -}}
{{- $values := list -}}
{{- range $chain := .Values.chains -}}
{{- $values = $chain.name | append $values -}}
{{- $values = $chain.id | append $values -}}
{{- end -}}
{{ join "," $values }}
{{- end -}}
Expand All @@ -170,7 +170,7 @@ Returns a comma seperated list of urls for the RPC address based on internal DNS
{{- define "devnet.chains.internal.rpc.addrs" -}}
{{- $values := list -}}
{{- range $chain := .Values.chains -}}
{{- $host := include "devnet.chain.name" $chain.name }}
{{- $host := include "devnet.chain.name" $chain.id }}
{{- $values = printf "http://%s-genesis.$(NAMESPACE).svc.cluster.local:26657" $host | append $values -}}
{{- end -}}
{{ join "," $values }}
Expand All @@ -186,9 +186,9 @@ Returns a comma seperated list of urls for the RPC address
{{- if and ($localhost) (($chain.ports).rpc) -}}
{{- $values = printf "http://localhost:%v" $chain.ports.rpc | append $values -}}
{{- else if $.Values.ingress.enabled }}
{{- $values = printf "https://rpc.%s-genesis.%s" $chain.name ($.Values.ingress.host | replace "*." "") | append $values -}}
{{- $values = printf "https://rpc.%s-genesis.%s" $chain.id ($.Values.ingress.host | replace "*." "") | append $values -}}
{{- else -}}
{{- $host := include "devnet.chain.name" $chain.name }}
{{- $host := include "devnet.chain.name" $chain.id }}
{{- $values = printf "http://%s-genesis.$(NAMESPACE).svc.cluster.local:26657" $host | append $values -}}
{{- end -}}
{{- end -}}
Expand All @@ -206,9 +206,9 @@ If registry.localhost is set to true, then use $chain ports
{{- if and ($localhost) (($chain.ports).grpc) -}}
{{- $values = printf "http://localhost:%v" $chain.ports.grpc | append $values -}}
{{- else if $.Values.ingress.enabled }}
{{- $values = printf "https://grpc.%s-genesis.%s" $chain.name ($.Values.ingress.host | replace "*." "") | append $values -}}
{{- $values = printf "https://grpc.%s-genesis.%s" $chain.id ($.Values.ingress.host | replace "*." "") | append $values -}}
{{- else -}}
{{- $host := include "devnet.chain.name" $chain.name }}
{{- $host := include "devnet.chain.name" $chain.id }}
{{- $values = printf "http://%s-genesis.$(NAMESPACE).svc.cluster.local:9091" $host | append $values -}}
{{- end -}}
{{- end -}}
Expand All @@ -226,9 +226,9 @@ If registry.localhost is set to true, then use $chain ports
{{- if and ($localhost) (($chain.ports).rest) -}}
{{- $values = printf "http://localhost:%v" $chain.ports.rest | append $values -}}
{{- else if $.Values.ingress.enabled }}
{{- $values = printf "https://rest.%s-genesis.%s" $chain.name ($.Values.ingress.host | replace "*." "") | append $values -}}
{{- $values = printf "https://rest.%s-genesis.%s" $chain.id ($.Values.ingress.host | replace "*." "") | append $values -}}
{{- else -}}
{{- $host := include "devnet.chain.name" $chain.name }}
{{- $host := include "devnet.chain.name" $chain.id }}
{{- $values = printf "http://%s-genesis.$(NAMESPACE).svc.cluster.local:1317" $host | append $values -}}
{{- end -}}
{{- end -}}
Expand All @@ -242,7 +242,7 @@ Returns a comma seperated list of urls for the Exposer address
{{- $port := ($.Values.exposer.ports.rest | toString | default "8081") }}
{{- $values := list -}}
{{- range $chain := .Values.chains -}}
{{- $host := include "devnet.chain.name" $chain.name }}
{{- $host := include "devnet.chain.name" $chain.id }}
{{- $values = printf "http://%s-genesis.$(NAMESPACE).svc.cluster.local:%s" $host $port | append $values -}}
{{- end -}}
{{ join "," $values }}
Expand Down
24 changes: 12 additions & 12 deletions charts/devnet/templates/chains/cosmos/cometmock.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{{- range $chain := .Values.chains }}
{{- if ne $chain.type "virtual" }}
{{ $dataExposer := dict "chain" $chain.name "port" ($.Values.exposer.ports.rest | quote | default "8081") }}
{{- if ne $chain.name "virtual" }}
{{ $dataExposer := dict "chain" $chain.id "port" ($.Values.exposer.ports.rest | quote | default "8081") }}
{{ $defaultFile := $.Files.Get "defaults.yaml" | fromYaml }}

{{ $chain := include "devnet.fullchain" (dict "name" $chain.name "file" $defaultFile "context" $) | fromJson }}
{{ $chain := include "devnet.fullchain" (dict "name" $chain.id "file" $defaultFile "context" $) | fromJson }}

{{- if ($chain.cometmock.enabled) }}
---
Expand All @@ -12,7 +12,7 @@ kind: Service
metadata:
name: {{ $chain.hostname }}-cometmock
labels:
app.kubernetes.io/name: {{ $chain.name }}-cometmock
app.kubernetes.io/name: {{ $chain.id }}-cometmock
spec:
clusterIP: None
ports:
Expand All @@ -21,7 +21,7 @@ spec:
protocol: TCP
targetPort: 22331
selector:
app.kubernetes.io/name: {{ $chain.name }}-cometmock
app.kubernetes.io/name: {{ $chain.id }}-cometmock
---
apiVersion: apps/v1
kind: StatefulSet
Expand All @@ -33,8 +33,8 @@ spec:
revisionHistoryLimit: 3
selector:
matchLabels:
app.kubernetes.io/instance: {{ $chain.type }}
app.kubernetes.io/name: {{ $chain.name }}-cometmock
app.kubernetes.io/instance: {{ $chain.name }}
app.kubernetes.io/name: {{ $chain.id }}-cometmock
template:
metadata:
annotations:
Expand All @@ -43,10 +43,10 @@ spec:
sla: high
tier: gateway
labels:
app.kubernetes.io/instance: {{ $chain.type }}
app.kubernetes.io/instance: {{ $chain.name }}
app.kubernetes.io/type: cometmock
app.kubernetes.io/name: {{ $chain.name }}-cometmock
app.kubernetes.io/rawname: {{ $chain.name }}-cometmock
app.kubernetes.io/name: {{ $chain.id }}-cometmock
app.kubernetes.io/rawname: {{ $chain.id }}-cometmock
app.kubernetes.io/version: {{ $.Chart.AppVersion }}
spec:
{{- include "imagePullSecrets" $chain | indent 6 }}
Expand Down Expand Up @@ -98,15 +98,15 @@ spec:
- "-c"
- |
while [ $(curl -sw '%{http_code}' http://{{ $chain.hostname }}-genesis.$NAMESPACE.svc.cluster.local:$GENESIS_PORT/priv_keys -o /dev/null) -ne 200 ]; do
echo "Genesis validator does not seem to be ready for: {{ $chain.name }}. Waiting for it to start..."
echo "Genesis validator does not seem to be ready for: {{ $chain.id }}. Waiting for it to start..."
echo "Checking: http://{{ $chain.hostname }}-genesis.$NAMESPACE.svc.cluster.local:$GENESIS_PORT/priv_keys"
sleep 10;
done
{{- if gt $chain.numValidators 1.0}}
for i in $(seq 0 {{ sub $chain.numValidators 2 }});
do
while [ $(curl -sw '%{http_code}' http://{{ $chain.hostname }}-validator-$i.{{ $chain.hostname }}-validator.$NAMESPACE.svc.cluster.local:$GENESIS_PORT/priv_keys -o /dev/null) -ne 200 ]; do
echo "Validator does not seem to be ready for: {{ $chain.name }} validator-$i. Waiting for it to start..."
echo "Validator does not seem to be ready for: {{ $chain.id }} validator-$i. Waiting for it to start..."
echo "Checking: http://{{ $chain.hostname }}-validator-$i.{{ $chain.hostname }}-validator.$NAMESPACE.svc.cluster.local:$GENESIS_PORT/priv_keys"
sleep 10;
done
Expand Down
4 changes: 2 additions & 2 deletions charts/devnet/templates/chains/cosmos/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{- range $chain := .Values.chains }}
{{- if ne $chain.type "virtual" }}
{{- if ne $chain.name "virtual" }}
{{ $defaultFile := $.Files.Get "defaults.yaml" | fromYaml }}
{{ $chain := include "devnet.fullchain" (dict "name" $chain.name "file" $defaultFile "context" $) | fromJson }}
{{ $chain := include "devnet.fullchain" (dict "name" $chain.id "file" $defaultFile "context" $) | fromJson }}
---
apiVersion: v1
kind: ConfigMap
Expand Down
26 changes: 13 additions & 13 deletions charts/devnet/templates/chains/cosmos/genesis.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{{- range $chain := .Values.chains }}
{{- if ne $chain.type "virtual" }}
{{ $dataExposer := dict "chain" $chain.name "port" ($.Values.exposer.ports.rest | quote | default "8081") }}
{{- if ne $chain.name "virtual" }}
{{ $dataExposer := dict "chain" $chain.id "port" ($.Values.exposer.ports.rest | quote | default "8081") }}
{{ $defaultFile := $.Files.Get "defaults.yaml" | fromYaml }}

{{ $chain := include "devnet.fullchain" (dict "name" $chain.name "file" $defaultFile "context" $) | fromJson }}
{{ $chain := include "devnet.fullchain" (dict "name" $chain.id "file" $defaultFile "context" $) | fromJson }}
---
apiVersion: apps/v1
kind: StatefulSet
Expand All @@ -15,8 +15,8 @@ spec:
revisionHistoryLimit: 3
selector:
matchLabels:
app.kubernetes.io/instance: {{ $chain.type }}
app.kubernetes.io/name: {{ $chain.name }}-genesis
app.kubernetes.io/instance: {{ $chain.name }}
app.kubernetes.io/name: {{ $chain.id }}-genesis
template:
metadata:
annotations:
Expand All @@ -25,10 +25,10 @@ spec:
sla: high
tier: gateway
labels:
app.kubernetes.io/instance: {{ $chain.type }}
app.kubernetes.io/type: {{ $chain.name }}
app.kubernetes.io/name: {{ $chain.name }}-genesis
app.kubernetes.io/rawname: {{ $chain.name }}
app.kubernetes.io/instance: {{ $chain.name }}
app.kubernetes.io/type: {{ $chain.id }}
app.kubernetes.io/name: {{ $chain.id }}-genesis
app.kubernetes.io/rawname: {{ $chain.id }}
app.kubernetes.io/version: {{ $.Chart.AppVersion }}
spec:
{{- include "imagePullSecrets" $chain | indent 6 }}
Expand Down Expand Up @@ -61,7 +61,7 @@ spec:
- name: GOBIN
value: /go/bin
- name: CHAIN_NAME
value: {{ $chain.name }}
value: {{ $chain.id }}
{{ include "devnet.defaultEvnVars" $chain | indent 12 }}
resources: {{- include "devnet.node.resources" ( dict "node" $chain "context" $ ) | trim | nindent 12 }}
volumeMounts:
Expand Down Expand Up @@ -319,7 +319,7 @@ spec:
- name: FAUCET_CHAIN_BINARY
value: "{{ $chain.binary }}"
- name: FAUCET_CHAIN_ID
value: "{{ $chain.name }}"
value: "{{ $chain.id }}"
- name: COINS
value: "{{ $chain.coins }}"
command:
Expand Down Expand Up @@ -376,11 +376,11 @@ spec:
name: keys
- name: scripts
configMap:
name: setup-scripts-{{- include "devnet.chain.name" $chain.name }}
name: setup-scripts-{{- include "devnet.chain.name" $chain.id }}
{{- if hasKey $chain "genesis" }}
- name: patch
configMap:
name: patch-{{- include "devnet.chain.name" $chain.name }}
name: patch-{{- include "devnet.chain.name" $chain.id }}
{{- end }}
{{- if and ($chain.faucet.enabled) (eq $chain.faucet.type "starship") }}
- name: faucet
Expand Down
Loading

0 comments on commit e4e442d

Please sign in to comment.