From 80091783604e3eb66d55fc394c133fb434884d46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= <20141918+eduadiez@users.noreply.github.com> Date: Thu, 5 Sep 2019 17:29:24 +0200 Subject: [PATCH 01/24] Advance manifest to new version: 0.1.1 --- dappnode_package.json | 43 ++++++++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/dappnode_package.json b/dappnode_package.json index 2a97c86..fc4265f 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,30 +1,47 @@ { - "name": "ethchain-geth.public.dappnode.eth", - "version": "0.0.3", - "description": "Mainnet Geth", - "avatar": "/ipfs/QmTfnrUdZWaMgr2Zi1h1Z7zS5CbYtQZRs72yqKZQHj5fxT", + "name": "geth.dnp.dappnode.eth", + "version": "0.1.1", + "upstreamVersion": "1.9.3", + "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", + "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", + "avatar": "/ipfs/QmbxQDuXW8AjrP4UKbG7Aothehvzg5PdLDBn7cdGWjvpmU", "type": "library", "chain": "ethereum", "image": { - "path": "ethchain-geth.public.dappnode.eth_0.0.3.tar.xz", - "hash": "/ipfs/QmdQF3arvXiEkJ8DSR1auzCqxyhpmv1fGL1acTBQYyZvfr", - "size": 16184810, + "path": "", + "hash": "", + "size": "", "restart": "always", "ports": [ - "61313:30303", - "61313:30303/udp", - "61314:30304" + "30303", + "30303/udp", + "30304/udp" ], "volumes": [ - "ethchain-geth:/root/.ethereum/ethchain-geth" + "data:/root/.ethereum" ], "environment": [ "EXTRA_OPTS=--rpcapi eth,net,web3,txpool" ] }, - "author": "nanexcool", + "author": "DAppNode Association (https://github.com/dappnode)", + "contributors": [ + "Mariano Conti (nanexcool) (hhttps://github.com/nanexcool)", + "Eduardo Antuña (https://github.com/eduadiez)" + ], + "categories": [ + "Blockchain" + ], "license": "GLP-3.0", "links": { - "endpoint": "http://my.ethchain-geth.public.dappnode.eth:8545" + "endpoint": "http://geth.dappnode:8545", + "homepage": "https://github.com/dappnode/DAppNodePackage-geth#readme" + }, + "repository": { + "type": "git", + "url": "https://github.com/dappnode/DAppNodePackage-geth.git" + }, + "bugs": { + "url": "https://github.com/dappnode/DAppNodePackage-geth/issues" } } \ No newline at end of file From 4f8ff15c24d699964fad587930e8acf4525d01cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Thu, 5 Sep 2019 18:49:40 +0200 Subject: [PATCH 02/24] Update --- README.md | 69 ++++++++++++++++++++++++++++++++++++++++++ build/Dockerfile | 8 ++--- dappnode_package.json | 43 ++++++++++++++++++-------- docker-compose.yml | 8 ++--- geth-avatar.png | Bin 0 -> 4716 bytes 5 files changed, 107 insertions(+), 21 deletions(-) create mode 100644 README.md create mode 100644 geth-avatar.png diff --git a/README.md b/README.md new file mode 100644 index 0000000..196c130 --- /dev/null +++ b/README.md @@ -0,0 +1,69 @@ +# Görli testnet DAppNode package + +[![DAppNodeStore Available](https://img.shields.io/badge/DAppNodeStore-Available-brightgreen.svg)](http://my.dappnode/#/installer/geth.dnp.dappnode.eth) + + +[![Geth github](https://img.shields.io/badge/Geth-Github-blue.svg)](https://github.com/ethereum/go-ethereum) + +You can use this package without installing it in your DAppNode following these instructions: + +## Prerequisites + +- git + + Install [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) commandline tool. + +- docker + + Install [docker](https://docs.docker.com/engine/installation). The community edition (docker-ce) will work. In Linux make sure you grant permissions to the current user to use docker by adding current user to docker group, `sudo usermod -aG docker $USER`. Once you update the users group, exit from the current terminal and open a new one to make effect. + +- docker-compose + + Install [docker-compose](https://docs.docker.com/compose/install) + +**Note**: Make sure you can run `git`, `docker ps`, `docker-compose` without any issue and without sudo command. + + +## Buidling + +`docker-compose build` + +## Running + +### Start + +`docker-compose up -d` + +### View logs + +`docker-compose logs -f` + +### Stop + +`docker-compose down` + +## Extra options + +You can edit the `docker-compose.yml` and add extra options, such as: +``` + - EXTRA_OPTS=--wsapi db,eth,net,ssh,miner,web3,personal,admin,txpool +``` + +## Connect using web3js + +If the package is running and you're connected to your dappnode you can use: +``` +var Web3 = require('web3'); +var web3 = new Web3('ws://my.geth.dappnode:8546') +web3.eth.getBlockNumber().then(console.log) +``` +In case you are running it locally: +``` +var Web3 = require('web3'); +var web3 = new Web3('ws://127.0.0.1:8546') +web3.eth.getBlockNumber().then(console.log) +``` + +## License + +This project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details diff --git a/build/Dockerfile b/build/Dockerfile index 0f11e46..b1aeadd 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -5,10 +5,10 @@ WORKDIR /usr/src/app RUN apk add --no-cache make gcc musl-dev linux-headers git jq -ARG COMMIT=cfbb969da803d4cc92e1a64fc1b3c06db299b564 +ARG BRANCH=v1.9.3 -RUN git clone https://github.com/ethereum/go-ethereum.git -RUN cd go-ethereum && git checkout $COMMIT && make geth +RUN git clone -b $BRANCH https://github.com/ethereum/go-ethereum.git +RUN cd go-ethereum && make geth # Pull Geth into a second stage deploy alpine container FROM alpine:latest @@ -16,4 +16,4 @@ FROM alpine:latest RUN apk add --no-cache ca-certificates COPY --from=builder /usr/src/app/go-ethereum/build/bin/geth /usr/local/bin/ -ENTRYPOINT geth --datadir /root/.ethereum/ethchain-geth --rpc --rpcaddr 0.0.0.0 --rpccorsdomain "*" --rpcvhosts "*" --ws --wsorigins "*" --wsaddr 0.0.0.0 $EXTRA_OPTS +ENTRYPOINT geth --rpc --rpcaddr 0.0.0.0 --rpccorsdomain "*" --rpcvhosts "*" --ws --wsorigins "*" --wsaddr 0.0.0.0 $EXTRA_OPTS diff --git a/dappnode_package.json b/dappnode_package.json index 2a97c86..fc4265f 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,30 +1,47 @@ { - "name": "ethchain-geth.public.dappnode.eth", - "version": "0.0.3", - "description": "Mainnet Geth", - "avatar": "/ipfs/QmTfnrUdZWaMgr2Zi1h1Z7zS5CbYtQZRs72yqKZQHj5fxT", + "name": "geth.dnp.dappnode.eth", + "version": "0.1.1", + "upstreamVersion": "1.9.3", + "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", + "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", + "avatar": "/ipfs/QmbxQDuXW8AjrP4UKbG7Aothehvzg5PdLDBn7cdGWjvpmU", "type": "library", "chain": "ethereum", "image": { - "path": "ethchain-geth.public.dappnode.eth_0.0.3.tar.xz", - "hash": "/ipfs/QmdQF3arvXiEkJ8DSR1auzCqxyhpmv1fGL1acTBQYyZvfr", - "size": 16184810, + "path": "", + "hash": "", + "size": "", "restart": "always", "ports": [ - "61313:30303", - "61313:30303/udp", - "61314:30304" + "30303", + "30303/udp", + "30304/udp" ], "volumes": [ - "ethchain-geth:/root/.ethereum/ethchain-geth" + "data:/root/.ethereum" ], "environment": [ "EXTRA_OPTS=--rpcapi eth,net,web3,txpool" ] }, - "author": "nanexcool", + "author": "DAppNode Association (https://github.com/dappnode)", + "contributors": [ + "Mariano Conti (nanexcool) (hhttps://github.com/nanexcool)", + "Eduardo Antuña (https://github.com/eduadiez)" + ], + "categories": [ + "Blockchain" + ], "license": "GLP-3.0", "links": { - "endpoint": "http://my.ethchain-geth.public.dappnode.eth:8545" + "endpoint": "http://geth.dappnode:8545", + "homepage": "https://github.com/dappnode/DAppNodePackage-geth#readme" + }, + "repository": { + "type": "git", + "url": "https://github.com/dappnode/DAppNodePackage-geth.git" + }, + "bugs": { + "url": "https://github.com/dappnode/DAppNodePackage-geth/issues" } } \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 677b6e4..9cab3ae 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,10 +1,10 @@ version: '3.4' services: - ethchain-geth.public.dappnode.eth: - image: 'ethchain-geth.public.dappnode.eth:0.0.3' + geth.dnp.dappnode.eth: + image: 'geth.dnp.dappnode.eth:0.1.1' build: ./build volumes: - - 'ethchain-geth:/root/.ethereum/ethchain-geth' + - 'geth:/root/.ethereum' environment: - EXTRA_OPTS= ports: @@ -14,4 +14,4 @@ services: - '61313:30303/udp' - '61314:30304/udp' volumes: - ethchain-geth: {} \ No newline at end of file + geth: {} diff --git a/geth-avatar.png b/geth-avatar.png new file mode 100644 index 0000000000000000000000000000000000000000..27b1dff22b88bc96c5186fbd17e23a49f5f0a221 GIT binary patch literal 4716 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 Date: Mon, 21 Oct 2019 16:11:14 +0200 Subject: [PATCH 03/24] Updated --- README.md | 69 +++++++++++++++++++++++++++++++++++++++++++ build/Dockerfile | 8 ++--- dappnode_package.json | 20 +------------ docker-compose.yml | 19 ++++++------ 4 files changed, 83 insertions(+), 33 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..196c130 --- /dev/null +++ b/README.md @@ -0,0 +1,69 @@ +# Görli testnet DAppNode package + +[![DAppNodeStore Available](https://img.shields.io/badge/DAppNodeStore-Available-brightgreen.svg)](http://my.dappnode/#/installer/geth.dnp.dappnode.eth) + + +[![Geth github](https://img.shields.io/badge/Geth-Github-blue.svg)](https://github.com/ethereum/go-ethereum) + +You can use this package without installing it in your DAppNode following these instructions: + +## Prerequisites + +- git + + Install [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) commandline tool. + +- docker + + Install [docker](https://docs.docker.com/engine/installation). The community edition (docker-ce) will work. In Linux make sure you grant permissions to the current user to use docker by adding current user to docker group, `sudo usermod -aG docker $USER`. Once you update the users group, exit from the current terminal and open a new one to make effect. + +- docker-compose + + Install [docker-compose](https://docs.docker.com/compose/install) + +**Note**: Make sure you can run `git`, `docker ps`, `docker-compose` without any issue and without sudo command. + + +## Buidling + +`docker-compose build` + +## Running + +### Start + +`docker-compose up -d` + +### View logs + +`docker-compose logs -f` + +### Stop + +`docker-compose down` + +## Extra options + +You can edit the `docker-compose.yml` and add extra options, such as: +``` + - EXTRA_OPTS=--wsapi db,eth,net,ssh,miner,web3,personal,admin,txpool +``` + +## Connect using web3js + +If the package is running and you're connected to your dappnode you can use: +``` +var Web3 = require('web3'); +var web3 = new Web3('ws://my.geth.dappnode:8546') +web3.eth.getBlockNumber().then(console.log) +``` +In case you are running it locally: +``` +var Web3 = require('web3'); +var web3 = new Web3('ws://127.0.0.1:8546') +web3.eth.getBlockNumber().then(console.log) +``` + +## License + +This project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details diff --git a/build/Dockerfile b/build/Dockerfile index 0f11e46..05231ed 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -5,10 +5,10 @@ WORKDIR /usr/src/app RUN apk add --no-cache make gcc musl-dev linux-headers git jq -ARG COMMIT=cfbb969da803d4cc92e1a64fc1b3c06db299b564 +ARG BRANCH=v1.9.6 -RUN git clone https://github.com/ethereum/go-ethereum.git -RUN cd go-ethereum && git checkout $COMMIT && make geth +RUN git clone -b $BRANCH https://github.com/ethereum/go-ethereum.git +RUN cd go-ethereum && make geth # Pull Geth into a second stage deploy alpine container FROM alpine:latest @@ -16,4 +16,4 @@ FROM alpine:latest RUN apk add --no-cache ca-certificates COPY --from=builder /usr/src/app/go-ethereum/build/bin/geth /usr/local/bin/ -ENTRYPOINT geth --datadir /root/.ethereum/ethchain-geth --rpc --rpcaddr 0.0.0.0 --rpccorsdomain "*" --rpcvhosts "*" --ws --wsorigins "*" --wsaddr 0.0.0.0 $EXTRA_OPTS +ENTRYPOINT geth --rpc --rpcaddr 0.0.0.0 --rpccorsdomain "*" --rpcvhosts "*" --ws --wsorigins "*" --wsaddr 0.0.0.0 $EXTRA_OPTS diff --git a/dappnode_package.json b/dappnode_package.json index fc4265f..8a81b6e 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,29 +1,11 @@ { "name": "geth.dnp.dappnode.eth", "version": "0.1.1", - "upstreamVersion": "1.9.3", + "upstreamVersion": "1.9.6", "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", - "avatar": "/ipfs/QmbxQDuXW8AjrP4UKbG7Aothehvzg5PdLDBn7cdGWjvpmU", "type": "library", "chain": "ethereum", - "image": { - "path": "", - "hash": "", - "size": "", - "restart": "always", - "ports": [ - "30303", - "30303/udp", - "30304/udp" - ], - "volumes": [ - "data:/root/.ethereum" - ], - "environment": [ - "EXTRA_OPTS=--rpcapi eth,net,web3,txpool" - ] - }, "author": "DAppNode Association (https://github.com/dappnode)", "contributors": [ "Mariano Conti (nanexcool) (hhttps://github.com/nanexcool)", diff --git a/docker-compose.yml b/docker-compose.yml index 677b6e4..b497f94 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,17 +1,16 @@ version: '3.4' services: - ethchain-geth.public.dappnode.eth: - image: 'ethchain-geth.public.dappnode.eth:0.0.3' + geth.dnp.dappnode.eth: + image: 'geth.dnp.dappnode.eth:0.1.1' build: ./build volumes: - - 'ethchain-geth:/root/.ethereum/ethchain-geth' + - 'geth:/root/.ethereum' environment: - - EXTRA_OPTS= + - EXTRA_OPTS=--rpcapi eth,net,web3,txpool ports: - - '127.0.0.1:8546:8546' - - '127.0.0.1:8545:8545' - - '61313:30303' - - '61313:30303/udp' - - '61314:30304/udp' + - '30303' + - '30303/udp' + - '30304/udp' + restart: always volumes: - ethchain-geth: {} \ No newline at end of file + geth: {} From fbdf676e299bf53dcb8ce7383f5da00514754805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Fri, 29 Nov 2019 22:48:38 +0100 Subject: [PATCH 04/24] Bump version to Geth v1.9.8 --- build/Dockerfile | 2 +- dappnode_package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index 05231ed..fc8b524 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -5,7 +5,7 @@ WORKDIR /usr/src/app RUN apk add --no-cache make gcc musl-dev linux-headers git jq -ARG BRANCH=v1.9.6 +ARG BRANCH=v1.9.8 RUN git clone -b $BRANCH https://github.com/ethereum/go-ethereum.git RUN cd go-ethereum && make geth diff --git a/dappnode_package.json b/dappnode_package.json index 8a81b6e..6ac3d2b 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,7 +1,7 @@ { "name": "geth.dnp.dappnode.eth", "version": "0.1.1", - "upstreamVersion": "1.9.6", + "upstreamVersion": "v1.9.8", "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", "type": "library", From b801b89887d65c0bbc2b46e8491ebfdec14cac68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= <20141918+eduadiez@users.noreply.github.com> Date: Fri, 29 Nov 2019 22:53:22 +0100 Subject: [PATCH 05/24] Advance manifest to new version: 0.1.3 --- dappnode_package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dappnode_package.json b/dappnode_package.json index 6ac3d2b..3e8e001 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,6 +1,6 @@ { "name": "geth.dnp.dappnode.eth", - "version": "0.1.1", + "version": "0.1.3", "upstreamVersion": "v1.9.8", "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", From d31ca98b577c1352f7d3c44b8e64b1b0a007ee17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= <20141918+eduadiez@users.noreply.github.com> Date: Fri, 29 Nov 2019 22:53:24 +0100 Subject: [PATCH 06/24] Advance compose to new version: 0.1.3 --- docker-compose.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index b497f94..2e86c26 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,16 +1,16 @@ version: '3.4' services: geth.dnp.dappnode.eth: - image: 'geth.dnp.dappnode.eth:0.1.1' + image: 'geth.dnp.dappnode.eth:0.1.3' build: ./build volumes: - 'geth:/root/.ethereum' environment: - - EXTRA_OPTS=--rpcapi eth,net,web3,txpool + - 'EXTRA_OPTS=--rpcapi eth,net,web3,txpool' ports: - '30303' - - '30303/udp' - - '30304/udp' + - 30303/udp + - 30304/udp restart: always volumes: geth: {} From 5a22cef32e8f599a8a062fb55eb97b342a1c51f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Tue, 17 Dec 2019 08:35:26 +0100 Subject: [PATCH 07/24] Bump version --- build/Dockerfile | 23 +++++++++-------------- docker-compose.yml | 2 +- releases.json | 10 ++++++++++ 3 files changed, 20 insertions(+), 15 deletions(-) create mode 100644 releases.json diff --git a/build/Dockerfile b/build/Dockerfile index fc8b524..b652902 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,19 +1,14 @@ -# Build Geth in a stock Go builder container -FROM golang:1.11-alpine as builder +FROM ethereum/client-go:v1.9.9 as geth -WORKDIR /usr/src/app +# Pull Parity into a second stage deploy alpine container +FROM alpine:edge -RUN apk add --no-cache make gcc musl-dev linux-headers git jq +RUN apk --no-cache add \ + libstdc++ \ + eudev-libs \ + libgcc \ + bash -ARG BRANCH=v1.9.8 - -RUN git clone -b $BRANCH https://github.com/ethereum/go-ethereum.git -RUN cd go-ethereum && make geth - -# Pull Geth into a second stage deploy alpine container -FROM alpine:latest - -RUN apk add --no-cache ca-certificates -COPY --from=builder /usr/src/app/go-ethereum/build/bin/geth /usr/local/bin/ +COPY --from=geth /usr/local/bin/geth /usr/local/bin/geth ENTRYPOINT geth --rpc --rpcaddr 0.0.0.0 --rpccorsdomain "*" --rpcvhosts "*" --ws --wsorigins "*" --wsaddr 0.0.0.0 $EXTRA_OPTS diff --git a/docker-compose.yml b/docker-compose.yml index 2e86c26..e695d3d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,4 +13,4 @@ services: - 30304/udp restart: always volumes: - geth: {} + geth: {} \ No newline at end of file diff --git a/releases.json b/releases.json new file mode 100644 index 0000000..9bed314 --- /dev/null +++ b/releases.json @@ -0,0 +1,10 @@ +{ + "0.1.2": { + "hash": "/ipfs/QmZmT9gEw7YdXHh9Yx22sHZYtWri1f1SrQxBQs4ctKkSC2", + "type": "directory", + "uploadedTo": { + "dappnode": "Fri, 29 Nov 2019 21:53:08 GMT" + }, + "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.2&h=%2Fipfs%2FQmZmT9gEw7YdXHh9Yx22sHZYtWri1f1SrQxBQs4ctKkSC2" + } +} \ No newline at end of file From 2e2762074501dc743e31b89f961cd93afededc38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= <20141918+eduadiez@users.noreply.github.com> Date: Tue, 17 Dec 2019 08:38:47 +0100 Subject: [PATCH 08/24] Advance manifest to new version: 0.1.4 --- dappnode_package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dappnode_package.json b/dappnode_package.json index 3e8e001..6d73070 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,6 +1,6 @@ { "name": "geth.dnp.dappnode.eth", - "version": "0.1.3", + "version": "0.1.4", "upstreamVersion": "v1.9.8", "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", From 6e9ac65ceee6573bbbbe0f967a68e68903a6c1e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= <20141918+eduadiez@users.noreply.github.com> Date: Tue, 17 Dec 2019 08:38:49 +0100 Subject: [PATCH 09/24] Advance compose to new version: 0.1.4 --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index e695d3d..99086c6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3.4' services: geth.dnp.dappnode.eth: - image: 'geth.dnp.dappnode.eth:0.1.3' + image: 'geth.dnp.dappnode.eth:0.1.4' build: ./build volumes: - 'geth:/root/.ethereum' @@ -13,4 +13,4 @@ services: - 30304/udp restart: always volumes: - geth: {} \ No newline at end of file + geth: {} From 09349ccb66febf0287fd699c440cfd41001547c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Fri, 3 Jan 2020 15:55:39 +0100 Subject: [PATCH 10/24] Bump geth version --- dappnode_package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dappnode_package.json b/dappnode_package.json index 6d73070..39e0dbf 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,7 +1,7 @@ { "name": "geth.dnp.dappnode.eth", "version": "0.1.4", - "upstreamVersion": "v1.9.8", + "upstreamVersion": "v1.9.9", "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", "type": "library", From f86c6a40d3ee9836bda536d1871287e46b2e7cd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= <20141918+eduadiez@users.noreply.github.com> Date: Fri, 6 Mar 2020 15:06:35 +0100 Subject: [PATCH 11/24] Advance manifest to new version: 0.1.5 --- dappnode_package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dappnode_package.json b/dappnode_package.json index 39e0dbf..d94c9b3 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,7 +1,7 @@ { "name": "geth.dnp.dappnode.eth", - "version": "0.1.4", - "upstreamVersion": "v1.9.9", + "version": "0.1.5", + "upstreamVersion": "v1.9.11", "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", "type": "library", From adaf06da2f792068ce215b3831159b78a1475751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= <20141918+eduadiez@users.noreply.github.com> Date: Fri, 6 Mar 2020 15:06:36 +0100 Subject: [PATCH 12/24] Advance compose to new version: 0.1.5 --- docker-compose.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 99086c6..d1b9f6a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,12 +1,13 @@ version: '3.4' services: geth.dnp.dappnode.eth: - image: 'geth.dnp.dappnode.eth:0.1.4' + image: 'geth.dnp.dappnode.eth:0.1.5' build: ./build volumes: - 'geth:/root/.ethereum' environment: - 'EXTRA_OPTS=--rpcapi eth,net,web3,txpool' + - SYNCMODE ports: - '30303' - 30303/udp From 601a72de2eddea58bb344b1279686b7078936e68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Fri, 6 Mar 2020 16:51:14 +0100 Subject: [PATCH 13/24] Added SYNCMODE env --- build/Dockerfile | 5 +++-- dappnode_package.json | 4 ++-- docker-compose.yml | 3 ++- releases.json | 16 ++++++++++++++++ 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index b652902..f671b11 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,4 +1,4 @@ -FROM ethereum/client-go:v1.9.9 as geth +FROM ethereum/client-go:v1.9.11 as geth # Pull Parity into a second stage deploy alpine container FROM alpine:edge @@ -11,4 +11,5 @@ RUN apk --no-cache add \ COPY --from=geth /usr/local/bin/geth /usr/local/bin/geth -ENTRYPOINT geth --rpc --rpcaddr 0.0.0.0 --rpccorsdomain "*" --rpcvhosts "*" --ws --wsorigins "*" --wsaddr 0.0.0.0 $EXTRA_OPTS +ENV SYNCMODE fast +ENTRYPOINT geth --rpc --rpcaddr 0.0.0.0 --rpccorsdomain "*" --rpcvhosts "*" --ws --wsorigins "*" --wsaddr 0.0.0.0 --syncmode ${SYNCMODE:-fast} --nousb $EXTRA_OPTS diff --git a/dappnode_package.json b/dappnode_package.json index 39e0dbf..d94c9b3 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,7 +1,7 @@ { "name": "geth.dnp.dappnode.eth", - "version": "0.1.4", - "upstreamVersion": "v1.9.9", + "version": "0.1.5", + "upstreamVersion": "v1.9.11", "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", "type": "library", diff --git a/docker-compose.yml b/docker-compose.yml index 99086c6..d1b9f6a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,12 +1,13 @@ version: '3.4' services: geth.dnp.dappnode.eth: - image: 'geth.dnp.dappnode.eth:0.1.4' + image: 'geth.dnp.dappnode.eth:0.1.5' build: ./build volumes: - 'geth:/root/.ethereum' environment: - 'EXTRA_OPTS=--rpcapi eth,net,web3,txpool' + - SYNCMODE ports: - '30303' - 30303/udp diff --git a/releases.json b/releases.json index 9bed314..3f4b98c 100644 --- a/releases.json +++ b/releases.json @@ -6,5 +6,21 @@ "dappnode": "Fri, 29 Nov 2019 21:53:08 GMT" }, "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.2&h=%2Fipfs%2FQmZmT9gEw7YdXHh9Yx22sHZYtWri1f1SrQxBQs4ctKkSC2" + }, + "0.1.3": { + "hash": "/ipfs/QmbrBkpBGmx79B5anoTQLhq8wnYPCiz69eNWwu4jiuMGFx", + "type": "directory", + "uploadedTo": { + "dappnode": "Fri, 03 Jan 2020 14:56:46 GMT" + }, + "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.3&h=%2Fipfs%2FQmbrBkpBGmx79B5anoTQLhq8wnYPCiz69eNWwu4jiuMGFx" + }, + "0.1.4": { + "hash": "/ipfs/QmNqDvqAyy3pN3PvymB6chM7S1FgYyive8LosVKUuaDdfd", + "type": "directory", + "uploadedTo": { + "dappnode": "Fri, 06 Mar 2020 14:06:12 GMT" + }, + "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.4&h=%2Fipfs%2FQmNqDvqAyy3pN3PvymB6chM7S1FgYyive8LosVKUuaDdfd" } } \ No newline at end of file From c999680a798185673463b88c0042cf036b09fd32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Fri, 17 Apr 2020 14:05:36 +0200 Subject: [PATCH 14/24] Bump version --- build/Dockerfile | 2 +- releases.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index b652902..e5228f3 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,4 +1,4 @@ -FROM ethereum/client-go:v1.9.9 as geth +FROM ethereum/client-go:v1.9.13 as geth # Pull Parity into a second stage deploy alpine container FROM alpine:edge diff --git a/releases.json b/releases.json index 9bed314..82255aa 100644 --- a/releases.json +++ b/releases.json @@ -6,5 +6,4 @@ "dappnode": "Fri, 29 Nov 2019 21:53:08 GMT" }, "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.2&h=%2Fipfs%2FQmZmT9gEw7YdXHh9Yx22sHZYtWri1f1SrQxBQs4ctKkSC2" - } } \ No newline at end of file From 1e509d9eacbe035843ff6bbc05ba25ed32ffdf47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Mon, 8 Jun 2020 18:34:11 +0200 Subject: [PATCH 15/24] bump version --- .github/workflows/auto_check.yml | 31 +++++++ .github/workflows/dispatch_release.yml | 123 +++++++++++++++++++++++++ .gitignore | 1 + build/Dockerfile | 3 +- dappnode_package.json | 4 +- docker-compose.yml | 2 +- releases.json | 16 ++++ 7 files changed, 176 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/auto_check.yml create mode 100644 .github/workflows/dispatch_release.yml diff --git a/.github/workflows/auto_check.yml b/.github/workflows/auto_check.yml new file mode 100644 index 0000000..8d52ddb --- /dev/null +++ b/.github/workflows/auto_check.yml @@ -0,0 +1,31 @@ +name: Update DAppNode package + +on: + schedule: + # * is a special character in YAML so you have to quote this string + - cron: '*/5 * * * *' +jobs: + dappnodepackage-update: + name: Trigger the DAppNode Package update + runs-on: ubuntu-latest + env: + DISPATCH_REPO: dappnode/DAppNodePackage-geth + UPSTREAM_REPO: ethereum/go-ethereum + steps: + - name: Get the tag + id: get_tag + run: | + UPSTREAM_TAG=$(curl https://api.github.com/repos/$UPSTREAM_REPO/releases/latest | jq .tag_name | tr -d "\"" ) + DNP_TAG=$(curl https://api.github.com/repos/$DISPATCH_REPO/releases/tags/$UPSTREAM_TAG | jq .tag_name | tr -d "\"" ) + if [ $UPSTREAM_TAG != $DNP_TAG ];then + echo "::set-output name=trigger_update::true" + fi + echo ::set-output name=TAG::$UPSTREAM_TAG + - name: Send dispatch event to the DAppNode Package repository + if: steps.get_tag.outputs.trigger_update == 'true' + run: | + curl -v -X POST -u "${{ secrets.PAT_GITHUB }}" \ + -H "Accept: application/vnd.github.everest-preview+json" \ + -H "Content-Type: application/json" \ + --data '{"event_type":"new_release", "client_payload": { "tag":"${{ steps.get_tag.outputs.TAG }}"}}' \ + https://api.github.com/repos/$DISPATCH_REPO/dispatches diff --git a/.github/workflows/dispatch_release.yml b/.github/workflows/dispatch_release.yml new file mode 100644 index 0000000..0a762d6 --- /dev/null +++ b/.github/workflows/dispatch_release.yml @@ -0,0 +1,123 @@ +name: Remote Dispatch Action Initiator + +on: + repository_dispatch: + +jobs: + new_version: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: New remote repository event + id: dispatch-event + run: | + echo "Event '${{ github.event.action }}' with tag: '${{ github.event.client_payload.tag }}'" + echo "::set-output name=TAG::${{ github.event.client_payload.tag }}" + echo VERSION=${{ github.event.client_payload.tag }} > .env + + - name: Setup nodejs + uses: actions/setup-node@v1 + with: + node-version: '10.x' + + - name: dappnodesdk install + run: npm install -g @dappnode/dappnodesdk + + - name: Get next DAppNodePackage release + id: next-release + run: echo "::set-output name=DNP_VERSION::$(dappnodesdk next patch -p remote)" + + - name: Check and delete if a release already exists + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + RELEASE_ID=$(curl https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ steps.dispatch-event.outputs.TAG }} | jq .id || echo "") + PRE_RELEASE=$(curl -s https://api.github.com/repos/dappnode/${{ github.repository }}releases/tags/${{ steps.dispatch-event.outputs.TAG }} | jq .prerelease) + if [ $PRE_RELEASE == "false" ];then + exit 1 + elif [ ! -z "$RELEASE_ID" ];then + curl -H "Authorization: token ${GITHUB_TOKEN}" -X DELETE https://api.github.com/repos/${{ github.repository }}/releases/${RELEASE_ID} + fi + + - name: Docker-Compose Build + run: | + docker-compose build + + - name: dappnodesdk publish + id: dappnodesdk-publish + run: | + sed -i "s/upstreamVersion\":.*,/upstreamVersion\": \"${{ steps.dispatch-event.outputs.TAG }}\",/g" dappnode_package.json + dappnodesdk publish patch -p remote + echo "::set-output name=CONTENT_HASH::$(cat ./build_${{ steps.next-release.outputs.DNP_VERSION }}/content-hash | sed 's/\//%2F/g')" + echo "::set-output name=PACKAGE_NAME::$(cat dappnode_package.json | jq .name | tr -d "\"")" + + - name: Create Release + id: create_release + uses: actions/create-release@latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + release_name: v${{ steps.next-release.outputs.DNP_VERSION }} + tag_name: ${{ steps.dispatch-event.outputs.TAG }} + body: | + # ${{ steps.dispatch-event.outputs.TAG }} + You can execute a transaction to publish this package from the Admin UI with Metamask by following this pre-filled [link](http://my.dappnode/#/sdk/publish/r=${{ steps.dappnodesdk-publish.outputs.PACKAGE_NAME }}&v=${{ steps.next-release.outputs.DNP_VERSION }}&h=${{ steps.dappnodesdk-publish.outputs.CONTENT_HASH }}) + draft: false + prerelease: true + + - name: Upload release .xz file + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/${{ steps.dappnodesdk-publish.outputs.PACKAGE_NAME }}_${{ steps.next-release.outputs.DNP_VERSION }}.tar.xz + asset_name: ${{ steps.dappnodesdk-publish.outputs.PACKAGE_NAME }}_${{ steps.next-release.outputs.DNP_VERSION }}.tar.xz + asset_content_type: 'application/octet-stream' + + - name: Upload release avatar file + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/avatar.png + asset_name: avatar.png + asset_content_type: 'application/octet-stream' + + - name: Upload release dappnode_package.json file + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/dappnode_package.json + asset_name: dappnode_package.json + asset_content_type: 'application/octet-stream' + + - name: Upload release docker-compose.yml file + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/docker-compose.yml + asset_name: docker-compose.yml + asset_content_type: 'application/octet-stream' + + - name: Upload release content-hash file + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/content-hash + asset_name: content-hash + asset_content_type: 'application/octet-stream' + + - name: Commit changes + run: | + git config --global user.email "eduadiez@gmail.com" + git config --global user.name "Eduardo" + git commit -am "Github action update" + git push diff --git a/.gitignore b/.gitignore index 2bd624b..9b98eb1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ build_* +.env \ No newline at end of file diff --git a/build/Dockerfile b/build/Dockerfile index 5908d8b..b8f5669 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,4 +1,5 @@ -FROM ethereum/client-go:v1.9.13 as geth +ARG VERSION +FROM ethereum/client-go:$VERSION as geth # Pull Parity into a second stage deploy alpine container FROM alpine:edge diff --git a/dappnode_package.json b/dappnode_package.json index d94c9b3..3cc4808 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,7 +1,7 @@ { "name": "geth.dnp.dappnode.eth", - "version": "0.1.5", - "upstreamVersion": "v1.9.11", + "version": "0.1.7", + "upstreamVersion": "v1.9.14", "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", "type": "library", diff --git a/docker-compose.yml b/docker-compose.yml index d1b9f6a..bf2be29 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3.4' services: geth.dnp.dappnode.eth: - image: 'geth.dnp.dappnode.eth:0.1.5' + image: 'geth.dnp.dappnode.eth:0.1.7' build: ./build volumes: - 'geth:/root/.ethereum' diff --git a/releases.json b/releases.json index 3f4b98c..42c83d4 100644 --- a/releases.json +++ b/releases.json @@ -22,5 +22,21 @@ "dappnode": "Fri, 06 Mar 2020 14:06:12 GMT" }, "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.4&h=%2Fipfs%2FQmNqDvqAyy3pN3PvymB6chM7S1FgYyive8LosVKUuaDdfd" + }, + "0.1.5": { + "hash": "/ipfs/QmYSoV4pxNZmHckZHXKCLBXBeESWYdbrCgduGFwpWLzPoi", + "type": "directory", + "uploadedTo": { + "dappnode": "Fri, 17 Apr 2020 12:08:45 GMT" + }, + "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.5&h=%2Fipfs%2FQmYSoV4pxNZmHckZHXKCLBXBeESWYdbrCgduGFwpWLzPoi" + }, + "0.1.6": { + "hash": "/ipfs/QmazbxJNXNn5kUe3PHRiMpJtvf91o6SUM4uFphj9znuVt3", + "type": "directory", + "uploadedTo": { + "remote": "Thu, 14 May 2020 16:22:40 GMT" + }, + "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.6&h=%2Fipfs%2FQmazbxJNXNn5kUe3PHRiMpJtvf91o6SUM4uFphj9znuVt3" } } \ No newline at end of file From 0f9c96c3c96769deea23013a6318bc3044ff0089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= <20141918+eduadiez@users.noreply.github.com> Date: Mon, 8 Jun 2020 18:49:33 +0200 Subject: [PATCH 16/24] Update auto_check.yml --- .github/workflows/auto_check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto_check.yml b/.github/workflows/auto_check.yml index 8d52ddb..d32c4b2 100644 --- a/.github/workflows/auto_check.yml +++ b/.github/workflows/auto_check.yml @@ -24,7 +24,7 @@ jobs: - name: Send dispatch event to the DAppNode Package repository if: steps.get_tag.outputs.trigger_update == 'true' run: | - curl -v -X POST -u "${{ secrets.PAT_GITHUB }}" \ + curl -v -X POST -u "${{ secrets.GITHUB_TOKEN }}" \ -H "Accept: application/vnd.github.everest-preview+json" \ -H "Content-Type: application/json" \ --data '{"event_type":"new_release", "client_payload": { "tag":"${{ steps.get_tag.outputs.TAG }}"}}' \ From 93a6df414cb5024854b6a79e8131a1b026e95766 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= <20141918+eduadiez@users.noreply.github.com> Date: Mon, 8 Jun 2020 18:58:06 +0200 Subject: [PATCH 17/24] Update auto_check.yml --- .github/workflows/auto_check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto_check.yml b/.github/workflows/auto_check.yml index d32c4b2..8d52ddb 100644 --- a/.github/workflows/auto_check.yml +++ b/.github/workflows/auto_check.yml @@ -24,7 +24,7 @@ jobs: - name: Send dispatch event to the DAppNode Package repository if: steps.get_tag.outputs.trigger_update == 'true' run: | - curl -v -X POST -u "${{ secrets.GITHUB_TOKEN }}" \ + curl -v -X POST -u "${{ secrets.PAT_GITHUB }}" \ -H "Accept: application/vnd.github.everest-preview+json" \ -H "Content-Type: application/json" \ --data '{"event_type":"new_release", "client_payload": { "tag":"${{ steps.get_tag.outputs.TAG }}"}}' \ From 5e6c58ea8f6102fec7da1255ad4f9b679cafc929 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Mon, 8 Jun 2020 19:07:14 +0200 Subject: [PATCH 18/24] Add version --- docker-compose.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index bf2be29..3ff36ce 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,10 @@ version: '3.4' services: geth.dnp.dappnode.eth: image: 'geth.dnp.dappnode.eth:0.1.7' - build: ./build + build: + context: ./build + args: + - VERSION volumes: - 'geth:/root/.ethereum' environment: From 2dc1d87186a26e2041ea815007ffa1c7de33a6b1 Mon Sep 17 00:00:00 2001 From: Eduardo Date: Mon, 8 Jun 2020 17:12:16 +0000 Subject: [PATCH 19/24] Github action update --- dappnode_package.json | 2 +- releases.json | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/dappnode_package.json b/dappnode_package.json index 3cc4808..654286b 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,7 +1,7 @@ { "name": "geth.dnp.dappnode.eth", "version": "0.1.7", - "upstreamVersion": "v1.9.14", + "upstreamVersion": "v1.9.15", "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", "type": "library", diff --git a/releases.json b/releases.json index 42c83d4..cc43224 100644 --- a/releases.json +++ b/releases.json @@ -38,5 +38,13 @@ "remote": "Thu, 14 May 2020 16:22:40 GMT" }, "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.6&h=%2Fipfs%2FQmazbxJNXNn5kUe3PHRiMpJtvf91o6SUM4uFphj9znuVt3" + }, + "0.1.7": { + "hash": "/ipfs/Qmd7jLvxVmUziFFVV9M6R4Svn7KGiM1VGg6kymbCknCgF1", + "type": "directory", + "uploadedTo": { + "remote": "Mon, 08 Jun 2020 17:12:10 GMT" + }, + "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.7&h=%2Fipfs%2FQmd7jLvxVmUziFFVV9M6R4Svn7KGiM1VGg6kymbCknCgF1" } } \ No newline at end of file From b31c25b8ccba1ef079f907cf74fb75089940f042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Fri, 7 Aug 2020 14:55:05 +0200 Subject: [PATCH 20/24] Bump to new version: 0.1.9 --- dappnode_package.json | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dappnode_package.json b/dappnode_package.json index 654286b..a80e22f 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,6 +1,6 @@ { "name": "geth.dnp.dappnode.eth", - "version": "0.1.7", + "version": "0.1.9", "upstreamVersion": "v1.9.15", "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", diff --git a/docker-compose.yml b/docker-compose.yml index 3ff36ce..e7514ef 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3.4' services: geth.dnp.dappnode.eth: - image: 'geth.dnp.dappnode.eth:0.1.7' + image: 'geth.dnp.dappnode.eth:0.1.9' build: context: ./build args: From 73b92a3a036a39d2029b2d44f4c4176a8d56c58c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Fri, 7 Aug 2020 15:32:26 +0200 Subject: [PATCH 21/24] Added UPSTREAM_VERSION --- build/Dockerfile | 4 ++-- docker-compose.yml | 2 +- releases.json | 18 ++++++++++++++++-- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index b8f5669..6fe02e4 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,5 +1,5 @@ -ARG VERSION -FROM ethereum/client-go:$VERSION as geth +ARG UPSTREAM_VERSION +FROM ethereum/client-go:${UPSTREAM_VERSION} as geth # Pull Parity into a second stage deploy alpine container FROM alpine:edge diff --git a/docker-compose.yml b/docker-compose.yml index e7514ef..8b8af4c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: build: context: ./build args: - - VERSION + - UPSTREAM_VERSION volumes: - 'geth:/root/.ethereum' environment: diff --git a/releases.json b/releases.json index cc43224..48986a9 100644 --- a/releases.json +++ b/releases.json @@ -40,11 +40,25 @@ "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.6&h=%2Fipfs%2FQmazbxJNXNn5kUe3PHRiMpJtvf91o6SUM4uFphj9znuVt3" }, "0.1.7": { - "hash": "/ipfs/Qmd7jLvxVmUziFFVV9M6R4Svn7KGiM1VGg6kymbCknCgF1", + "hash": "/ipfs/QmTujfYrQwWG7kRwQX4nBD7TmSDjjSfRkj4CdZW3rmDJLC", "type": "directory", "uploadedTo": { - "remote": "Mon, 08 Jun 2020 17:12:10 GMT" + "dappnode": "Fri, 07 Aug 2020 12:53:48 GMT" }, "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.7&h=%2Fipfs%2FQmd7jLvxVmUziFFVV9M6R4Svn7KGiM1VGg6kymbCknCgF1" + }, + "0.1.8": { + "hash": "/ipfs/QmUf1uzqZdXyKt4YB96nr1F9GtxUWnPu8hSs7WXJnoc5Cj", + "uploadedTo": { + "remote": "Fri, 07 Aug 2020 12:54:45 GMT" + }, + "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.8&h=%2Fipfs%2FQmUf1uzqZdXyKt4YB96nr1F9GtxUWnPu8hSs7WXJnoc5Cj" + }, + "0.1.9": { + "hash": "/ipfs/QmbpQoSXzPcBwm1LUeVMPosgsVUf772pN32xjDyxWnPEHT", + "uploadedTo": { + "remote": "Fri, 07 Aug 2020 13:19:24 GMT" + }, + "link": "http://my.dappnode/#/sdk/publish/r=geth.dnp.dappnode.eth&v=0.1.9&h=%2Fipfs%2FQmbpQoSXzPcBwm1LUeVMPosgsVUf772pN32xjDyxWnPEHT" } } \ No newline at end of file From 4b37c73c677737a9f6fe43ffebbf1feda0c6a512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Fri, 7 Aug 2020 15:35:37 +0200 Subject: [PATCH 22/24] Fix GHA --- .github/workflows/dispatch_release.yml | 48 +++++++++++++------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/dispatch_release.yml b/.github/workflows/dispatch_release.yml index 0a762d6..64e3400 100644 --- a/.github/workflows/dispatch_release.yml +++ b/.github/workflows/dispatch_release.yml @@ -13,24 +13,24 @@ jobs: run: | echo "Event '${{ github.event.action }}' with tag: '${{ github.event.client_payload.tag }}'" echo "::set-output name=TAG::${{ github.event.client_payload.tag }}" - echo VERSION=${{ github.event.client_payload.tag }} > .env - + echo UPSTREAM_VERSION=${{ github.event.client_payload.tag }} > .env + - name: Setup nodejs uses: actions/setup-node@v1 with: - node-version: '10.x' + node-version: "10.x" - name: dappnodesdk install run: npm install -g @dappnode/dappnodesdk - + - name: Get next DAppNodePackage release id: next-release run: echo "::set-output name=DNP_VERSION::$(dappnodesdk next patch -p remote)" - + - name: Check and delete if a release already exists env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | + run: | RELEASE_ID=$(curl https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ steps.dispatch-event.outputs.TAG }} | jq .id || echo "") PRE_RELEASE=$(curl -s https://api.github.com/repos/dappnode/${{ github.repository }}releases/tags/${{ steps.dispatch-event.outputs.TAG }} | jq .prerelease) if [ $PRE_RELEASE == "false" ];then @@ -42,7 +42,7 @@ jobs: - name: Docker-Compose Build run: | docker-compose build - + - name: dappnodesdk publish id: dappnodesdk-publish run: | @@ -70,54 +70,54 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/${{ steps.dappnodesdk-publish.outputs.PACKAGE_NAME }}_${{ steps.next-release.outputs.DNP_VERSION }}.tar.xz asset_name: ${{ steps.dappnodesdk-publish.outputs.PACKAGE_NAME }}_${{ steps.next-release.outputs.DNP_VERSION }}.tar.xz - asset_content_type: 'application/octet-stream' + asset_content_type: "application/octet-stream" - name: Upload release avatar file uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/avatar.png asset_name: avatar.png - asset_content_type: 'application/octet-stream' + asset_content_type: "application/octet-stream" - name: Upload release dappnode_package.json file uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/dappnode_package.json asset_name: dappnode_package.json - asset_content_type: 'application/octet-stream' - + asset_content_type: "application/octet-stream" + - name: Upload release docker-compose.yml file uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/docker-compose.yml asset_name: docker-compose.yml - asset_content_type: 'application/octet-stream' - + asset_content_type: "application/octet-stream" + - name: Upload release content-hash file uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/content-hash asset_name: content-hash - asset_content_type: 'application/octet-stream' - + asset_content_type: "application/octet-stream" + - name: Commit changes run: | - git config --global user.email "eduadiez@gmail.com" - git config --global user.name "Eduardo" - git commit -am "Github action update" - git push + git config --global user.email "eduadiez@gmail.com" + git config --global user.name "Eduardo" + git commit -am "Github action update" + git push From 57881b01fdb2edf9807ecf8f979732afbbdd31be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Mon, 5 Oct 2020 10:01:26 +0200 Subject: [PATCH 23/24] Add ARM64 compatibility --- .github/workflows/auto_check.yml | 11 +- .github/workflows/dispatch_release.yml | 135 +++++-------------------- build/Dockerfile | 20 ++-- dappnode_package.json | 4 + docker-compose.yml | 2 +- 5 files changed, 46 insertions(+), 126 deletions(-) diff --git a/.github/workflows/auto_check.yml b/.github/workflows/auto_check.yml index 8d52ddb..409a3e5 100644 --- a/.github/workflows/auto_check.yml +++ b/.github/workflows/auto_check.yml @@ -3,7 +3,8 @@ name: Update DAppNode package on: schedule: # * is a special character in YAML so you have to quote this string - - cron: '*/5 * * * *' + # - cron: '00 */4 * * *' + - cron: '* * * * *' jobs: dappnodepackage-update: name: Trigger the DAppNode Package update @@ -12,15 +13,17 @@ jobs: DISPATCH_REPO: dappnode/DAppNodePackage-geth UPSTREAM_REPO: ethereum/go-ethereum steps: + - uses: actions/checkout@v2 - name: Get the tag id: get_tag run: | - UPSTREAM_TAG=$(curl https://api.github.com/repos/$UPSTREAM_REPO/releases/latest | jq .tag_name | tr -d "\"" ) - DNP_TAG=$(curl https://api.github.com/repos/$DISPATCH_REPO/releases/tags/$UPSTREAM_TAG | jq .tag_name | tr -d "\"" ) - if [ $UPSTREAM_TAG != $DNP_TAG ];then + UPSTREAM_TAG=$(curl https://api.github.com/repos/$UPSTREAM_REPO/tags | jq .[0].name | tr -d "\"" ) + DNP_UPSTREAM=$(cat dappnode_package.json | jq .upstreamVersion | tr -d "\"" ) + if [ $UPSTREAM_TAG != $DNP_UPSTREAM ];then echo "::set-output name=trigger_update::true" fi echo ::set-output name=TAG::$UPSTREAM_TAG + - name: Send dispatch event to the DAppNode Package repository if: steps.get_tag.outputs.trigger_update == 'true' run: | diff --git a/.github/workflows/dispatch_release.yml b/.github/workflows/dispatch_release.yml index 64e3400..64acb74 100644 --- a/.github/workflows/dispatch_release.yml +++ b/.github/workflows/dispatch_release.yml @@ -1,123 +1,36 @@ -name: Remote Dispatch Action Initiator - +name: "Main" on: repository_dispatch: + pull_request: + push: + branches: + - "master" + - "v[0-9]+.[0-9]+.[0-9]+" + paths-ignore: + - "README.md" jobs: - new_version: + build-test: + runs-on: ubuntu-16.04 + name: Build test + if: github.event_name != 'push' + steps: + - name: Checkout + uses: actions/checkout@v2 + - run: docker-compose build + + release: + name: Release runs-on: ubuntu-latest + if: github.event_name == 'push' || github.event_name == 'repository_dispatch' steps: - uses: actions/checkout@v2 - - name: New remote repository event - id: dispatch-event - run: | - echo "Event '${{ github.event.action }}' with tag: '${{ github.event.client_payload.tag }}'" - echo "::set-output name=TAG::${{ github.event.client_payload.tag }}" - echo UPSTREAM_VERSION=${{ github.event.client_payload.tag }} > .env - - - name: Setup nodejs + - name: Setup node uses: actions/setup-node@v1 with: node-version: "10.x" - - - name: dappnodesdk install - run: npm install -g @dappnode/dappnodesdk - - - name: Get next DAppNodePackage release - id: next-release - run: echo "::set-output name=DNP_VERSION::$(dappnodesdk next patch -p remote)" - - - name: Check and delete if a release already exists + - name: Publish + run: npx @dappnode/dappnodesdk publish patch --dappnode_team_preset env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - RELEASE_ID=$(curl https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ steps.dispatch-event.outputs.TAG }} | jq .id || echo "") - PRE_RELEASE=$(curl -s https://api.github.com/repos/dappnode/${{ github.repository }}releases/tags/${{ steps.dispatch-event.outputs.TAG }} | jq .prerelease) - if [ $PRE_RELEASE == "false" ];then - exit 1 - elif [ ! -z "$RELEASE_ID" ];then - curl -H "Authorization: token ${GITHUB_TOKEN}" -X DELETE https://api.github.com/repos/${{ github.repository }}/releases/${RELEASE_ID} - fi - - - name: Docker-Compose Build - run: | - docker-compose build - - - name: dappnodesdk publish - id: dappnodesdk-publish - run: | - sed -i "s/upstreamVersion\":.*,/upstreamVersion\": \"${{ steps.dispatch-event.outputs.TAG }}\",/g" dappnode_package.json - dappnodesdk publish patch -p remote - echo "::set-output name=CONTENT_HASH::$(cat ./build_${{ steps.next-release.outputs.DNP_VERSION }}/content-hash | sed 's/\//%2F/g')" - echo "::set-output name=PACKAGE_NAME::$(cat dappnode_package.json | jq .name | tr -d "\"")" - - - name: Create Release - id: create_release - uses: actions/create-release@latest - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - with: - release_name: v${{ steps.next-release.outputs.DNP_VERSION }} - tag_name: ${{ steps.dispatch-event.outputs.TAG }} - body: | - # ${{ steps.dispatch-event.outputs.TAG }} - You can execute a transaction to publish this package from the Admin UI with Metamask by following this pre-filled [link](http://my.dappnode/#/sdk/publish/r=${{ steps.dappnodesdk-publish.outputs.PACKAGE_NAME }}&v=${{ steps.next-release.outputs.DNP_VERSION }}&h=${{ steps.dappnodesdk-publish.outputs.CONTENT_HASH }}) - draft: false - prerelease: true - - - name: Upload release .xz file - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/${{ steps.dappnodesdk-publish.outputs.PACKAGE_NAME }}_${{ steps.next-release.outputs.DNP_VERSION }}.tar.xz - asset_name: ${{ steps.dappnodesdk-publish.outputs.PACKAGE_NAME }}_${{ steps.next-release.outputs.DNP_VERSION }}.tar.xz - asset_content_type: "application/octet-stream" - - - name: Upload release avatar file - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/avatar.png - asset_name: avatar.png - asset_content_type: "application/octet-stream" - - - name: Upload release dappnode_package.json file - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/dappnode_package.json - asset_name: dappnode_package.json - asset_content_type: "application/octet-stream" - - - name: Upload release docker-compose.yml file - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/docker-compose.yml - asset_name: docker-compose.yml - asset_content_type: "application/octet-stream" - - - name: Upload release content-hash file - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./build_${{ steps.next-release.outputs.DNP_VERSION }}/content-hash - asset_name: content-hash - asset_content_type: "application/octet-stream" - - - name: Commit changes - run: | - git config --global user.email "eduadiez@gmail.com" - git config --global user.name "Eduardo" - git commit -am "Github action update" - git push + DEVELOPER_ADDRESS: "0xf35960302a07022aba880dffaec2fdd64d5bf1c1" diff --git a/build/Dockerfile b/build/Dockerfile index 6fe02e4..5e1b655 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,16 +1,16 @@ +# Build Geth in a stock Go builder container +FROM golang:1.14-alpine as builder + ARG UPSTREAM_VERSION -FROM ethereum/client-go:${UPSTREAM_VERSION} as geth -# Pull Parity into a second stage deploy alpine container -FROM alpine:edge +RUN apk add --no-cache make gcc musl-dev linux-headers git && \ + git clone -b ${UPSTREAM_VERSION} https://github.com/ethereum/go-ethereum.git && \ + cd go-ethereum && make geth -RUN apk --no-cache add \ - libstdc++ \ - eudev-libs \ - libgcc \ - bash +# Pull Geth into a second stage deploy alpine container +FROM alpine:latest -COPY --from=geth /usr/local/bin/geth /usr/local/bin/geth +RUN apk add --no-cache ca-certificates +COPY --from=builder /go/go-ethereum/build/bin/geth /usr/local/bin -ENV SYNCMODE fast ENTRYPOINT geth --rpc --rpcaddr 0.0.0.0 --rpccorsdomain "*" --rpcvhosts "*" --ws --wsorigins "*" --wsaddr 0.0.0.0 --syncmode ${SYNCMODE:-fast} --nousb $EXTRA_OPTS diff --git a/dappnode_package.json b/dappnode_package.json index a80e22f..02b9e0a 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -15,6 +15,10 @@ "Blockchain" ], "license": "GLP-3.0", + "architectures": [ + "linux/amd64", + "linux/arm64" + ], "links": { "endpoint": "http://geth.dappnode:8545", "homepage": "https://github.com/dappnode/DAppNodePackage-geth#readme" diff --git a/docker-compose.yml b/docker-compose.yml index 8b8af4c..7fd4164 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: build: context: ./build args: - - UPSTREAM_VERSION + UPSTREAM_VERSION: v1.9.22 volumes: - 'geth:/root/.ethereum' environment: From 499826a72c8f4cf3a8349c939385acaf543137c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a=20D=C3=ADez?= Date: Mon, 5 Oct 2020 10:02:55 +0200 Subject: [PATCH 24/24] change version --- dappnode_package.json | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dappnode_package.json b/dappnode_package.json index 02b9e0a..4150b55 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,7 +1,7 @@ { "name": "geth.dnp.dappnode.eth", "version": "0.1.9", - "upstreamVersion": "v1.9.15", + "upstreamVersion": "v1.9.21", "shortDescription": "Geth is the official Go implementation of the Ethereum protocol.", "description": "Ethereum is a global, open-source platform for decentralized applications where you can write code that controls digital value, runs exactly as programmed, and is accessible anywhere in the world.", "type": "library", diff --git a/docker-compose.yml b/docker-compose.yml index 7fd4164..5bc55a6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: build: context: ./build args: - UPSTREAM_VERSION: v1.9.22 + UPSTREAM_VERSION: v1.9.21 volumes: - 'geth:/root/.ethereum' environment: