Support for git hosts other than github (#407)

* Update repository list file

* Add host part to repo name

* Allow git hosts other than github
This commit is contained in:
David Boreham 2023-05-25 07:19:21 +08:00 committed by GitHub
parent 1d8f252a51
commit ec6b5439f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 114 additions and 101 deletions

View File

@ -1,35 +1,36 @@
cerc-io/ipld-eth-db github.com/cerc-io/ipld-eth-db
cerc-io/go-ethereum github.com/cerc-io/go-ethereum
cerc-io/ipld-eth-server github.com/cerc-io/ipld-eth-server
cerc-io/eth-statediff-service github.com/cerc-io/eth-statediff-service
cerc-io/eth-statediff-fill-service github.com/cerc-io/eth-statediff-fill-service
cerc-io/ipld-eth-db-validator github.com/cerc-io/ipld-eth-db-validator
cerc-io/ipld-eth-beacon-indexer github.com/cerc-io/ipld-eth-beacon-indexer
cerc-io/ipld-eth-beacon-db github.com/cerc-io/ipld-eth-beacon-db
cerc-io/laconicd github.com/cerc-io/laconicd
cerc-io/laconic-sdk github.com/cerc-io/laconic-sdk
cerc-io/laconic-registry-cli github.com/cerc-io/laconic-registry-cli
cerc-io/laconic-console github.com/cerc-io/laconic-console
cerc-io/mobymask-watcher github.com/cerc-io/mobymask-watcher
cerc-io/watcher-ts github.com/cerc-io/watcher-ts
cerc-io/mobymask-v2-watcher-ts github.com/cerc-io/mobymask-v2-watcher-ts
cerc-io/MobyMask github.com/cerc-io/MobyMask
vulcanize/uniswap-watcher-ts github.com/vulcanize/uniswap-watcher-ts
vulcanize/uniswap-v3-info github.com/vulcanize/uniswap-v3-info
vulcanize/assemblyscript github.com/vulcanize/assemblyscript
cerc-io/eth-probe github.com/cerc-io/eth-probe
cerc-io/tx-spammer github.com/cerc-io/tx-spammer
dboreham/foundry github.com/dboreham/foundry
lirewine/gem github.com/lirewine/gem
lirewine/debug github.com/lirewine/debug
lirewine/crypto github.com/lirewine/crypto
lirewine/sdk github.com/lirewine/sdk
telackey/act_runner github.com/telackey/act_runner
ethereum-optimism/op-geth github.com/ethereum-optimism/op-geth
ethereum-optimism/optimism github.com/ethereum-optimism/optimism
pokt-network/pocket-core github.com/pokt-network/pocket-core
pokt-network/pocket-core-deployments github.com/pokt-network/pocket-core-deployments
cerc-io/azimuth-watcher-ts github.com/cerc-io/azimuth-watcher-ts
cerc-io/ipld-eth-state-snapshot github.com/cerc-io/ipld-eth-state-snapshot
cerc-io/gelato-watcher-ts github.com/cerc-io/gelato-watcher-ts
filecoin-project/lotus github.com/filecoin-project/lotus
git.vdb.to/cerc-io/test-project

View File

@ -1,7 +1,7 @@
version: "1.0" version: "1.0"
name: azimuth name: azimuth
repos: repos:
- cerc-io/azimuth-watcher-ts - github.com/cerc-io/azimuth-watcher-ts
containers: containers:
- cerc/watcher-azimuth - cerc/watcher-azimuth
pods: pods:

View File

@ -2,10 +2,10 @@ version: "1.0"
name: chain-chunker name: chain-chunker
decription: "Stack to build containers for chain-chunker" decription: "Stack to build containers for chain-chunker"
repos: repos:
- cerc-io/ipld-eth-state-snapshot - github.com/cerc-io/ipld-eth-state-snapshot
- cerc-io/eth-statediff-service - github.com/cerc-io/eth-statediff-service
- cerc-io/ipld-eth-db - github.com/cerc-io/ipld-eth-db
- cerc-io/ipld-eth-server - github.com/cerc-io/ipld-eth-server
containers: containers:
- cerc/ipld-eth-state-snapshot - cerc/ipld-eth-state-snapshot
- cerc/eth-statediff-service - cerc/eth-statediff-service

View File

@ -1,11 +1,11 @@
version: "1.0" version: "1.0"
name: erc20-watcher name: erc20-watcher
repos: repos:
- cerc-io/go-ethereum - github.com/cerc-io/go-ethereum
- cerc-io/ipld-eth-db - github.com/cerc-io/ipld-eth-db
- cerc-io/ipld-eth-server - github.com/cerc-io/ipld-eth-server
- cerc-io/watcher-ts - github.com/cerc-io/watcher-ts
- dboreham/foundry - github.com/dboreham/foundry
containers: containers:
- cerc/foundry - cerc/foundry
- cerc/go-ethereum - cerc/go-ethereum

View File

@ -1,10 +1,10 @@
version: "1.0" version: "1.0"
name: erc721-watcher name: erc721-watcher
repos: repos:
- cerc-io/go-ethereum - github.com/cerc-io/go-ethereum
- cerc-io/ipld-eth-db - github.com/cerc-io/ipld-eth-db
- cerc-io/ipld-eth-server - github.com/cerc-io/ipld-eth-server
- cerc-io/watcher-ts - github.com/cerc-io/watcher-ts
containers: containers:
- cerc/go-ethereum - cerc/go-ethereum
- cerc/go-ethereum-foundry - cerc/go-ethereum-foundry

View File

@ -2,11 +2,11 @@ version: "1.0"
name: fixturenet-eth-loaded name: fixturenet-eth-loaded
decription: "Loaded Ethereum Fixturenet" decription: "Loaded Ethereum Fixturenet"
repos: repos:
- cerc-io/go-ethereum - github.com/cerc-io/go-ethereum
- cerc-io/tx-spammer - github.com/cerc-io/tx-spammer
- cerc-io/ipld-eth-server - github.com/cerc-io/ipld-eth-server
- cerc-io/ipld-eth-db - github.com/cerc-io/ipld-eth-db
- cerc/go-ethereum - github.com/cerc-io/go-ethereum
containers: containers:
- cerc/lighthouse - cerc/lighthouse
- cerc/fixturenet-eth-geth - cerc/fixturenet-eth-geth

View File

@ -2,8 +2,8 @@ version: "1.2"
name: fixturenet-eth-tx name: fixturenet-eth-tx
decription: "Ethereum Fixturenet w/ tx-spammer" decription: "Ethereum Fixturenet w/ tx-spammer"
repos: repos:
- cerc-io/go-ethereum - github.com/cerc-io/go-ethereum
- cerc-io/tx-spammer - github.com/cerc-io/tx-spammer
- dboreham/foundry - dboreham/foundry
containers: containers:
- cerc/go-ethereum - cerc/go-ethereum

View File

@ -66,7 +66,7 @@ It is not necessary to use them all at once, but a complete example follows:
``` ```
# Setup # Setup
$ laconic-so setup-repositories --include cerc-io/go-ethereum,cerc-io/ipld-eth-db,cerc-io/ipld-eth-server,cerc-io/ipld-eth-beacon-db,cerc-io/ipld-eth-beacon-indexer,cerc-io/eth-probe,cerc-io/tx-spammer $ laconic-so setup-repositories --include github.com/cerc-io/go-ethereum,github.com/cerc-io/ipld-eth-db,github.com/cerc-io/ipld-eth-server,github.com/cerc-io/ipld-eth-beacon-db,github.com/cerc-io/ipld-eth-beacon-indexer,github.com/cerc-io/eth-probe,github.com/cerc-io/tx-spammer
# Build # Build
$ laconic-so build-containers --include cerc/go-ethereum,cerc/lighthouse,cerc/fixturenet-eth-geth,cerc/fixturenet-eth-lighthouse,cerc/ipld-eth-db,cerc/ipld-eth-server,cerc/ipld-eth-beacon-db,cerc/ipld-eth-beacon-indexer,cerc/eth-probe,cerc/keycloak,cerc/tx-spammer $ laconic-so build-containers --include cerc/go-ethereum,cerc/lighthouse,cerc/fixturenet-eth-geth,cerc/fixturenet-eth-lighthouse,cerc/ipld-eth-db,cerc/ipld-eth-server,cerc/ipld-eth-beacon-db,cerc/ipld-eth-beacon-indexer,cerc/eth-probe,cerc/keycloak,cerc/tx-spammer

View File

@ -2,8 +2,8 @@ version: "1.1"
name: fixturenet-eth name: fixturenet-eth
decription: "Ethereum Fixturenet" decription: "Ethereum Fixturenet"
repos: repos:
- cerc-io/go-ethereum - github.com/cerc-io/go-ethereum
- dboreham/foundry - github.com/dboreham/foundry
containers: containers:
- cerc/go-ethereum - cerc/go-ethereum
- cerc/lighthouse - cerc/lighthouse

View File

@ -2,14 +2,14 @@ version: "1.1"
name: fixturenet-laconic-loaded name: fixturenet-laconic-loaded
description: "A full featured laconic fixturenet" description: "A full featured laconic fixturenet"
repos: repos:
- cerc-io/laconicd - github.com/cerc-io/laconicd
- lirewine/debug - github.com/lirewine/debug
- lirewine/crypto - github.com/lirewine/crypto
- lirewine/gem - github.com/lirewine/gem
- lirewine/sdk - github.com/lirewine/sdk
- cerc-io/laconic-sdk - github.com/cerc-io/laconic-sdk
- cerc-io/laconic-registry-cli - github.com/cerc-io/laconic-registry-cli
- cerc-io/laconic-console - github.com/cerc-io/laconic-console
npms: npms:
- laconic-sdk - laconic-sdk
- laconic-registry-cli - laconic-registry-cli

View File

@ -2,9 +2,9 @@ version: "1.0"
name: fixturenet-laconicd name: fixturenet-laconicd
description: "A laconicd fixturenet" description: "A laconicd fixturenet"
repos: repos:
- cerc-io/laconicd - github.com/cerc-io/laconicd
- cerc-io/laconic-sdk - github.com/cerc-io/laconic-sdk
- cerc-io/laconic-registry-cli - github.com/cerc-io/laconic-registry-cli
npms: npms:
- laconic-sdk - laconic-sdk
- laconic-registry-cli - laconic-registry-cli

View File

@ -2,7 +2,7 @@ version: "1.0"
name: fixturenet-lotus name: fixturenet-lotus
description: "A lotus fixturenet" description: "A lotus fixturenet"
repos: repos:
- filecoin-project/lotus - github.com/filecoin-project/lotus
containers: containers:
- cerc/lotus - cerc/lotus
pods: pods:

View File

@ -9,7 +9,7 @@ Prerequisite: An L1 Ethereum RPC endpoint
Clone required repositories: Clone required repositories:
```bash ```bash
laconic-so --stack fixturenet-optimism setup-repositories --exclude cerc-io/go-ethereum laconic-so --stack fixturenet-optimism setup-repositories --exclude github.com/cerc-io/go-ethereum
# If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned below and re-run the command # If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned below and re-run the command
``` ```

View File

@ -2,10 +2,10 @@ version: "1.0"
name: fixturenet-optimism name: fixturenet-optimism
decription: "Optimism Fixturenet" decription: "Optimism Fixturenet"
repos: repos:
- cerc-io/go-ethereum - github.com/cerc-io/go-ethereum
- dboreham/foundry - github.com/dboreham/foundry
- ethereum-optimism/optimism - github.com/ethereum-optimism/optimism
- ethereum-optimism/op-geth - github.com/ethereum-optimism/op-geth
containers: containers:
- cerc/go-ethereum - cerc/go-ethereum
- cerc/lighthouse - cerc/lighthouse

View File

@ -2,9 +2,9 @@ version: "1.0"
name: fixturenet-pocket name: fixturenet-pocket
description: "A single node pocket chain that can serve relays from the geth-1 node in eth-fixturenet" description: "A single node pocket chain that can serve relays from the geth-1 node in eth-fixturenet"
repos: repos:
- cerc-io/go-ethereum - github.com/cerc-io/go-ethereum
- pokt-network/pocket-core - github.com/pokt-network/pocket-core
- pokt-network/pocket-core-deployments # contains the dockerfile - github.com/pokt-network/pocket-core-deployments # contains the dockerfile
containers: containers:
- cerc/go-ethereum - cerc/go-ethereum
- cerc/lighthouse - cerc/lighthouse

View File

@ -1,7 +1,7 @@
version: "1.0" version: "1.0"
name: gelato name: gelato
repos: repos:
- cerc-io/gelato-watcher-ts - github.com/cerc-io/gelato-watcher-ts
containers: containers:
- cerc/watcher-gelato - cerc/watcher-gelato
pods: pods:

View File

@ -9,7 +9,7 @@ Prerequisite: L2 Optimism Geth and Node RPC endpoints
Clone required repositories: Clone required repositories:
```bash ```bash
laconic-so --stack mobymask-v2 setup-repositories --include cerc-io/MobyMask,cerc-io/watcher-ts,cerc-io/mobymask-v2-watcher-ts laconic-so --stack mobymask-v2 setup-repositories --include github.com/cerc-io/MobyMask,github.com/cerc-io/watcher-ts,github.com/cerc-io/mobymask-v2-watcher-ts
# If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned below and re-run the command # If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned below and re-run the command
``` ```

View File

@ -1,13 +1,13 @@
version: "1.0" version: "1.0"
name: mobymask-v2 name: mobymask-v2
repos: repos:
- cerc-io/go-ethereum - github.com/cerc-io/go-ethereum
- dboreham/foundry - github.com/dboreham/foundry
- ethereum-optimism/optimism - github.com/ethereum-optimism/optimism
- ethereum-optimism/op-geth - github.com/ethereum-optimism/op-geth
- cerc-io/watcher-ts - github.com/cerc-io/watcher-ts
- cerc-io/mobymask-v2-watcher-ts - github.com/cerc-io/mobymask-v2-watcher-ts
- cerc-io/MobyMask - github.com/cerc-io/MobyMask
containers: containers:
- cerc/go-ethereum - cerc/go-ethereum
- cerc/lighthouse - cerc/lighthouse

View File

@ -14,7 +14,7 @@ This demo has been tested on a `Ubuntu 22.04 LTS` machine with `8GB` of RAM
Clone required repositories: Clone required repositories:
```bash ```bash
laconic-so --stack mobymask-v2 setup-repositories --include cerc-io/MobyMask,cerc-io/watcher-ts,cerc-io/mobymask-v2-watcher-ts laconic-so --stack mobymask-v2 setup-repositories --include github.com/cerc-io/MobyMask,github.com/cerc-io/watcher-ts,github.com/cerc-io/mobymask-v2-watcher-ts
# This will clone the required repositories at ~/cerc # This will clone the required repositories at ~/cerc
# If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned in the next step and re-run the command # If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned in the next step and re-run the command

View File

@ -11,7 +11,7 @@ This deployment expects that ipld-eth-server's endpoints are available on the lo
## Clone required repositories ## Clone required repositories
``` ```
$ laconic-so setup-repositories --include cerc-io/watcher-ts $ laconic-so setup-repositories --include github.com/cerc-io/watcher-ts
``` ```
## Build the watcher container ## Build the watcher container

View File

@ -1,7 +1,7 @@
version: "1.0" version: "1.0"
name: mobymask-watcher name: mobymask-watcher
repos: repos:
- cerc-io/watcher-ts/v0.2.19 - github.com/cerc-io/watcher-ts/v0.2.19
containers: containers:
- cerc/watcher-mobymask - cerc/watcher-mobymask
pods: pods:

View File

@ -2,8 +2,8 @@ version: "1.1"
name: package-registry name: package-registry
decription: "Local Package Registry" decription: "Local Package Registry"
repos: repos:
- cerc-io/hosting - github.com/cerc-io/hosting
- telackey/act_runner - github.com/telackey/act_runner
containers: containers:
- cerc/act-runner - cerc/act-runner
- cerc/act-runner-task-executor - cerc/act-runner-task-executor

View File

@ -2,7 +2,8 @@ version: "1.0"
name: test name: test
description: "A test stack" description: "A test stack"
repos: repos:
- cerc-io/laconicd - github.com/cerc-io/laconicd
- git.vdb.to/cerc-io/test-project
containers: containers:
- cerc/test-container - cerc/test-container
pods: pods:

View File

@ -1,8 +1,8 @@
version: "1.0" version: "1.0"
name: uniswap-v3 name: uniswap-v3
repos: repos:
- vulcanize/uniswap-watcher-ts - github.com/vulcanize/uniswap-watcher-ts
- vulcanize/uniswap-v3-info - github.com/vulcanize/uniswap-v3-info
containers: containers:
- cerc/watcher-uniswap-v3 - cerc/watcher-uniswap-v3
- cerc/uniswap-v3-info - cerc/uniswap-v3-info

View File

@ -125,11 +125,22 @@ def command(ctx, include, exclude, git_ssh, check_only, pull, branches_file):
if verbose: if verbose:
print(f"Excluding: {repo}") print(f"Excluding: {repo}")
def process_repo(repo): def host_and_path_for_repo(fully_qualified_repo):
git_ssh_prefix = "git@github.com:" repo_split = fully_qualified_repo.split("/")
git_http_prefix = "https://github.com/" # Legacy unqualified repo means github
full_github_repo_path = f"{git_ssh_prefix if git_ssh else git_http_prefix}{repo}" if len(repo_split) == 2:
repoName = repo.split("/")[-1] return "github.com", "/".join(repo_split)
else:
if len(repo_split) == 3:
# First part is the host
return repo_split[0], "/".join(repo_split[1:])
def process_repo(fully_qualified_repo):
repo_host, repo_path = host_and_path_for_repo(fully_qualified_repo)
git_ssh_prefix = f"git@{repo_host}:"
git_http_prefix = f"https://{repo_host}/"
full_github_repo_path = f"{git_ssh_prefix if git_ssh else git_http_prefix}{repo_path}"
repoName = repo_path.split("/")[-1]
full_filesystem_repo_path = os.path.join(dev_root_path, repoName) full_filesystem_repo_path = os.path.join(dev_root_path, repoName)
is_present = os.path.isdir(full_filesystem_repo_path) is_present = os.path.isdir(full_filesystem_repo_path)
if not quiet: if not quiet: