From 004d06a542d6fdf42a78596737f0e2fc39f15b50 Mon Sep 17 00:00:00 2001 From: tanlang Date: Fri, 6 May 2022 16:33:33 +0800 Subject: [PATCH 01/13] add: dockerfile & docker dir --- .github/workflows/docker-release.yaml | 28 +++++++++++++++++++++ Makefile | 10 +++++++- docker/script/compose.sh | 21 ++++++++++++++++ dockerfile | 35 +++++++++++++++++++++++++++ 4 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/docker-release.yaml create mode 100755 docker/script/compose.sh create mode 100644 dockerfile diff --git a/.github/workflows/docker-release.yaml b/.github/workflows/docker-release.yaml new file mode 100644 index 00000000..4488818a --- /dev/null +++ b/.github/workflows/docker-release.yaml @@ -0,0 +1,28 @@ +name: Docker Image CI + +on: + push: + branches: [ docker ] + pull_request: + branches: [ docker ] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + ref: feat/docker + - name: Build the Docker image + run: | + docker build . --file dockerfile --tag filvenus/venus-market:latest + # docker tag filvenus/venus-market:latest filvenus/venus-market:${{steps.vars.outputs.tag}} + - name: Login to registry + run: docker login --username=filvenus --password ${{ secrets.DOCKER_PASSWORD }} + - name: Push Image + run: | + # docker push filvenus/venus-market:${{steps.vars.outputs.tag}} + docker push filvenus/venus-market:latest \ No newline at end of file diff --git a/Makefile b/Makefile index a52f6b41..041323f5 100644 --- a/Makefile +++ b/Makefile @@ -60,4 +60,12 @@ build: $(BUILD_DEPS) rm -f market-client rm -f venus-market go build -o ./market-client $(GOFLAGS) ./cmd/market-client - go build -o ./venus-market $(GOFLAGS) ./cmd/venus-market \ No newline at end of file + go build -o ./venus-market $(GOFLAGS) ./cmd/venus-market + + + # docker +.PHONY: docker +BUILD_DOCKER_PROXY= + +docker: + docker build --build-arg https_proxy=$(BUILD_DOCKER_PROXY) -t venus-market . \ No newline at end of file diff --git a/docker/script/compose.sh b/docker/script/compose.sh new file mode 100755 index 00000000..3fbf4a15 --- /dev/null +++ b/docker/script/compose.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +echo $@ + + +if [ $nettype=="calibnet" ] +then + nettype="cali" +fi + +echo $nettype +./venus daemon --network=${nettype} --auth-url=http://127.0.0.1:8989 --import-snapshot /snapshot.car + + +# ./venus-market pool-run \ +# --node-url=/ip4/192.168.200.21/tcp/3454/ \ +# --auth-url=http://192.168.200.21:8989 \ +# --gateway-url=/ip4/192.168.200.21/tcp/45132/ \ +# --messager-url=/ip4/192.168.200.21/tcp/39812/ \ +# --auth-token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiemwiLCJwZXJtIjoiYWRtaW4iLCJleHQiOiIifQ.3u-PInSUmX-8f6Z971M7JBCHYgFVQrvwUjJfFY03ouQ \ +# --piecestorage=fs:/path/pieces_solo \ No newline at end of file diff --git a/dockerfile b/dockerfile new file mode 100644 index 00000000..d3647001 --- /dev/null +++ b/dockerfile @@ -0,0 +1,35 @@ +FROM filvenus/venus-buildenv AS buildenv + +RUN git clone https://github.com/filecoin-project/venus-market.git --depth 1 +RUN export GOPROXY=https://goproxy.cn && cd venus-market && make deps && make +RUN cd venus-market && ldd ./venus-market + + +FROM filvenus/venus-runtime + +# DIR for app +WORKDIR /app + +# copy the app from build env +COPY --from=buildenv /go/venus-market/venus-market /app/venus-market +COPY ./docker/script /script + +# copy ddl +COPY --from=buildenv /usr/lib/x86_64-linux-gnu/libhwloc.so.5 \ + /usr/lib/x86_64-linux-gnu/libOpenCL.so.1 \ + /lib/x86_64-linux-gnu/libgcc_s.so.1 \ + /lib/x86_64-linux-gnu/libutil.so.1 \ + /lib/x86_64-linux-gnu/librt.so.1 \ + /lib/x86_64-linux-gnu/libpthread.so.0 \ + /lib/x86_64-linux-gnu/libm.so.6 \ + /lib/x86_64-linux-gnu/libdl.so.2 \ + /lib/x86_64-linux-gnu/libc.so.6 \ + /usr/lib/x86_64-linux-gnu/libnuma.so.1 \ + /usr/lib/x86_64-linux-gnu/libltdl.so.7 \ + /lib/ + +EXPOSE 41235 +ENTRYPOINT ["/app/venus-market"] + + + From 2caf8f61391635077220aa7c3fb15b59a18e7e2c Mon Sep 17 00:00:00 2001 From: tanlang Date: Fri, 6 May 2022 16:38:36 +0800 Subject: [PATCH 02/13] fix: docker push action rely on err branch --- .github/workflows/docker-release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-release.yaml b/.github/workflows/docker-release.yaml index 4488818a..52e4eb6f 100644 --- a/.github/workflows/docker-release.yaml +++ b/.github/workflows/docker-release.yaml @@ -2,9 +2,9 @@ name: Docker Image CI on: push: - branches: [ docker ] + branches: [ feat/docker ] pull_request: - branches: [ docker ] + branches: [ feat/docker ] jobs: From 38caf94f1ee6425ad17a1e16485c6dad4daf5754 Mon Sep 17 00:00:00 2001 From: tanlang Date: Fri, 6 May 2022 17:24:59 +0800 Subject: [PATCH 03/13] add: docker-compose --- docker/script/compose.sh | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/docker/script/compose.sh b/docker/script/compose.sh index 3fbf4a15..ff7906de 100755 --- a/docker/script/compose.sh +++ b/docker/script/compose.sh @@ -3,19 +3,16 @@ echo $@ -if [ $nettype=="calibnet" ] -then - nettype="cali" -fi - -echo $nettype -./venus daemon --network=${nettype} --auth-url=http://127.0.0.1:8989 --import-snapshot /snapshot.car - - -# ./venus-market pool-run \ -# --node-url=/ip4/192.168.200.21/tcp/3454/ \ -# --auth-url=http://192.168.200.21:8989 \ -# --gateway-url=/ip4/192.168.200.21/tcp/45132/ \ -# --messager-url=/ip4/192.168.200.21/tcp/39812/ \ -# --auth-token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiemwiLCJwZXJtIjoiYWRtaW4iLCJleHQiOiIifQ.3u-PInSUmX-8f6Z971M7JBCHYgFVQrvwUjJfFY03ouQ \ -# --piecestorage=fs:/path/pieces_solo \ No newline at end of file +token=$(cat /env/token ) + + +echo ${token} + + + +./venus-market pool-run \ +--node-url=/ip4/127.0.0.1/tcp/3453 \ +--auth-url=http://127.0.0.1:8989 \ +--gateway-url=/ip4/127.0.0.1/tcp/45132/ \ +--messager-url=/ip4/127.0.0.1/tcp/39812/ \ +--auth-token=${token} \ No newline at end of file From cdd8046950dc35a98b4d1643d9ca58e671c3a893 Mon Sep 17 00:00:00 2001 From: tanlang Date: Fri, 6 May 2022 17:59:38 +0800 Subject: [PATCH 04/13] add: wait-for-it script --- docker/script/compose.sh | 2 - docker/script/wait-for-it.sh | 182 +++++++++++++++++++++++++++++++++++ 2 files changed, 182 insertions(+), 2 deletions(-) create mode 100755 docker/script/wait-for-it.sh diff --git a/docker/script/compose.sh b/docker/script/compose.sh index ff7906de..0851b6d8 100755 --- a/docker/script/compose.sh +++ b/docker/script/compose.sh @@ -8,8 +8,6 @@ token=$(cat /env/token ) echo ${token} - - ./venus-market pool-run \ --node-url=/ip4/127.0.0.1/tcp/3453 \ --auth-url=http://127.0.0.1:8989 \ diff --git a/docker/script/wait-for-it.sh b/docker/script/wait-for-it.sh new file mode 100755 index 00000000..3974640b --- /dev/null +++ b/docker/script/wait-for-it.sh @@ -0,0 +1,182 @@ +#!/usr/bin/env bash +# Use this script to test if a given TCP host/port are available + +WAITFORIT_cmdname=${0##*/} + +echoerr() { if [[ $WAITFORIT_QUIET -ne 1 ]]; then echo "$@" 1>&2; fi } + +usage() +{ + cat << USAGE >&2 +Usage: + $WAITFORIT_cmdname host:port [-s] [-t timeout] [-- command args] + -h HOST | --host=HOST Host or IP under test + -p PORT | --port=PORT TCP port under test + Alternatively, you specify the host and port as host:port + -s | --strict Only execute subcommand if the test succeeds + -q | --quiet Don't output any status messages + -t TIMEOUT | --timeout=TIMEOUT + Timeout in seconds, zero for no timeout + -- COMMAND ARGS Execute command with args after the test finishes +USAGE + exit 1 +} + +wait_for() +{ + if [[ $WAITFORIT_TIMEOUT -gt 0 ]]; then + echoerr "$WAITFORIT_cmdname: waiting $WAITFORIT_TIMEOUT seconds for $WAITFORIT_HOST:$WAITFORIT_PORT" + else + echoerr "$WAITFORIT_cmdname: waiting for $WAITFORIT_HOST:$WAITFORIT_PORT without a timeout" + fi + WAITFORIT_start_ts=$(date +%s) + while : + do + if [[ $WAITFORIT_ISBUSY -eq 1 ]]; then + nc -z $WAITFORIT_HOST $WAITFORIT_PORT + WAITFORIT_result=$? + else + (echo -n > /dev/tcp/$WAITFORIT_HOST/$WAITFORIT_PORT) >/dev/null 2>&1 + WAITFORIT_result=$? + fi + if [[ $WAITFORIT_result -eq 0 ]]; then + WAITFORIT_end_ts=$(date +%s) + echoerr "$WAITFORIT_cmdname: $WAITFORIT_HOST:$WAITFORIT_PORT is available after $((WAITFORIT_end_ts - WAITFORIT_start_ts)) seconds" + break + fi + sleep 1 + done + return $WAITFORIT_result +} + +wait_for_wrapper() +{ + # In order to support SIGINT during timeout: http://unix.stackexchange.com/a/57692 + if [[ $WAITFORIT_QUIET -eq 1 ]]; then + timeout $WAITFORIT_BUSYTIMEFLAG $WAITFORIT_TIMEOUT $0 --quiet --child --host=$WAITFORIT_HOST --port=$WAITFORIT_PORT --timeout=$WAITFORIT_TIMEOUT & + else + timeout $WAITFORIT_BUSYTIMEFLAG $WAITFORIT_TIMEOUT $0 --child --host=$WAITFORIT_HOST --port=$WAITFORIT_PORT --timeout=$WAITFORIT_TIMEOUT & + fi + WAITFORIT_PID=$! + trap "kill -INT -$WAITFORIT_PID" INT + wait $WAITFORIT_PID + WAITFORIT_RESULT=$? + if [[ $WAITFORIT_RESULT -ne 0 ]]; then + echoerr "$WAITFORIT_cmdname: timeout occurred after waiting $WAITFORIT_TIMEOUT seconds for $WAITFORIT_HOST:$WAITFORIT_PORT" + fi + return $WAITFORIT_RESULT +} + +# process arguments +while [[ $# -gt 0 ]] +do + case "$1" in + *:* ) + WAITFORIT_hostport=(${1//:/ }) + WAITFORIT_HOST=${WAITFORIT_hostport[0]} + WAITFORIT_PORT=${WAITFORIT_hostport[1]} + shift 1 + ;; + --child) + WAITFORIT_CHILD=1 + shift 1 + ;; + -q | --quiet) + WAITFORIT_QUIET=1 + shift 1 + ;; + -s | --strict) + WAITFORIT_STRICT=1 + shift 1 + ;; + -h) + WAITFORIT_HOST="$2" + if [[ $WAITFORIT_HOST == "" ]]; then break; fi + shift 2 + ;; + --host=*) + WAITFORIT_HOST="${1#*=}" + shift 1 + ;; + -p) + WAITFORIT_PORT="$2" + if [[ $WAITFORIT_PORT == "" ]]; then break; fi + shift 2 + ;; + --port=*) + WAITFORIT_PORT="${1#*=}" + shift 1 + ;; + -t) + WAITFORIT_TIMEOUT="$2" + if [[ $WAITFORIT_TIMEOUT == "" ]]; then break; fi + shift 2 + ;; + --timeout=*) + WAITFORIT_TIMEOUT="${1#*=}" + shift 1 + ;; + --) + shift + WAITFORIT_CLI=("$@") + break + ;; + --help) + usage + ;; + *) + echoerr "Unknown argument: $1" + usage + ;; + esac +done + +if [[ "$WAITFORIT_HOST" == "" || "$WAITFORIT_PORT" == "" ]]; then + echoerr "Error: you need to provide a host and port to test." + usage +fi + +WAITFORIT_TIMEOUT=${WAITFORIT_TIMEOUT:-15} +WAITFORIT_STRICT=${WAITFORIT_STRICT:-0} +WAITFORIT_CHILD=${WAITFORIT_CHILD:-0} +WAITFORIT_QUIET=${WAITFORIT_QUIET:-0} + +# Check to see if timeout is from busybox? +WAITFORIT_TIMEOUT_PATH=$(type -p timeout) +WAITFORIT_TIMEOUT_PATH=$(realpath $WAITFORIT_TIMEOUT_PATH 2>/dev/null || readlink -f $WAITFORIT_TIMEOUT_PATH) + +WAITFORIT_BUSYTIMEFLAG="" +if [[ $WAITFORIT_TIMEOUT_PATH =~ "busybox" ]]; then + WAITFORIT_ISBUSY=1 + # Check if busybox timeout uses -t flag + # (recent Alpine versions don't support -t anymore) + if timeout &>/dev/stdout | grep -q -e '-t '; then + WAITFORIT_BUSYTIMEFLAG="-t" + fi +else + WAITFORIT_ISBUSY=0 +fi + +if [[ $WAITFORIT_CHILD -gt 0 ]]; then + wait_for + WAITFORIT_RESULT=$? + exit $WAITFORIT_RESULT +else + if [[ $WAITFORIT_TIMEOUT -gt 0 ]]; then + wait_for_wrapper + WAITFORIT_RESULT=$? + else + wait_for + WAITFORIT_RESULT=$? + fi +fi + +if [[ $WAITFORIT_CLI != "" ]]; then + if [[ $WAITFORIT_RESULT -ne 0 && $WAITFORIT_STRICT -eq 1 ]]; then + echoerr "$WAITFORIT_cmdname: strict mode, refusing to execute subprocess" + exit $WAITFORIT_RESULT + fi + exec "${WAITFORIT_CLI[@]}" +else + exit $WAITFORIT_RESULT +fi \ No newline at end of file From db0ca0d978a1ebd8af01edb7b54e75fc983dd0b9 Mon Sep 17 00:00:00 2001 From: tanlang Date: Wed, 11 May 2022 14:53:34 +0800 Subject: [PATCH 05/13] add: more readable log --- docker/script/compose.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/script/compose.sh b/docker/script/compose.sh index 0851b6d8..4c6fa45d 100755 --- a/docker/script/compose.sh +++ b/docker/script/compose.sh @@ -5,10 +5,10 @@ echo $@ token=$(cat /env/token ) - +echo "token:" echo ${token} -./venus-market pool-run \ +/app/venus-market pool-run \ --node-url=/ip4/127.0.0.1/tcp/3453 \ --auth-url=http://127.0.0.1:8989 \ --gateway-url=/ip4/127.0.0.1/tcp/45132/ \ From f75a54dd84e4ffb597575d1b0fc27d2407892257 Mon Sep 17 00:00:00 2001 From: tanlang Date: Thu, 12 May 2022 15:47:08 +0800 Subject: [PATCH 06/13] feat: config snippet for compose.sh --- docker/config/PieceStorage.toml | 5 +++++ docker/script/compose.sh | 8 ++++++++ dockerfile | 1 + 3 files changed, 14 insertions(+) create mode 100644 docker/config/PieceStorage.toml diff --git a/docker/config/PieceStorage.toml b/docker/config/PieceStorage.toml new file mode 100644 index 00000000..f2b54112 --- /dev/null +++ b/docker/config/PieceStorage.toml @@ -0,0 +1,5 @@ +[PieceStorage] + + [[PieceStorage.Fs]] + ReadOnly = false + Path = "/PieceStorage" \ No newline at end of file diff --git a/docker/script/compose.sh b/docker/script/compose.sh index 4c6fa45d..0b3fcb81 100755 --- a/docker/script/compose.sh +++ b/docker/script/compose.sh @@ -1,4 +1,5 @@ #!/bin/sh +echo "Compose Init Begin!" echo $@ @@ -8,6 +9,13 @@ token=$(cat /env/token ) echo "token:" echo ${token} +echo "set default piece storage path: /PieceStorage" +mkdir -p ~/.venusmarket/ +cat /docker/config/PieceStorage.toml > ~/.venusmarket/config.toml + +echo "Compose Int End!" + + /app/venus-market pool-run \ --node-url=/ip4/127.0.0.1/tcp/3453 \ --auth-url=http://127.0.0.1:8989 \ diff --git a/dockerfile b/dockerfile index d3647001..18c5cd10 100644 --- a/dockerfile +++ b/dockerfile @@ -13,6 +13,7 @@ WORKDIR /app # copy the app from build env COPY --from=buildenv /go/venus-market/venus-market /app/venus-market COPY ./docker/script /script +COPY ./docker /docker # copy ddl COPY --from=buildenv /usr/lib/x86_64-linux-gnu/libhwloc.so.5 \ From f6c5aa5d79fe36bca602d7be161e0ae6d319b7d6 Mon Sep 17 00:00:00 2001 From: tanlang Date: Fri, 13 May 2022 10:54:03 +0800 Subject: [PATCH 07/13] feat: add publish docker image action --- .github/workflows/tag-workflow.yml | 13 ++++++++++++- extern/filecoin-ffi | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tag-workflow.yml b/.github/workflows/tag-workflow.yml index b3a78b1b..34747cfd 100644 --- a/.github/workflows/tag-workflow.yml +++ b/.github/workflows/tag-workflow.yml @@ -175,4 +175,15 @@ jobs: --data-urlencode "link=$link" \ --data-urlencode "description=message:${{steps.vars.outputs.git_message}}, branch:${{steps.vars.outputs.branch}}, commit:${{steps.vars.outputs.short}}, tag:${{steps.vars.outputs.github_tag}}" \ --data-urlencode "version=${{steps.vars.outputs.short}}" - set -e \ No newline at end of file + set -e + + - name: Publish the Docker image + if: ${{ steps.vars.outputs.pub_method=='pushRelease' }} + run: | + docker build . --file dockerfile --tag filvenus/venus-market:latest + docker tag filvenus/venus-market:latest filvenus/venus-market:${{steps.vars.outputs.github_tag}} + docker login --username=filvenus --password ${{ secrets.DOCKER_PASSWORD }} + docker push filvenus/venus-market:${{steps.vars.outputs.github_tag}} + docker push filvenus/venus-market:latest + + \ No newline at end of file diff --git a/extern/filecoin-ffi b/extern/filecoin-ffi index 5ec5d805..fd80fe20 160000 --- a/extern/filecoin-ffi +++ b/extern/filecoin-ffi @@ -1 +1 @@ -Subproject commit 5ec5d805c01ea85224f6448dd6c6fa0a2a73c028 +Subproject commit fd80fe20ae3c96c4c8c5da1ca781103ad6f21009 From 43b1f33e53eb60f7555cd965f9d2756c1afa238f Mon Sep 17 00:00:00 2001 From: Lin Xiao Date: Mon, 16 May 2022 15:11:41 +0800 Subject: [PATCH 08/13] feat:add default piece storage path --- docker/script/init.sh | 15 +++++++++++++++ dockerfile | 5 +++-- 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100755 docker/script/init.sh diff --git a/docker/script/init.sh b/docker/script/init.sh new file mode 100755 index 00000000..5dcf2ab3 --- /dev/null +++ b/docker/script/init.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +echo "Init Begin!" + +echo "args:" +echo $@ + + +echo "set default piece storage path: /PieceStorage" +mkdir -p ~/.venusmarket/ +cat /docker/config/PieceStorage.toml > ~/.venusmarket/config.toml +cat ~/.venusmarket/config.toml +echo "Init End!" + +/app/venus-market $@ \ No newline at end of file diff --git a/dockerfile b/dockerfile index 18c5cd10..abce7c0b 100644 --- a/dockerfile +++ b/dockerfile @@ -29,8 +29,9 @@ COPY --from=buildenv /usr/lib/x86_64-linux-gnu/libhwloc.so.5 \ /usr/lib/x86_64-linux-gnu/libltdl.so.7 \ /lib/ -EXPOSE 41235 -ENTRYPOINT ["/app/venus-market"] +EXPOSE 41235 58418 +ENTRYPOINT ["/script/init.sh"] + From e760bcc3d3a956939f3e1b41862338753c302c63 Mon Sep 17 00:00:00 2001 From: Lin Xiao Date: Mon, 16 May 2022 15:12:11 +0800 Subject: [PATCH 09/13] fix: change action trigger to making tag --- .github/workflows/tag-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tag-workflow.yml b/.github/workflows/tag-workflow.yml index 34747cfd..7639e78a 100644 --- a/.github/workflows/tag-workflow.yml +++ b/.github/workflows/tag-workflow.yml @@ -178,7 +178,7 @@ jobs: set -e - name: Publish the Docker image - if: ${{ steps.vars.outputs.pub_method=='pushRelease' }} + if: ${{ github.ref_type == 'tag' && github.event_name == 'create' }} run: | docker build . --file dockerfile --tag filvenus/venus-market:latest docker tag filvenus/venus-market:latest filvenus/venus-market:${{steps.vars.outputs.github_tag}} From 9a6941e598af9b6b2b826aa706ce27847bfe3810 Mon Sep 17 00:00:00 2001 From: tanlang Date: Wed, 8 Jun 2022 15:23:22 +0800 Subject: [PATCH 10/13] chore: ignore .vscode --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index a795f5f5..33f4dace 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ market-client venus-market sequence_chart.md .idea +.vscode coverage.* # Test binary, built with `go test -c` *.test From cda794a9990c2a723e2eb732349f772f08ca1cb2 Mon Sep 17 00:00:00 2001 From: tanlang Date: Wed, 8 Jun 2022 15:23:37 +0800 Subject: [PATCH 11/13] chore: rm the test workflow of docker --- .github/workflows/docker-release.yaml | 28 --------------------------- 1 file changed, 28 deletions(-) delete mode 100644 .github/workflows/docker-release.yaml diff --git a/.github/workflows/docker-release.yaml b/.github/workflows/docker-release.yaml deleted file mode 100644 index 52e4eb6f..00000000 --- a/.github/workflows/docker-release.yaml +++ /dev/null @@ -1,28 +0,0 @@ -name: Docker Image CI - -on: - push: - branches: [ feat/docker ] - pull_request: - branches: [ feat/docker ] - -jobs: - - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - ref: feat/docker - - name: Build the Docker image - run: | - docker build . --file dockerfile --tag filvenus/venus-market:latest - # docker tag filvenus/venus-market:latest filvenus/venus-market:${{steps.vars.outputs.tag}} - - name: Login to registry - run: docker login --username=filvenus --password ${{ secrets.DOCKER_PASSWORD }} - - name: Push Image - run: | - # docker push filvenus/venus-market:${{steps.vars.outputs.tag}} - docker push filvenus/venus-market:latest \ No newline at end of file From 14019c345b0e12f83c0ffddad49c75450991b129 Mon Sep 17 00:00:00 2001 From: tanlang Date: Thu, 9 Jun 2022 16:11:56 +0800 Subject: [PATCH 12/13] style: add blank line to the end of the file --- .github/workflows/tag-workflow.yml | 2 -- .gitignore | 2 +- Makefile | 2 +- docker/config/PieceStorage.toml | 2 +- docker/script/compose.sh | 2 +- docker/script/init.sh | 2 +- docker/script/wait-for-it.sh | 2 +- dockerfile | 4 ---- 8 files changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/tag-workflow.yml b/.github/workflows/tag-workflow.yml index 7639e78a..8973d024 100644 --- a/.github/workflows/tag-workflow.yml +++ b/.github/workflows/tag-workflow.yml @@ -185,5 +185,3 @@ jobs: docker login --username=filvenus --password ${{ secrets.DOCKER_PASSWORD }} docker push filvenus/venus-market:${{steps.vars.outputs.github_tag}} docker push filvenus/venus-market:latest - - \ No newline at end of file diff --git a/.gitignore b/.gitignore index 33f4dace..3e9f63ff 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,4 @@ data-transfer # Dependency directories (remove the comment below to include it) # vendor/ -build-dep \ No newline at end of file +build-dep diff --git a/Makefile b/Makefile index 041323f5..07340ecc 100644 --- a/Makefile +++ b/Makefile @@ -68,4 +68,4 @@ build: $(BUILD_DEPS) BUILD_DOCKER_PROXY= docker: - docker build --build-arg https_proxy=$(BUILD_DOCKER_PROXY) -t venus-market . \ No newline at end of file + docker build --build-arg https_proxy=$(BUILD_DOCKER_PROXY) -t venus-market . diff --git a/docker/config/PieceStorage.toml b/docker/config/PieceStorage.toml index f2b54112..6ce91876 100644 --- a/docker/config/PieceStorage.toml +++ b/docker/config/PieceStorage.toml @@ -2,4 +2,4 @@ [[PieceStorage.Fs]] ReadOnly = false - Path = "/PieceStorage" \ No newline at end of file + Path = "/PieceStorage" diff --git a/docker/script/compose.sh b/docker/script/compose.sh index 0b3fcb81..d4c4db49 100755 --- a/docker/script/compose.sh +++ b/docker/script/compose.sh @@ -21,4 +21,4 @@ echo "Compose Int End!" --auth-url=http://127.0.0.1:8989 \ --gateway-url=/ip4/127.0.0.1/tcp/45132/ \ --messager-url=/ip4/127.0.0.1/tcp/39812/ \ ---auth-token=${token} \ No newline at end of file +--auth-token=${token} diff --git a/docker/script/init.sh b/docker/script/init.sh index 5dcf2ab3..d37b9b9b 100755 --- a/docker/script/init.sh +++ b/docker/script/init.sh @@ -12,4 +12,4 @@ cat /docker/config/PieceStorage.toml > ~/.venusmarket/config.toml cat ~/.venusmarket/config.toml echo "Init End!" -/app/venus-market $@ \ No newline at end of file +/app/venus-market $@ diff --git a/docker/script/wait-for-it.sh b/docker/script/wait-for-it.sh index 3974640b..d990e0d3 100755 --- a/docker/script/wait-for-it.sh +++ b/docker/script/wait-for-it.sh @@ -179,4 +179,4 @@ if [[ $WAITFORIT_CLI != "" ]]; then exec "${WAITFORIT_CLI[@]}" else exit $WAITFORIT_RESULT -fi \ No newline at end of file +fi diff --git a/dockerfile b/dockerfile index abce7c0b..7b9ff2bb 100644 --- a/dockerfile +++ b/dockerfile @@ -31,7 +31,3 @@ COPY --from=buildenv /usr/lib/x86_64-linux-gnu/libhwloc.so.5 \ EXPOSE 41235 58418 ENTRYPOINT ["/script/init.sh"] - - - - From 0e1055e23c29fff71442e9930e9bf1603909fb0e Mon Sep 17 00:00:00 2001 From: tanlang Date: Thu, 9 Jun 2022 16:13:31 +0800 Subject: [PATCH 13/13] fix: adjust filecoin-ffi subrepo version --- extern/filecoin-ffi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/filecoin-ffi b/extern/filecoin-ffi index fd80fe20..5ec5d805 160000 --- a/extern/filecoin-ffi +++ b/extern/filecoin-ffi @@ -1 +1 @@ -Subproject commit fd80fe20ae3c96c4c8c5da1ca781103ad6f21009 +Subproject commit 5ec5d805c01ea85224f6448dd6c6fa0a2a73c028