Skip to content

Commit

Permalink
Merge pull request #154 from vulcanize/pm-docker-publish
Browse files Browse the repository at this point in the history
Docker publish and stack orchestrator changes
  • Loading branch information
ashwinphatak authored May 20, 2022
2 parents 0371315 + ace12fb commit 8ea4d1e
Show file tree
Hide file tree
Showing 39 changed files with 141 additions and 121 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/on-master.yaml

This file was deleted.

12 changes: 9 additions & 3 deletions .github/workflows/on-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
integrationtest:
name: Run integration tests
env:
STACK_ORCHESTRATOR_REF: 38545ad36144800d16d61e53050bb8e784729f26
STACK_ORCHESTRATOR_REF: 35c677433aee5fafdf74eb3c251a453691b818d0
GO_ETHEREUM_REF: ef8c9f2580dd577a7c5eca538fb0ed64d53dc4a4
GOPATH: /tmp/go
DB_WRITE: true
Expand Down Expand Up @@ -98,6 +98,7 @@ jobs:
run: |
echo vulcanize_go_ethereum=$GITHUB_WORKSPACE/go-ethereum/ > ./config.sh
echo vulcanize_ipld_eth_server=$GITHUB_WORKSPACE/ipld-eth-server/ >> ./config.sh
echo vulcanize_test_contract=$GITHUB_WORKSPACE/ipld-eth-server/test/contract >> ./config.sh
echo db_write=$DB_WRITE >> ./config.sh
echo eth_forward_eth_calls=$ETH_FORWARD_ETH_CALLS >> ./config.sh
echo eth_proxy_on_error=$ETH_PROXY_ON_ERROR >> ./config.sh
Expand All @@ -115,6 +116,7 @@ jobs:
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/latest/docker-compose-db.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-go-ethereum.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-ipld-eth-server.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-contract.yml" \
--env-file "$GITHUB_WORKSPACE/config.sh" \
up -d --build
- name: Test
Expand All @@ -127,7 +129,7 @@ jobs:
integrationtest_forwardethcalls:
name: Run integration tests for direct proxy fall-through of eth_calls
env:
STACK_ORCHESTRATOR_REF: 38545ad36144800d16d61e53050bb8e784729f26
STACK_ORCHESTRATOR_REF: 35c677433aee5fafdf74eb3c251a453691b818d0
GO_ETHEREUM_REF: ef8c9f2580dd577a7c5eca538fb0ed64d53dc4a4
GOPATH: /tmp/go
DB_WRITE: false
Expand Down Expand Up @@ -165,6 +167,7 @@ jobs:
run: |
echo vulcanize_go_ethereum=$GITHUB_WORKSPACE/go-ethereum/ > ./config.sh
echo vulcanize_ipld_eth_server=$GITHUB_WORKSPACE/ipld-eth-server/ >> ./config.sh
echo vulcanize_test_contract=$GITHUB_WORKSPACE/ipld-eth-server/test/contract >> ./config.sh
echo db_write=$DB_WRITE >> ./config.sh
echo eth_forward_eth_calls=$ETH_FORWARD_ETH_CALLS >> ./config.sh
echo eth_proxy_on_error=$ETH_PROXY_ON_ERROR >> ./config.sh
Expand All @@ -182,6 +185,7 @@ jobs:
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/latest/docker-compose-db.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-go-ethereum.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-ipld-eth-server.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-contract.yml" \
--env-file "$GITHUB_WORKSPACE/config.sh" \
up -d --build
- name: Test
Expand All @@ -194,7 +198,7 @@ jobs:
integrationtest_watchedaddress_gapfillingservice:
name: Run integration tests for watched addresses with gap filling service enabled
env:
STACK_ORCHESTRATOR_REF: 38545ad36144800d16d61e53050bb8e784729f26
STACK_ORCHESTRATOR_REF: 35c677433aee5fafdf74eb3c251a453691b818d0
GO_ETHEREUM_REF: ef8c9f2580dd577a7c5eca538fb0ed64d53dc4a4
GOPATH: /tmp/go
DB_WRITE: true
Expand Down Expand Up @@ -232,6 +236,7 @@ jobs:
run: |
echo vulcanize_go_ethereum=$GITHUB_WORKSPACE/go-ethereum/ > ./config.sh
echo vulcanize_ipld_eth_server=$GITHUB_WORKSPACE/ipld-eth-server/ >> ./config.sh
echo vulcanize_test_contract=$GITHUB_WORKSPACE/ipld-eth-server/test/contract >> ./config.sh
echo db_write=$DB_WRITE >> ./config.sh
echo eth_forward_eth_calls=$ETH_FORWARD_ETH_CALLS >> ./config.sh
echo eth_proxy_on_error=$ETH_PROXY_ON_ERROR >> ./config.sh
Expand All @@ -251,6 +256,7 @@ jobs:
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/latest/docker-compose-db.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-go-ethereum.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-ipld-eth-server.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-contract.yml" \
--env-file "$GITHUB_WORKSPACE/config.sh" \
up -d --build
- name: Test
Expand Down
19 changes: 18 additions & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,27 @@ on:
release:
types: [published]
jobs:
build:
name: Run docker build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get the version
id: vars
run: echo ::set-output name=sha::$(echo ${GITHUB_SHA:0:7})
- name: Run docker build
run: make docker-build
- name: Tag docker image
run: docker tag vulcanize/ipld-eth-server docker.pkg.github.com/vulcanize/ipld-eth-server/ipld-eth-server:${{steps.vars.outputs.sha}}
- name: Docker Login
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login https://docker.pkg.github.com -u vulcanize --password-stdin
- name: Docker Push
run: docker push docker.pkg.github.com/vulcanize/ipld-eth-server/ipld-eth-server:${{steps.vars.outputs.sha}}

push_to_registries:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
needs: build
steps:
- name: Get the version
id: vars
Expand All @@ -22,4 +40,3 @@ jobs:
run: docker tag docker.pkg.github.com/vulcanize/ipld-eth-server/ipld-eth-server:${{steps.vars.outputs.sha}} vulcanize/ipld-eth-server:${{steps.vars.outputs.tag}}
- name: Docker Push to Docker Hub
run: docker push vulcanize/ipld-eth-server:${{steps.vars.outputs.tag}}

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ External dependency
## Install
Start by downloading ipld-eth-server and moving into the repo:

`GO111MODULE=off go get -d github.com/vulcanize/ipld-eth-server/v3`
`GO111MODULE=off go get -d github.com/vulcanize/ipld-eth-server/v4`

`cd $GOPATH/src/github.com/vulcanize/ipld-eth-server/v3@v3.x.x`
`cd $GOPATH/src/github.com/vulcanize/ipld-eth-server/v4@v4.x.x`

Then, build the binary:

Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"

"github.com/vulcanize/ipld-eth-server/v3/pkg/prom"
"github.com/vulcanize/ipld-eth-server/v4/pkg/prom"
)

var (
Expand Down
12 changes: 6 additions & 6 deletions cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ import (
"github.com/spf13/viper"
"github.com/vulcanize/gap-filler/pkg/mux"

"github.com/vulcanize/ipld-eth-server/v3/pkg/eth"
fill "github.com/vulcanize/ipld-eth-server/v3/pkg/fill"
"github.com/vulcanize/ipld-eth-server/v3/pkg/graphql"
srpc "github.com/vulcanize/ipld-eth-server/v3/pkg/rpc"
s "github.com/vulcanize/ipld-eth-server/v3/pkg/serve"
v "github.com/vulcanize/ipld-eth-server/v3/version"
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth"
fill "github.com/vulcanize/ipld-eth-server/v4/pkg/fill"
"github.com/vulcanize/ipld-eth-server/v4/pkg/graphql"
srpc "github.com/vulcanize/ipld-eth-server/v4/pkg/rpc"
s "github.com/vulcanize/ipld-eth-server/v4/pkg/serve"
v "github.com/vulcanize/ipld-eth-server/v4/version"
)

var ErrNoRpcEndpoints = errors.New("no rpc endpoints is available")
Expand Down
6 changes: 3 additions & 3 deletions cmd/subscribe.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"

"github.com/vulcanize/ipld-eth-server/v3/pkg/client"
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth"
w "github.com/vulcanize/ipld-eth-server/v3/pkg/serve"
"github.com/vulcanize/ipld-eth-server/v4/pkg/client"
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth"
w "github.com/vulcanize/ipld-eth-server/v4/pkg/serve"
)

// subscribeCmd represents the subscribe command
Expand Down
2 changes: 1 addition & 1 deletion cmd/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
validator "github.com/vulcanize/eth-ipfs-state-validator/v4/pkg"
ipfsethdb "github.com/vulcanize/ipfs-ethdb/v4/postgres"

s "github.com/vulcanize/ipld-eth-server/v3/pkg/serve"
s "github.com/vulcanize/ipld-eth-server/v4/pkg/serve"
)

const GroupName = "statedb-validate"
Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"

v "github.com/vulcanize/ipld-eth-server/v3/version"
v "github.com/vulcanize/ipld-eth-server/v4/version"
)

// versionCmd represents the version command
Expand Down
12 changes: 6 additions & 6 deletions documentation/apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ An example of how to subscribe to a real-time Ethereum data feed from ipld-eth-s
"github.com/ethereum/go-ethereum/rpc"
"github.com/spf13/viper"

"github.com/vulcanize/ipld-eth-server/v3/pkg/client"
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth"
"github.com/vulcanize/ipld-eth-server/v3/pkg/watch"
"github.com/vulcanize/ipld-eth-server/v4/pkg/client"
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth"
"github.com/vulcanize/ipld-eth-server/v4/pkg/watch"
)

config, _ := eth.NewEthSubscriptionConfig()
Expand Down Expand Up @@ -160,9 +160,9 @@ An example of how to subscribe to a real-time Bitcoin data feed from ipld-eth-se
"github.com/ethereum/go-ethereum/rpc"
"github.com/spf13/viper"

"github.com/vulcanize/ipld-eth-server/v3/pkg/btc"
"github.com/vulcanize/ipld-eth-server/v3/pkg/client"
"github.com/vulcanize/ipld-eth-server/v3/pkg/watch"
"github.com/vulcanize/ipld-eth-server/v4/pkg/btc"
"github.com/vulcanize/ipld-eth-server/v4/pkg/client"
"github.com/vulcanize/ipld-eth-server/v4/pkg/watch"
)

config, _ := btc.NewBtcSubscriptionConfig()
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/vulcanize/ipld-eth-server/v3
module github.com/vulcanize/ipld-eth-server/v4

go 1.15

Expand All @@ -9,7 +9,6 @@ require (
github.com/ipfs/go-cid v0.0.7
github.com/ipfs/go-ipfs-blockstore v1.0.1
github.com/ipfs/go-ipfs-ds-help v1.0.0
github.com/ipfs/go-ipld-format v0.2.0
github.com/jmoiron/sqlx v1.3.5
github.com/joho/godotenv v1.4.0
github.com/lib/pq v1.10.5
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package main
import (
"github.com/sirupsen/logrus"

"github.com/vulcanize/ipld-eth-server/v3/cmd"
"github.com/vulcanize/ipld-eth-server/v4/cmd"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (

"github.com/ethereum/go-ethereum/rpc"

"github.com/vulcanize/ipld-eth-server/v3/pkg/eth"
"github.com/vulcanize/ipld-eth-server/v3/pkg/serve"
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth"
"github.com/vulcanize/ipld-eth-server/v4/pkg/serve"
)

// Client is used to subscribe to the ipld-eth-server ipld data stream
Expand Down
2 changes: 1 addition & 1 deletion pkg/eth/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import (
"github.com/ethereum/go-ethereum/statediff"
"github.com/sirupsen/logrus"

"github.com/vulcanize/ipld-eth-server/v3/pkg/shared"
"github.com/vulcanize/ipld-eth-server/v4/pkg/shared"
)

// APIName is the namespace for the watcher's eth api
Expand Down
8 changes: 4 additions & 4 deletions pkg/eth/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"

"github.com/vulcanize/ipld-eth-server/v3/pkg/eth"
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth/test_helpers"
"github.com/vulcanize/ipld-eth-server/v3/pkg/shared"
ethServerShared "github.com/vulcanize/ipld-eth-server/v3/pkg/shared"
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth"
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth/test_helpers"
"github.com/vulcanize/ipld-eth-server/v4/pkg/shared"
ethServerShared "github.com/vulcanize/ipld-eth-server/v4/pkg/shared"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pkg/eth/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import (

ethServerShared "github.com/ethereum/go-ethereum/statediff/indexer/shared"

"github.com/vulcanize/ipld-eth-server/v3/pkg/shared"
"github.com/vulcanize/ipld-eth-server/v4/pkg/shared"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pkg/eth/cid_retriever.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"github.com/lib/pq"
log "github.com/sirupsen/logrus"

"github.com/vulcanize/ipld-eth-server/v3/pkg/shared"
"github.com/vulcanize/ipld-eth-server/v4/pkg/shared"
)

// Retriever interface for substituting mocks in tests
Expand Down
6 changes: 3 additions & 3 deletions pkg/eth/cid_retriever_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"

"github.com/vulcanize/ipld-eth-server/v3/pkg/eth"
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth/test_helpers"
"github.com/vulcanize/ipld-eth-server/v3/pkg/shared"
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth"
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth/test_helpers"
"github.com/vulcanize/ipld-eth-server/v4/pkg/shared"
)

var (
Expand Down
8 changes: 4 additions & 4 deletions pkg/eth/eth_state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"

"github.com/vulcanize/ipld-eth-server/v3/pkg/eth"
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth/test_helpers"
"github.com/vulcanize/ipld-eth-server/v3/pkg/shared"
ethServerShared "github.com/vulcanize/ipld-eth-server/v3/pkg/shared"
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth"
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth/test_helpers"
"github.com/vulcanize/ipld-eth-server/v4/pkg/shared"
ethServerShared "github.com/vulcanize/ipld-eth-server/v4/pkg/shared"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions pkg/eth/filterer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"

"github.com/vulcanize/ipld-eth-server/v3/pkg/eth"
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth/test_helpers"
"github.com/vulcanize/ipld-eth-server/v3/pkg/shared"
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth"
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth/test_helpers"
"github.com/vulcanize/ipld-eth-server/v4/pkg/shared"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pkg/eth/ipld_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/ethereum/go-ethereum/statediff/indexer/models"
"github.com/jmoiron/sqlx"
log "github.com/sirupsen/logrus"
"github.com/vulcanize/ipld-eth-server/v3/pkg/shared"
"github.com/vulcanize/ipld-eth-server/v4/pkg/shared"
)

// Fetcher interface for substituting mocks in tests
Expand Down
6 changes: 3 additions & 3 deletions pkg/eth/ipld_fetcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"

"github.com/vulcanize/ipld-eth-server/v3/pkg/eth"
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth/test_helpers"
"github.com/vulcanize/ipld-eth-server/v3/pkg/shared"
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth"
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth/test_helpers"
"github.com/vulcanize/ipld-eth-server/v4/pkg/shared"
)

var _ = Describe("IPLDFetcher", func() {
Expand Down
2 changes: 1 addition & 1 deletion pkg/eth/test_helpers/test_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
"github.com/multiformats/go-multihash"
log "github.com/sirupsen/logrus"

"github.com/vulcanize/ipld-eth-server/v3/pkg/eth"
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth"
)

// Test variables
Expand Down
2 changes: 1 addition & 1 deletion pkg/fill/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"github.com/jmoiron/sqlx"
log "github.com/sirupsen/logrus"

"github.com/vulcanize/ipld-eth-server/v3/pkg/serve"
"github.com/vulcanize/ipld-eth-server/v4/pkg/serve"
)

// WatchedAddress type is used to process currently watched addresses
Expand Down
Loading

0 comments on commit 8ea4d1e

Please sign in to comment.