Skip to content

Commit

Permalink
config updates (#119)
Browse files Browse the repository at this point in the history
chore: config updates and build image only once
  • Loading branch information
allnil authored Dec 5, 2024
1 parent 2c92959 commit facd395
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 15 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/gcp-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,9 @@ jobs:
with:
images: us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wvm
tags: |
# Include latest for main branch and tagged releases
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' || (github.ref_type == 'tag' && github.event.base_ref == 'refs/heads/main') }}
# Tag dev as nightly
type=raw,value=nightly,enable=${{ github.ref == 'refs/heads/dev' }}
# Always include tag if it's a tag event
type=ref,event=tag
# Include branch name for other branches
type=ref,event=branch,enable=${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/dev' }}
- name: Authenticate with Google Cloud
Expand Down Expand Up @@ -66,20 +62,23 @@ jobs:
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}

- name: Build for testing
id: build-test
# CHANGED: Combined build step for both local testing and registry images
- name: Build and export image
id: build
uses: docker/build-push-action@v6
with:
context: .
push: false
load: true
tags: wvm:local
tags: |
wvm:local
${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: |
type=registry,ref=us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wvm:buildcache
build-args: |
BUILDKIT_INLINE_CACHE=1
# Verify the test build
- name: Verify local image
run: |
if ! docker image inspect wvm:local >/dev/null 2>&1; then
Expand All @@ -88,7 +87,6 @@ jobs:
fi
echo "Local image verified successfully"
# Set up test environment
- name: Setup test environment
run: |
mkdir -p .testnet
Expand All @@ -98,7 +96,6 @@ jobs:
echo '${{ secrets.GCP_CREDENTIALS_JSON }}' > ./execution/key.json
chmod 600 ./execution/key.json
# Run tests with proper error collection
- name: Run tests
id: test
continue-on-error: true
Expand Down Expand Up @@ -154,9 +151,9 @@ jobs:
cd .testnet || true
docker compose down || true
cd ..
# Use sudo to remove directories that might have root ownership
sudo rm -rf .testnet
# CHANGED: Modified push step to use existing image
- name: Push to registry
if: success() || github.event.inputs.force_build == 'true'
uses: docker/build-push-action@v6
Expand All @@ -169,4 +166,3 @@ jobs:
type=registry,ref=us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wvm:buildcache
cache-to: |
type=registry,ref=us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_ARTIFACT_REPO }}/wvm:buildcache,mode=max
Empty file added etc/bqconfig/bq-config.json
Empty file.
4 changes: 2 additions & 2 deletions etc/weave_vm_testnet/docker-compose-add-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ services:
- reth_genesis:/genesis:ro
- logs:/root/logs
- ./../jwttoken:/root/jwt:ro
- ./../bqconfig:/root/bqconfig:ro
command:
- node
- --metrics=0.0.0.0:9001
Expand All @@ -46,11 +47,11 @@ services:
- --discovery.v5.port=30304
- --trusted-peers=enode://e6592ab87a01aeb6425a494629355718984ce26f5f256f2e1c90615bd0c93d0afabcf87caddc0d058123f6e47f26503c937970833186647201f2ffda759dcc74@34.107.39.173:30303
- --bootnodes=enode://e6592ab87a01aeb6425a494629355718984ce26f5f256f2e1c90615bd0c93d0afabcf87caddc0d058123f6e47f26503c937970833186647201f2ffda759dcc74@34.107.39.173:30303
- --debug.tip=0xf55fd86dbd5df2149a9c5a0aa18e9aab2b76f1c1aeff8dd948eae16199cb0bac
- -vvvv
- --rpc.eth-proof-window=3888000
environment:
- BLOCKED_PC=17,18,19,20,21,22
- CONFIG=/root/bqconfig/bq-config.json

# default prometheus + grafana setup
prometheus:
Expand Down Expand Up @@ -185,4 +186,3 @@ volumes:
grafanadata:
testnetdata:
lighthousedata:

3 changes: 2 additions & 1 deletion etc/weave_vm_testnet/docker-compose-first-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ services:
- reth_genesis:/genesis:ro
- logs:/root/logs
- ./../jwttoken:/root/jwt:ro
- ./../bqconfig:/root/bqconfig:ro
command:
- node
- --metrics=0.0.0.0:9001
Expand Down Expand Up @@ -48,6 +49,7 @@ services:
- --rpc.eth-proof-window=3888000
environment:
- BLOCKED_PC=17,18,19,20,21,22
- CONFIG=/root/bqconfig/bq-config.json

# default prometheus + grafana setup
prometheus:
Expand Down Expand Up @@ -178,4 +180,3 @@ volumes:
grafanadata:
testnetdata:
lighthousedata:

0 comments on commit facd395

Please sign in to comment.