Skip to content

Commit 42c4af1

Browse files
authored
feat(ci): before devnet deployment, pull and apply start script from Xinfin-Node to configmap (#2361)
* before devnet deployment, pull and apply start script from Xinfin-Node to configmap * remove redundant start-scripts (use injection from Xinfin-Node repo)
1 parent e98320f commit 42c4af1

8 files changed

Lines changed: 26 additions & 681 deletions

File tree

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,32 @@ jobs:
122122
echo "image_name=$image_name"
123123
echo "image_name=$image_name" >> "$GITHUB_OUTPUT"
124124
125+
k8_update_start_script:
126+
runs-on: ubuntu-latest
127+
if: github.ref == 'refs/heads/dev-upgrade' && !startsWith(github.ref, 'refs/tags/')
128+
steps:
129+
- name: Set up kubectl
130+
uses: azure/setup-kubectl@v4
131+
with:
132+
version: "v1.19.11"
133+
- name: Configure kubeconfig
134+
run: |
135+
mkdir -p $HOME/.kube
136+
echo "${{ secrets.KUBE_CONFIG }}" | base64 --decode > $HOME/.kube/config
137+
chmod 600 $HOME/.kube/config
138+
- name: Fetch start scripts from XinFin-Node
139+
run: |
140+
set -euo pipefail
141+
curl -fsSL -o start-devnet.sh https://raw.githubusercontent.com/XinFinOrg/XinFin-Node/devnet/devnet/start-devnet.sh
142+
curl -fsSL -o start-apothem.sh https://raw.githubusercontent.com/XinFinOrg/XinFin-Node/master/testnet/start-apothem.sh
143+
curl -fsSL -o start-node.sh https://raw.githubusercontent.com/XinFinOrg/XinFin-Node/master/mainnet/start-node.sh
144+
- name: Apply configmaps
145+
run: |
146+
set -euo pipefail
147+
kubectl create configmap start-devnet-sh --from-file=start-devnet.sh --dry-run=client -o yaml | kubectl apply -f -
148+
kubectl create configmap start-apothem-sh --from-file=start-apothem.sh --dry-run=client -o yaml | kubectl apply -f -
149+
kubectl create configmap start-node-sh --from-file=start-node.sh --dry-run=client -o yaml | kubectl apply -f -
150+
125151
devnet_k8_apply:
126152
runs-on: ubuntu-latest
127153
if: github.ref == 'refs/heads/dev-upgrade' && !startsWith(github.ref, 'refs/tags/')

cicd/devnet/README.md

Lines changed: 0 additions & 52 deletions
This file was deleted.

cicd/devnet/bootnodes.list

Lines changed: 0 additions & 4 deletions
This file was deleted.

cicd/devnet/start.sh

Lines changed: 0 additions & 170 deletions
This file was deleted.

0 commit comments

Comments
 (0)