From ba46f444639994b087eab93e19ba5eed0f9b3786 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Wed, 25 May 2022 22:08:30 +0800 Subject: [PATCH 01/42] fixed unable to start plugins issue --- Dockerfile | 9 ++++++--- Dockerfile.cn | 6 +++--- Dockerfile.local | 6 +++--- backend/go.mod | 2 +- backend/go.sum | 4 ++-- bin/docker-install-plugins.sh | 23 +++++++++++++++++++++++ 6 files changed, 38 insertions(+), 12 deletions(-) create mode 100644 bin/docker-install-plugins.sh diff --git a/Dockerfile b/Dockerfile index 68df191a..b5c2dc54 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,9 +24,6 @@ FROM ubuntu:20.04 # set as non-interactive ENV DEBIAN_FRONTEND noninteractive -# set CRAWLAB_IS_DOCKER -ENV CRAWLAB_IS_DOCKER Y - # install packages RUN chmod 777 /tmp \ && apt-get update \ @@ -67,6 +64,9 @@ COPY --from=frontend-build /app/dist /app/dist # copy nginx config files COPY ./nginx/crawlab.conf /etc/nginx/conf.d +# install plugins +RUN /bin/bash /app/bin/docker-install-plugins.sh + # working directory WORKDIR /app/backend @@ -77,6 +77,9 @@ ENV TZ Asia/Shanghai ENV LC_ALL C.UTF-8 ENV LANG C.UTF-8 +# docker +ENV CRAWLAB_DOCKER Y + # frontend port EXPOSE 8080 diff --git a/Dockerfile.cn b/Dockerfile.cn index 6a359e11..4b9320b4 100644 --- a/Dockerfile.cn +++ b/Dockerfile.cn @@ -24,9 +24,6 @@ FROM ubuntu:20.04 # set as non-interactive ENV DEBIAN_FRONTEND noninteractive -# set CRAWLAB_IS_DOCKER -ENV CRAWLAB_IS_DOCKER Y - # install packages RUN chmod 777 /tmp \ && apt-get update \ @@ -67,6 +64,9 @@ COPY --from=frontend-build /app/dist /app/dist # copy nginx config files COPY ./nginx/crawlab.conf /etc/nginx/conf.d +# install plugins +RUN /bin/bash /app/bin/docker-install-plugins.sh + # working directory WORKDIR /app/backend diff --git a/Dockerfile.local b/Dockerfile.local index aeffb969..b8000c3d 100644 --- a/Dockerfile.local +++ b/Dockerfile.local @@ -24,9 +24,6 @@ FROM ubuntu:20.04 # set as non-interactive ENV DEBIAN_FRONTEND noninteractive -# set CRAWLAB_IS_DOCKER -ENV CRAWLAB_IS_DOCKER Y - # install packages RUN chmod 777 /tmp \ && apt-get update \ @@ -67,6 +64,9 @@ COPY --from=frontend-build /app/dist /app/dist # copy nginx config files COPY ./nginx/crawlab.conf /etc/nginx/conf.d +# install plugins +RUN /bin/bash /app/bin/docker-install-plugins.sh + # working directory WORKDIR /app/backend diff --git a/backend/go.mod b/backend/go.mod index a2ada1f2..b2759439 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -2,4 +2,4 @@ module crawlab go 1.16 -require github.com/crawlab-team/crawlab-core v0.6.0 +require github.com/crawlab-team/crawlab-core v0.6.1-0.20220525140504-682459bd0071 diff --git a/backend/go.sum b/backend/go.sum index 0ada3474..7802ff23 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -122,8 +122,8 @@ github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfc github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/crawlab-team/crawlab-core v0.0.1/go.mod h1:6dJHMvrmIJbfYHhYNeGZkGOLEBvur+yGiFzLCRXx92k= -github.com/crawlab-team/crawlab-core v0.6.0 h1:CGxdztjcIkozZp2EHXFN1brvKxIAdD0Xe1l4c+SFNE8= -github.com/crawlab-team/crawlab-core v0.6.0/go.mod h1:KqfjSkEclVY39nC58bsq3MLcuXbDnsPp/ClcBDkqOF0= +github.com/crawlab-team/crawlab-core v0.6.1-0.20220525140504-682459bd0071 h1:b7eDJjxAZMr/Lvx6PMeV8/4SRScV7Ixw3HX6t2XhU48= +github.com/crawlab-team/crawlab-core v0.6.1-0.20220525140504-682459bd0071/go.mod h1:KqfjSkEclVY39nC58bsq3MLcuXbDnsPp/ClcBDkqOF0= github.com/crawlab-team/crawlab-db v0.0.2/go.mod h1:o7o4rbcyAWlFGHg9VS7V7tM/GqRq+N2mnAXO71cZA78= github.com/crawlab-team/crawlab-db v0.6.0-beta.20220417.1300 h1:2EymVIiOspX28qNC1Qon3W1fzXKQ8hi6ho3QtXB4w6k= github.com/crawlab-team/crawlab-db v0.6.0-beta.20220417.1300/go.mod h1:gfeF0nAnFuup6iYvgHkY0in/HpO/+JktXqVNMdhoxhU= diff --git a/bin/docker-install-plugins.sh b/bin/docker-install-plugins.sh new file mode 100644 index 00000000..82700f2b --- /dev/null +++ b/bin/docker-install-plugins.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +function install_plugin() { + # plugins executables directory + local bin_path="/app/plugins/bin" + if [ -d $bin_path ]; then + mkdir "$bin_path" + fi + + # plugin name + local name=$1 + local url="https://github.com/crawlab-team/${name}" + local repo_path=""/app/plugins/${name} + git clone "$url" "$repo_path" + cd "$repo_path" && go build -o "${bin_path}/${name}" + chmod +x "${bin_path}/${name}" +} + +plugin_names="plugin-dependency plugin-notification plugin-spider-assistant" + +for name in $plugin_names; do + install_plugin "$name" +done From 522a78fee28692c38545489d6156e13df9e5423d Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Tue, 31 May 2022 09:33:16 +0800 Subject: [PATCH 02/42] updated script --- bin/docker-install-plugins.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/docker-install-plugins.sh b/bin/docker-install-plugins.sh index 82700f2b..cad09643 100644 --- a/bin/docker-install-plugins.sh +++ b/bin/docker-install-plugins.sh @@ -4,6 +4,8 @@ function install_plugin() { # plugins executables directory local bin_path="/app/plugins/bin" if [ -d $bin_path ]; then + : + else mkdir "$bin_path" fi From ecd2792f1cf0ba343d369f961b3b4c1e5e97647c Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Thu, 2 Jun 2022 21:12:35 +0800 Subject: [PATCH 03/42] fixed unable to start plugins issue --- backend/go.mod | 2 +- backend/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/go.mod b/backend/go.mod index b2759439..396de0b0 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -2,4 +2,4 @@ module crawlab go 1.16 -require github.com/crawlab-team/crawlab-core v0.6.1-0.20220525140504-682459bd0071 +require github.com/crawlab-team/crawlab-core v0.6.0-2 diff --git a/backend/go.sum b/backend/go.sum index 7802ff23..e3fb5313 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -122,8 +122,8 @@ github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfc github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/crawlab-team/crawlab-core v0.0.1/go.mod h1:6dJHMvrmIJbfYHhYNeGZkGOLEBvur+yGiFzLCRXx92k= -github.com/crawlab-team/crawlab-core v0.6.1-0.20220525140504-682459bd0071 h1:b7eDJjxAZMr/Lvx6PMeV8/4SRScV7Ixw3HX6t2XhU48= -github.com/crawlab-team/crawlab-core v0.6.1-0.20220525140504-682459bd0071/go.mod h1:KqfjSkEclVY39nC58bsq3MLcuXbDnsPp/ClcBDkqOF0= +github.com/crawlab-team/crawlab-core v0.6.0-2 h1:vBL4D/lOsM8Pu2ACAd1yvY43mJG9GD7fFCnRn7I1b8o= +github.com/crawlab-team/crawlab-core v0.6.0-2/go.mod h1:KqfjSkEclVY39nC58bsq3MLcuXbDnsPp/ClcBDkqOF0= github.com/crawlab-team/crawlab-db v0.0.2/go.mod h1:o7o4rbcyAWlFGHg9VS7V7tM/GqRq+N2mnAXO71cZA78= github.com/crawlab-team/crawlab-db v0.6.0-beta.20220417.1300 h1:2EymVIiOspX28qNC1Qon3W1fzXKQ8hi6ho3QtXB4w6k= github.com/crawlab-team/crawlab-db v0.6.0-beta.20220417.1300/go.mod h1:gfeF0nAnFuup6iYvgHkY0in/HpO/+JktXqVNMdhoxhU= From 9998cd52da11301c939bbe9c3dbd4effa52d9a13 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Thu, 2 Jun 2022 21:57:55 +0800 Subject: [PATCH 04/42] fixed unable to start plugins issue --- backend/go.mod | 2 +- backend/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/go.mod b/backend/go.mod index 396de0b0..74fbef94 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -2,4 +2,4 @@ module crawlab go 1.16 -require github.com/crawlab-team/crawlab-core v0.6.0-2 +require github.com/crawlab-team/crawlab-core v0.6.0-3 diff --git a/backend/go.sum b/backend/go.sum index e3fb5313..fe54f12e 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -122,8 +122,8 @@ github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfc github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/crawlab-team/crawlab-core v0.0.1/go.mod h1:6dJHMvrmIJbfYHhYNeGZkGOLEBvur+yGiFzLCRXx92k= -github.com/crawlab-team/crawlab-core v0.6.0-2 h1:vBL4D/lOsM8Pu2ACAd1yvY43mJG9GD7fFCnRn7I1b8o= -github.com/crawlab-team/crawlab-core v0.6.0-2/go.mod h1:KqfjSkEclVY39nC58bsq3MLcuXbDnsPp/ClcBDkqOF0= +github.com/crawlab-team/crawlab-core v0.6.0-3 h1:K4QtGSl3p+naaYf8hqupKagEpRDz17qD/zwugbFPhOI= +github.com/crawlab-team/crawlab-core v0.6.0-3/go.mod h1:KqfjSkEclVY39nC58bsq3MLcuXbDnsPp/ClcBDkqOF0= github.com/crawlab-team/crawlab-db v0.0.2/go.mod h1:o7o4rbcyAWlFGHg9VS7V7tM/GqRq+N2mnAXO71cZA78= github.com/crawlab-team/crawlab-db v0.6.0-beta.20220417.1300 h1:2EymVIiOspX28qNC1Qon3W1fzXKQ8hi6ho3QtXB4w6k= github.com/crawlab-team/crawlab-db v0.6.0-beta.20220417.1300/go.mod h1:gfeF0nAnFuup6iYvgHkY0in/HpO/+JktXqVNMdhoxhU= From 22ad92dc006fe4655c55611e3ebe0b4a3f9cbe5d Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 15:04:54 +0800 Subject: [PATCH 05/42] updated workflows --- .github/workflows/docker-crawlab.yml | 107 +++++++++++++++++++++++++++ .github/workflows/dockerpush.yml | 50 ------------- Dockerfile | 68 +---------------- backend/Dockerfile | 10 +++ backend/go.mod | 2 +- backend/go.sum | 4 +- frontend/Dockerfile | 8 ++ 7 files changed, 131 insertions(+), 118 deletions(-) create mode 100644 .github/workflows/docker-crawlab.yml delete mode 100644 .github/workflows/dockerpush.yml create mode 100644 backend/Dockerfile create mode 100644 frontend/Dockerfile diff --git a/.github/workflows/docker-crawlab.yml b/.github/workflows/docker-crawlab.yml new file mode 100644 index 00000000..2fab69c4 --- /dev/null +++ b/.github/workflows/docker-crawlab.yml @@ -0,0 +1,107 @@ +name: "Docker Image CI: crawlab" + +on: + push: + branches: [ develop, main ] + #pull_request: + # branches: [ main ] + release: + types: [ published ] + +env: + IMAGE_PATH_CRAWLAB_BACKEND: backend + IMAGE_PATH_CRAWLAB_FRONTEND: frontend + IMAGE_NAME_CRAWLAB: crawlabteam/crawlab + IMAGE_NAME_CRAWLAB_BACKEND: crawlabteam/crawlab-backend + IMAGE_NAME_CRAWLAB_FRONTEND: crawlabteam/crawlab-frontend + +jobs: + setup: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v18.7 + - name: Check changed files + run: | + for file in ${{ steps.changed-files.outputs.all_changed_files }}; do + if [[ $file =~ ^${IMAGE_PATH_CRAWLAB_BACKEND}/.* ]]; then + echo "is_matched_backend=1" >> $GITHUB_ENV + break + fi + if [[ $file =~ ^${IMAGE_PATH_CRAWLAB_FRONTEND}/.* ]]; then + echo "is_matched_frontend=1" >> $GITHUB_ENV + break + fi + done + - name: Get version + run: | + # Strip git ref prefix from version + VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') + + # Strip "v" prefix from tag name + [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') + + # Use Docker `latest` tag convention + [ "$VERSION" == "main" ] && VERSION=latest + + echo "IMAGE_VERSION=$VERSION" >> $GITHUB_ENV + + build-backend: + if: ${{ env.is_matched_backend == '1' }} + needs: [ setup ] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v18.7 + - name: Build image + run: | + cd $IMAGE_PATH_CRAWLAB_BACKEND + docker build . --file Dockerfile --tag image + - name: Log into registry + run: echo ${{ secrets.DOCKER_PASSWORD}} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin + - name: Push image + run: | + IMAGE_NAME=$IMAGE_NAME_CRAWLAB_BACKEND + docker tag image $IMAGE_NAME:$IMAGE_VERSION + docker push $IMAGE_NAME:$IMAGE_VERSION + + build-frontend: + if: ${{ env.is_matched_frontend == '1' }} + needs: [ setup ] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v18.7 + - name: Build image + run: | + cd $IMAGE_PATH_CRAWLAB_FRONTEND + docker build . --file Dockerfile --tag image + - name: Log into registry + run: echo ${{ secrets.DOCKER_PASSWORD}} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin + - name: Push image + run: | + IMAGE_NAME=$IMAGE_NAME_CRAWLAB_FRONTEND + docker tag image $IMAGE_NAME:$IMAGE_VERSION + docker push $IMAGE_NAME:$IMAGE_VERSION + + build: + if: ${{ env.is_matched_backend == '1' || env.is_matched_frontend == '1' }} + needs: [ build-backend, build-frontend ] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build image + run: docker build . --file Dockerfile --tag image + - name: Log into registry + run: echo ${{ secrets.DOCKER_PASSWORD}} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin + - name: Push image + run: | + IMAGE_ID=$IMAGE_NAME_CRAWLAB + docker tag image $IMAGE_ID:$VERSION + docker push $IMAGE_ID:$VERSION diff --git a/.github/workflows/dockerpush.yml b/.github/workflows/dockerpush.yml deleted file mode 100644 index e153f529..00000000 --- a/.github/workflows/dockerpush.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Docker Image CI - -on: - push: - branches: [ develop, main ] - #pull_request: - # branches: [ main ] - release: - types: [ published ] - -env: - IMAGE_NAME: crawlabteam/crawlab - -jobs: - - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Build image - run: docker build . --file Dockerfile --tag image - - - name: Log into registry - run: echo ${{ secrets.DOCKER_PASSWORD}} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin - - - name: Push image - run: | - IMAGE_ID=$IMAGE_NAME - - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - - # Use Docker `latest` tag convention - [ "$VERSION" == "main" ] && VERSION=latest - - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - - docker tag image $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION - - if [[ $VERSION == "latest" ]]; then - docker tag image $IMAGE_ID:main - docker push $IMAGE_ID:main - fi diff --git a/Dockerfile b/Dockerfile index b5c2dc54..18053697 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,52 +1,9 @@ -FROM golang:1.16 AS backend-build +FROM crawlabteam/crawlab-backend:latest AS backend-build -WORKDIR /go/src/app -COPY ./backend . - -ENV GO111MODULE on -#ENV GOPROXY https://goproxy.io - -RUN go mod tidy \ - && go install -v ./... - -FROM node:12 AS frontend-build - -ADD ./frontend /app -WORKDIR /app -RUN rm /app/.npmrc - -# install frontend -RUN yarn install && yarn run build:docker +FROM crawlabteam/crawlab-frontend:latest AS frontend-build # images -FROM ubuntu:20.04 - -# set as non-interactive -ENV DEBIAN_FRONTEND noninteractive - -# install packages -RUN chmod 777 /tmp \ - && apt-get update \ - && apt-get install -y curl git net-tools iputils-ping ntp ntpdate nginx wget dumb-init cloc - -# install python -RUN apt-get install -y python3 python3-pip \ - && ln -s /usr/bin/pip3 /usr/local/bin/pip \ - && ln -s /usr/bin/python3 /usr/local/bin/python - -# install golang -RUN curl -OL https://golang.org/dl/go1.16.7.linux-amd64.tar.gz \ - && tar -C /usr/local -xvf go1.16.7.linux-amd64.tar.gz \ - && ln -s /usr/local/go/bin/go /usr/local/bin/go - -# install seaweedfs -RUN wget https://github.com/crawlab-team/resources/raw/main/seaweedfs/2.79/linux_amd64.tar.gz \ - && tar -zxf linux_amd64.tar.gz \ - && cp weed /usr/local/bin - -# install backend -RUN pip install scrapy pymongo bs4 requests -RUN pip install crawlab-sdk==0.6.b20211224-1500 +FROM crawlabteam/crawlab-base:latest # add files COPY ./backend/conf /app/backend/conf @@ -67,24 +24,5 @@ COPY ./nginx/crawlab.conf /etc/nginx/conf.d # install plugins RUN /bin/bash /app/bin/docker-install-plugins.sh -# working directory -WORKDIR /app/backend - -# timezone environment -ENV TZ Asia/Shanghai - -# language environment -ENV LC_ALL C.UTF-8 -ENV LANG C.UTF-8 - -# docker -ENV CRAWLAB_DOCKER Y - -# frontend port -EXPOSE 8080 - -# backend port -EXPOSE 8000 - # start backend CMD ["/bin/bash", "/app/bin/docker-init.sh"] diff --git a/backend/Dockerfile b/backend/Dockerfile new file mode 100644 index 00000000..d13a85a6 --- /dev/null +++ b/backend/Dockerfile @@ -0,0 +1,10 @@ +FROM golang:1.16 + +WORKDIR /go/src/app +COPY ./backend . + +ENV GO111MODULE on +#ENV GOPROXY https://goproxy.io + +RUN go mod tidy \ + && go install -v ./... diff --git a/backend/go.mod b/backend/go.mod index 74fbef94..cb1a57bf 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -2,4 +2,4 @@ module crawlab go 1.16 -require github.com/crawlab-team/crawlab-core v0.6.0-3 +require github.com/crawlab-team/crawlab-core v0.6.0-4 diff --git a/backend/go.sum b/backend/go.sum index fe54f12e..3f8f5caa 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -122,8 +122,8 @@ github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfc github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/crawlab-team/crawlab-core v0.0.1/go.mod h1:6dJHMvrmIJbfYHhYNeGZkGOLEBvur+yGiFzLCRXx92k= -github.com/crawlab-team/crawlab-core v0.6.0-3 h1:K4QtGSl3p+naaYf8hqupKagEpRDz17qD/zwugbFPhOI= -github.com/crawlab-team/crawlab-core v0.6.0-3/go.mod h1:KqfjSkEclVY39nC58bsq3MLcuXbDnsPp/ClcBDkqOF0= +github.com/crawlab-team/crawlab-core v0.6.0-4 h1:91Wsu+AS+0SEGgYlzhIjsRVrIFE5E0nU2kP0BJdBaRc= +github.com/crawlab-team/crawlab-core v0.6.0-4/go.mod h1:KqfjSkEclVY39nC58bsq3MLcuXbDnsPp/ClcBDkqOF0= github.com/crawlab-team/crawlab-db v0.0.2/go.mod h1:o7o4rbcyAWlFGHg9VS7V7tM/GqRq+N2mnAXO71cZA78= github.com/crawlab-team/crawlab-db v0.6.0-beta.20220417.1300 h1:2EymVIiOspX28qNC1Qon3W1fzXKQ8hi6ho3QtXB4w6k= github.com/crawlab-team/crawlab-db v0.6.0-beta.20220417.1300/go.mod h1:gfeF0nAnFuup6iYvgHkY0in/HpO/+JktXqVNMdhoxhU= diff --git a/frontend/Dockerfile b/frontend/Dockerfile new file mode 100644 index 00000000..b74e70f0 --- /dev/null +++ b/frontend/Dockerfile @@ -0,0 +1,8 @@ +FROM node:12 + +ADD ./frontend /app +WORKDIR /app +RUN rm /app/.npmrc + +# install frontend +RUN yarn install && yarn run build:docker From c6bc5c73b583d3463144cea08e9eefe3bcafeb28 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 15:08:39 +0800 Subject: [PATCH 06/42] updated workflows --- .github/workflows/docker-crawlab.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-crawlab.yml b/.github/workflows/docker-crawlab.yml index 2fab69c4..8b7d89e7 100644 --- a/.github/workflows/docker-crawlab.yml +++ b/.github/workflows/docker-crawlab.yml @@ -25,16 +25,25 @@ jobs: uses: tj-actions/changed-files@v18.7 - name: Check changed files run: | + is_matched=0 + for file in ${{ steps.changed-files.outputs.all_changed_files }}; do if [[ $file =~ ^${IMAGE_PATH_CRAWLAB_BACKEND}/.* ]]; then echo "is_matched_backend=1" >> $GITHUB_ENV - break - fi - if [[ $file =~ ^${IMAGE_PATH_CRAWLAB_FRONTEND}/.* ]]; then - echo "is_matched_frontend=1" >> $GITHUB_ENV + is_matched=1 break fi done + + for file in ${{ steps.changed-files.outputs.all_changed_files }}; do + if [[ $file =~ ^${IMAGE_PATH_CRAWLAB_FRONTEND}/.* ]]; then + echo "is_matched_frontend=1" >> $GITHUB_ENV + is_matched=1 + break + fi + done + + echo "is_matched=${is_matched}" >> $GITHUB_ENV - name: Get version run: | # Strip git ref prefix from version @@ -91,7 +100,7 @@ jobs: docker push $IMAGE_NAME:$IMAGE_VERSION build: - if: ${{ env.is_matched_backend == '1' || env.is_matched_frontend == '1' }} + if: ${{ env.is_matched == '1' }} needs: [ build-backend, build-frontend ] runs-on: ubuntu-latest steps: From 9983b52c3ea9a169ea5da04f7694c5de76cc9ff7 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 15:23:09 +0800 Subject: [PATCH 07/42] updated workflows --- .github/workflows/docker-crawlab.yml | 32 ++++++++++++++++------------ 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docker-crawlab.yml b/.github/workflows/docker-crawlab.yml index 8b7d89e7..c4d3f3cb 100644 --- a/.github/workflows/docker-crawlab.yml +++ b/.github/workflows/docker-crawlab.yml @@ -18,33 +18,37 @@ env: jobs: setup: runs-on: ubuntu-latest + outputs: + is_matched_backend: ${{ steps.changed_files_backend.outputs.matched }} + is_matched_frontend: ${{ steps.changed_files_frontend.outputs.matched }} + version: ${{ steps.version.outputs.version }} steps: - uses: actions/checkout@v2 - name: Get changed files id: changed-files uses: tj-actions/changed-files@v18.7 - - name: Check changed files + - id: changed_files_backend + name: Check changed files for backend run: | - is_matched=0 - for file in ${{ steps.changed-files.outputs.all_changed_files }}; do if [[ $file =~ ^${IMAGE_PATH_CRAWLAB_BACKEND}/.* ]]; then - echo "is_matched_backend=1" >> $GITHUB_ENV is_matched=1 break fi done - + echo "::set-output name=matched::$is_matched" + - id: changed_files_frontend + name: Check changed files for frontend + run: | for file in ${{ steps.changed-files.outputs.all_changed_files }}; do if [[ $file =~ ^${IMAGE_PATH_CRAWLAB_FRONTEND}/.* ]]; then - echo "is_matched_frontend=1" >> $GITHUB_ENV is_matched=1 break fi done - - echo "is_matched=${is_matched}" >> $GITHUB_ENV - - name: Get version + echo "::set-output name=matched::$is_matched" + - id: version + name: Get version run: | # Strip git ref prefix from version VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') @@ -55,11 +59,11 @@ jobs: # Use Docker `latest` tag convention [ "$VERSION" == "main" ] && VERSION=latest - echo "IMAGE_VERSION=$VERSION" >> $GITHUB_ENV + echo "::set-output name=version::$VERSION" build-backend: - if: ${{ env.is_matched_backend == '1' }} needs: [ setup ] + if: needs.setup.outputs.is_matched_backend == '1' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -79,8 +83,8 @@ jobs: docker push $IMAGE_NAME:$IMAGE_VERSION build-frontend: - if: ${{ env.is_matched_frontend == '1' }} needs: [ setup ] + if: needs.setup.outputs.is_matched_frontend == '1' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -100,8 +104,8 @@ jobs: docker push $IMAGE_NAME:$IMAGE_VERSION build: - if: ${{ env.is_matched == '1' }} - needs: [ build-backend, build-frontend ] + needs: [ setup, build-backend, build-frontend ] + if: needs.setup.outputs.is_matched_backend == '1' || needs.setup.outputs.is_matched_frontend == '1' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 From d9841a511d29a9a2b0352b0244d19d2457df53d3 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 15:24:04 +0800 Subject: [PATCH 08/42] updated workflows --- .github/workflows/docker-crawlab.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/docker-crawlab.yml b/.github/workflows/docker-crawlab.yml index c4d3f3cb..2f6cb67c 100644 --- a/.github/workflows/docker-crawlab.yml +++ b/.github/workflows/docker-crawlab.yml @@ -78,6 +78,7 @@ jobs: run: echo ${{ secrets.DOCKER_PASSWORD}} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin - name: Push image run: | + IMAGE_VERSION=${{needs.setup.outputs.version}} IMAGE_NAME=$IMAGE_NAME_CRAWLAB_BACKEND docker tag image $IMAGE_NAME:$IMAGE_VERSION docker push $IMAGE_NAME:$IMAGE_VERSION @@ -99,6 +100,7 @@ jobs: run: echo ${{ secrets.DOCKER_PASSWORD}} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin - name: Push image run: | + IMAGE_VERSION=${{needs.setup.outputs.version}} IMAGE_NAME=$IMAGE_NAME_CRAWLAB_FRONTEND docker tag image $IMAGE_NAME:$IMAGE_VERSION docker push $IMAGE_NAME:$IMAGE_VERSION @@ -115,6 +117,7 @@ jobs: run: echo ${{ secrets.DOCKER_PASSWORD}} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin - name: Push image run: | + IMAGE_VERSION=${{needs.setup.outputs.version}} IMAGE_ID=$IMAGE_NAME_CRAWLAB docker tag image $IMAGE_ID:$VERSION docker push $IMAGE_ID:$VERSION From d248622fb543d5202032188c5027c3041f89b7e6 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 15:26:30 +0800 Subject: [PATCH 09/42] updated workflows --- .github/workflows/docker-crawlab.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-crawlab.yml b/.github/workflows/docker-crawlab.yml index 2f6cb67c..8e367f3c 100644 --- a/.github/workflows/docker-crawlab.yml +++ b/.github/workflows/docker-crawlab.yml @@ -21,6 +21,7 @@ jobs: outputs: is_matched_backend: ${{ steps.changed_files_backend.outputs.matched }} is_matched_frontend: ${{ steps.changed_files_frontend.outputs.matched }} + is_matched_dockerfile: ${{ steps.changed_files_dockerfile.outputs.matched }} version: ${{ steps.version.outputs.version }} steps: - uses: actions/checkout@v2 @@ -47,6 +48,16 @@ jobs: fi done echo "::set-output name=matched::$is_matched" + - id: changed_files_dockerfile + name: Check changed files for Dockerfile + run: | + for file in ${{ steps.changed-files.outputs.all_changed_files }}; do + if [[ $file == Dockerfile ]]; then + is_matched=1 + break + fi + done + echo "::set-output name=matched::$is_matched" - id: version name: Get version run: | @@ -107,7 +118,7 @@ jobs: build: needs: [ setup, build-backend, build-frontend ] - if: needs.setup.outputs.is_matched_backend == '1' || needs.setup.outputs.is_matched_frontend == '1' + if: needs.setup.outputs.is_matched_backend == '1' || needs.setup.outputs.is_matched_frontend == '1' || needs.setup.outputs.is_matched_dockerfile == '1' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 From a80e4c9a579d87630cccaa9c246c41296a7a6999 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 15:26:55 +0800 Subject: [PATCH 10/42] updated Dockerfile --- frontend/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index b74e70f0..b8084769 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -6,3 +6,4 @@ RUN rm /app/.npmrc # install frontend RUN yarn install && yarn run build:docker + From c27f33660d50fe6ee6fb3e1743a4c23ebd49c850 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 15:27:09 +0800 Subject: [PATCH 11/42] updated Dockerfile --- backend/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/Dockerfile b/backend/Dockerfile index d13a85a6..fd80f52b 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -8,3 +8,4 @@ ENV GO111MODULE on RUN go mod tidy \ && go install -v ./... + From 7e7ed3f3a8d1fd742bfc7aff508b1a346c62869b Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 15:29:19 +0800 Subject: [PATCH 12/42] updated Dockerfile --- backend/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index fd80f52b..497cd804 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,7 +1,7 @@ FROM golang:1.16 WORKDIR /go/src/app -COPY ./backend . +COPY . . ENV GO111MODULE on #ENV GOPROXY https://goproxy.io From 5db0cfa15083b8d2e3fcf8f7f595abc0952b16e0 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 15:29:38 +0800 Subject: [PATCH 13/42] updated Dockerfile --- frontend/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index b8084769..21a6324a 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1,6 +1,6 @@ FROM node:12 -ADD ./frontend /app +ADD . /app WORKDIR /app RUN rm /app/.npmrc From 6d2b45b8469f6baf0d18e0b51658615fed554f38 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 15:31:53 +0800 Subject: [PATCH 14/42] updated workflows --- .github/workflows/docker-crawlab.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/docker-crawlab.yml b/.github/workflows/docker-crawlab.yml index 8e367f3c..52703302 100644 --- a/.github/workflows/docker-crawlab.yml +++ b/.github/workflows/docker-crawlab.yml @@ -43,21 +43,27 @@ jobs: run: | for file in ${{ steps.changed-files.outputs.all_changed_files }}; do if [[ $file =~ ^${IMAGE_PATH_CRAWLAB_FRONTEND}/.* ]]; then + file=$file is_matched=1 break fi done echo "::set-output name=matched::$is_matched" + echo "is_matched: $is_matched" + echo "file: $file" - id: changed_files_dockerfile name: Check changed files for Dockerfile run: | for file in ${{ steps.changed-files.outputs.all_changed_files }}; do if [[ $file == Dockerfile ]]; then + file=$file is_matched=1 break fi done echo "::set-output name=matched::$is_matched" + echo "is_matched: $is_matched" + echo "file: $file" - id: version name: Get version run: | From d6279f390ca27de7d095f430f1520ecd357d8ac7 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 15:32:47 +0800 Subject: [PATCH 15/42] updated Dockerfile --- frontend/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 21a6324a..97b83d37 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -6,4 +6,3 @@ RUN rm /app/.npmrc # install frontend RUN yarn install && yarn run build:docker - From 845b3ccb3f0691e13c2338db063c54c60aed37fe Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 15:32:55 +0800 Subject: [PATCH 16/42] updated Dockerfile --- backend/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 497cd804..40c0c152 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -8,4 +8,3 @@ ENV GO111MODULE on RUN go mod tidy \ && go install -v ./... - From 1b6e8ffec8beb97daf6fb0791806eeda1612dd16 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 15:33:48 +0800 Subject: [PATCH 17/42] updated workflows --- .github/workflows/docker-crawlab.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/docker-crawlab.yml b/.github/workflows/docker-crawlab.yml index 52703302..79f3ae81 100644 --- a/.github/workflows/docker-crawlab.yml +++ b/.github/workflows/docker-crawlab.yml @@ -33,11 +33,14 @@ jobs: run: | for file in ${{ steps.changed-files.outputs.all_changed_files }}; do if [[ $file =~ ^${IMAGE_PATH_CRAWLAB_BACKEND}/.* ]]; then + file=$file is_matched=1 break fi done echo "::set-output name=matched::$is_matched" + echo "is_matched: $is_matched" + echo "file: $file" - id: changed_files_frontend name: Check changed files for frontend run: | From e66c0e30de5f1a1ffc19f366c1564749cc7dcead Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 15:39:56 +0800 Subject: [PATCH 18/42] updated Dockerfile --- .github/workflows/docker-crawlab.yml | 64 ++++++++++++---------------- backend/Dockerfile | 1 + frontend/Dockerfile | 1 + 3 files changed, 30 insertions(+), 36 deletions(-) diff --git a/.github/workflows/docker-crawlab.yml b/.github/workflows/docker-crawlab.yml index 79f3ae81..f94de4d7 100644 --- a/.github/workflows/docker-crawlab.yml +++ b/.github/workflows/docker-crawlab.yml @@ -19,54 +19,46 @@ jobs: setup: runs-on: ubuntu-latest outputs: - is_matched_backend: ${{ steps.changed_files_backend.outputs.matched }} - is_matched_frontend: ${{ steps.changed_files_frontend.outputs.matched }} - is_matched_dockerfile: ${{ steps.changed_files_dockerfile.outputs.matched }} + is_matched_backend: ${{ steps.changed_files.outputs.is_matched_backend }} + is_matched_frontend: ${{ steps.changed_files.outputs.is_matched_frontend }} + is_matched_dockerfile: ${{ steps.changed_files.outputs.is_matched_dockerfile }} version: ${{ steps.version.outputs.version }} steps: - uses: actions/checkout@v2 - name: Get changed files - id: changed-files + id: changed_files uses: tj-actions/changed-files@v18.7 - - id: changed_files_backend + - id: changed_files name: Check changed files for backend run: | - for file in ${{ steps.changed-files.outputs.all_changed_files }}; do + # check changed files + is_matched_backend=0 + is_matched_frontend=0 + is_matched_dockerfile=0 + for file in ${{ steps.changed_files.outputs.all_changed_files }}; do if [[ $file =~ ^${IMAGE_PATH_CRAWLAB_BACKEND}/.* ]]; then - file=$file - is_matched=1 - break + file_backend=$file + is_matched_backend=1 fi - done - echo "::set-output name=matched::$is_matched" - echo "is_matched: $is_matched" - echo "file: $file" - - id: changed_files_frontend - name: Check changed files for frontend - run: | - for file in ${{ steps.changed-files.outputs.all_changed_files }}; do if [[ $file =~ ^${IMAGE_PATH_CRAWLAB_FRONTEND}/.* ]]; then - file=$file - is_matched=1 - break + file_frontend=$file + is_matched_frontend=1 + fi + if [[ $file =~ Dockerfile ]]; then + file_dockerfile=$file + is_matched_dockerfile=1 fi done - echo "::set-output name=matched::$is_matched" - echo "is_matched: $is_matched" - echo "file: $file" - - id: changed_files_dockerfile - name: Check changed files for Dockerfile - run: | - for file in ${{ steps.changed-files.outputs.all_changed_files }}; do - if [[ $file == Dockerfile ]]; then - file=$file - is_matched=1 - break - fi - done - echo "::set-output name=matched::$is_matched" - echo "is_matched: $is_matched" - echo "file: $file" + + # set outputs + echo "::set-output name=matched_backend::$is_matched_backend" + echo "::set-output name=matched_frontend::$is_matched_frontend" + echo "::set-output name=matched_dockerfile::$is_matched_dockerfile" + + # echo outputs + echo "is_matched_backend=$is_matched_backend, file_backend=$file_backend" + echo "is_matched_frontend=$is_matched_frontend, file_frontend=$file_frontend" + echo "is_matched_dockerfile=$is_matched_dockerfile, file_dockerfile=$file_dockerfile" - id: version name: Get version run: | diff --git a/backend/Dockerfile b/backend/Dockerfile index 40c0c152..497cd804 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -8,3 +8,4 @@ ENV GO111MODULE on RUN go mod tidy \ && go install -v ./... + diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 97b83d37..21a6324a 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -6,3 +6,4 @@ RUN rm /app/.npmrc # install frontend RUN yarn install && yarn run build:docker + From 6b6fa298e7642fea708c37f2854dc3a6117404e2 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 15:40:48 +0800 Subject: [PATCH 19/42] updated workflows --- .github/workflows/docker-crawlab.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-crawlab.yml b/.github/workflows/docker-crawlab.yml index f94de4d7..c064dc47 100644 --- a/.github/workflows/docker-crawlab.yml +++ b/.github/workflows/docker-crawlab.yml @@ -19,16 +19,16 @@ jobs: setup: runs-on: ubuntu-latest outputs: - is_matched_backend: ${{ steps.changed_files.outputs.is_matched_backend }} - is_matched_frontend: ${{ steps.changed_files.outputs.is_matched_frontend }} - is_matched_dockerfile: ${{ steps.changed_files.outputs.is_matched_dockerfile }} + is_matched_backend: ${{ steps.check_changed_files.outputs.is_matched_backend }} + is_matched_frontend: ${{ steps.check_changed_files.outputs.is_matched_frontend }} + is_matched_dockerfile: ${{ steps.check_changed_files.outputs.is_matched_dockerfile }} version: ${{ steps.version.outputs.version }} steps: - uses: actions/checkout@v2 - name: Get changed files id: changed_files uses: tj-actions/changed-files@v18.7 - - id: changed_files + - id: check_changed_files name: Check changed files for backend run: | # check changed files From dc0142ed474f08f49fcc096b2c90fe218c92ae03 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 15:41:07 +0800 Subject: [PATCH 20/42] updated Dockerfile --- backend/Dockerfile | 1 - frontend/Dockerfile | 1 - 2 files changed, 2 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 497cd804..40c0c152 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -8,4 +8,3 @@ ENV GO111MODULE on RUN go mod tidy \ && go install -v ./... - diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 21a6324a..97b83d37 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -6,4 +6,3 @@ RUN rm /app/.npmrc # install frontend RUN yarn install && yarn run build:docker - From a58af10ea9b1184691b1c5d1333dd66a3f5bdb94 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 15:45:06 +0800 Subject: [PATCH 21/42] updated Dockerfile --- .github/workflows/docker-crawlab.yml | 10 +++++----- backend/Dockerfile | 1 + frontend/Dockerfile | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-crawlab.yml b/.github/workflows/docker-crawlab.yml index c064dc47..d0a72221 100644 --- a/.github/workflows/docker-crawlab.yml +++ b/.github/workflows/docker-crawlab.yml @@ -29,7 +29,7 @@ jobs: id: changed_files uses: tj-actions/changed-files@v18.7 - id: check_changed_files - name: Check changed files for backend + name: Check changed files run: | # check changed files is_matched_backend=0 @@ -44,16 +44,16 @@ jobs: file_frontend=$file is_matched_frontend=1 fi - if [[ $file =~ Dockerfile ]]; then + if [[ $file == Dockerfile ]]; then file_dockerfile=$file is_matched_dockerfile=1 fi done # set outputs - echo "::set-output name=matched_backend::$is_matched_backend" - echo "::set-output name=matched_frontend::$is_matched_frontend" - echo "::set-output name=matched_dockerfile::$is_matched_dockerfile" + echo "::set-output name=is_matched_backend::$is_matched_backend" + echo "::set-output name=is_matched_frontend::$is_matched_frontend" + echo "::set-output name=is_matched_dockerfile::$is_matched_dockerfile" # echo outputs echo "is_matched_backend=$is_matched_backend, file_backend=$file_backend" diff --git a/backend/Dockerfile b/backend/Dockerfile index 40c0c152..497cd804 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -8,3 +8,4 @@ ENV GO111MODULE on RUN go mod tidy \ && go install -v ./... + diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 97b83d37..21a6324a 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -6,3 +6,4 @@ RUN rm /app/.npmrc # install frontend RUN yarn install && yarn run build:docker + From 3a1c8a9d1084c4c88715524cb0b1676cddcfc257 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 15:46:11 +0800 Subject: [PATCH 22/42] updated workflows --- .github/workflows/docker-crawlab.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-crawlab.yml b/.github/workflows/docker-crawlab.yml index d0a72221..48519294 100644 --- a/.github/workflows/docker-crawlab.yml +++ b/.github/workflows/docker-crawlab.yml @@ -117,7 +117,7 @@ jobs: docker tag image $IMAGE_NAME:$IMAGE_VERSION docker push $IMAGE_NAME:$IMAGE_VERSION - build: + build-crawlab: needs: [ setup, build-backend, build-frontend ] if: needs.setup.outputs.is_matched_backend == '1' || needs.setup.outputs.is_matched_frontend == '1' || needs.setup.outputs.is_matched_dockerfile == '1' runs-on: ubuntu-latest From 07cdd324b8b9f94b40e56ee221fd57489a849f4f Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 15:57:23 +0800 Subject: [PATCH 23/42] updated Dockerfile --- .github/workflows/docker-crawlab.yml | 10 ++++++++++ backend/Dockerfile | 1 - frontend/Dockerfile | 1 - 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-crawlab.yml b/.github/workflows/docker-crawlab.yml index 48519294..68bfe1cc 100644 --- a/.github/workflows/docker-crawlab.yml +++ b/.github/workflows/docker-crawlab.yml @@ -123,6 +123,16 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - name: Update Dockerfile + run: | + IMAGE_VERSION=${{needs.setup.outputs.version}} + if [[ $IMAGE_VERSION != "latest" ]]; then + for n in crawlab-backend crawlab-frontend; do + IMAGE_NAME=$n + sed "s/$IMAGE_NAME:latest/$IMAGE_NAME:$IMAGE_VERSION/g" Dockerfile > Dockerfile + done + fi + - name: Build image run: docker build . --file Dockerfile --tag image - name: Log into registry diff --git a/backend/Dockerfile b/backend/Dockerfile index 497cd804..40c0c152 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -8,4 +8,3 @@ ENV GO111MODULE on RUN go mod tidy \ && go install -v ./... - diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 21a6324a..97b83d37 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -6,4 +6,3 @@ RUN rm /app/.npmrc # install frontend RUN yarn install && yarn run build:docker - From e0512bf0fc8e8f0ef5aacdcccf531387353a2ac7 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 16:08:22 +0800 Subject: [PATCH 24/42] updated workflows --- .github/workflows/docker-crawlab.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-crawlab.yml b/.github/workflows/docker-crawlab.yml index 68bfe1cc..68539fef 100644 --- a/.github/workflows/docker-crawlab.yml +++ b/.github/workflows/docker-crawlab.yml @@ -129,7 +129,7 @@ jobs: if [[ $IMAGE_VERSION != "latest" ]]; then for n in crawlab-backend crawlab-frontend; do IMAGE_NAME=$n - sed "s/$IMAGE_NAME:latest/$IMAGE_NAME:$IMAGE_VERSION/g" Dockerfile > Dockerfile + sed -i -e "s/$IMAGE_NAME:latest/$IMAGE_NAME:$IMAGE_VERSION/g" Dockerfile > Dockerfile done fi From da16e2087cbf33642173c77fdb8dff8e3bea9509 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 16:19:38 +0800 Subject: [PATCH 25/42] updated workflows --- .github/workflows/docker-crawlab.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-crawlab.yml b/.github/workflows/docker-crawlab.yml index 68539fef..1c3dad0b 100644 --- a/.github/workflows/docker-crawlab.yml +++ b/.github/workflows/docker-crawlab.yml @@ -129,7 +129,7 @@ jobs: if [[ $IMAGE_VERSION != "latest" ]]; then for n in crawlab-backend crawlab-frontend; do IMAGE_NAME=$n - sed -i -e "s/$IMAGE_NAME:latest/$IMAGE_NAME:$IMAGE_VERSION/g" Dockerfile > Dockerfile + sed -i '' "s/$IMAGE_NAME:latest/$IMAGE_NAME:$IMAGE_VERSION/g" Dockerfile done fi From fec14edfaae6cb52624a620ae35c3697217c8d49 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 16:20:32 +0800 Subject: [PATCH 26/42] updated workflows --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 18053697..27654dea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,3 +26,4 @@ RUN /bin/bash /app/bin/docker-install-plugins.sh # start backend CMD ["/bin/bash", "/app/bin/docker-init.sh"] + From ea147945230f1a353563ca1d16cbb73c0a9539f3 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 16:22:06 +0800 Subject: [PATCH 27/42] updated Dockerfile --- backend/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/Dockerfile b/backend/Dockerfile index 40c0c152..497cd804 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -8,3 +8,4 @@ ENV GO111MODULE on RUN go mod tidy \ && go install -v ./... + From e88e922d86168d5ab9fd2abcdebc97ee43852a38 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 16:38:00 +0800 Subject: [PATCH 28/42] updated workflows --- .github/workflows/docker-crawlab.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-crawlab.yml b/.github/workflows/docker-crawlab.yml index 1c3dad0b..07f897de 100644 --- a/.github/workflows/docker-crawlab.yml +++ b/.github/workflows/docker-crawlab.yml @@ -118,8 +118,8 @@ jobs: docker push $IMAGE_NAME:$IMAGE_VERSION build-crawlab: + if: ${{ always() }} needs: [ setup, build-backend, build-frontend ] - if: needs.setup.outputs.is_matched_backend == '1' || needs.setup.outputs.is_matched_frontend == '1' || needs.setup.outputs.is_matched_dockerfile == '1' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 From ba7596bc86bc57b37bae45befa6d96ea17b017f7 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 16:42:37 +0800 Subject: [PATCH 29/42] updated workflows --- .github/workflows/docker-crawlab.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-crawlab.yml b/.github/workflows/docker-crawlab.yml index 07f897de..c6b968bb 100644 --- a/.github/workflows/docker-crawlab.yml +++ b/.github/workflows/docker-crawlab.yml @@ -129,7 +129,7 @@ jobs: if [[ $IMAGE_VERSION != "latest" ]]; then for n in crawlab-backend crawlab-frontend; do IMAGE_NAME=$n - sed -i '' "s/$IMAGE_NAME:latest/$IMAGE_NAME:$IMAGE_VERSION/g" Dockerfile + sed -i '' "s/${IMAGE_NAME}:latest/${IMAGE_NAME}:${IMAGE_VERSION}/" Dockerfile done fi From 6964b45b45d92e25c3b89d8a292665493c626296 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 16:45:24 +0800 Subject: [PATCH 30/42] updated workflows --- .github/workflows/docker-crawlab.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-crawlab.yml b/.github/workflows/docker-crawlab.yml index c6b968bb..1c737651 100644 --- a/.github/workflows/docker-crawlab.yml +++ b/.github/workflows/docker-crawlab.yml @@ -129,7 +129,7 @@ jobs: if [[ $IMAGE_VERSION != "latest" ]]; then for n in crawlab-backend crawlab-frontend; do IMAGE_NAME=$n - sed -i '' "s/${IMAGE_NAME}:latest/${IMAGE_NAME}:${IMAGE_VERSION}/" Dockerfile + sed -i "s/${IMAGE_NAME}:latest/${IMAGE_NAME}:${IMAGE_VERSION}/" Dockerfile done fi From ae93f64b38bb3b06bb46a3b8b21cd9a8c8b746e3 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 17:15:59 +0800 Subject: [PATCH 31/42] updated workflows --- .github/workflows/docker-crawlab.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-crawlab.yml b/.github/workflows/docker-crawlab.yml index 1c737651..8dfca8d2 100644 --- a/.github/workflows/docker-crawlab.yml +++ b/.github/workflows/docker-crawlab.yml @@ -141,5 +141,5 @@ jobs: run: | IMAGE_VERSION=${{needs.setup.outputs.version}} IMAGE_ID=$IMAGE_NAME_CRAWLAB - docker tag image $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION + docker tag image $IMAGE_ID:$IMAGE_VERSION + docker push $IMAGE_ID:$IMAGE_VERSION From e971697c25228b3ae3ef836c9400279b71e26e64 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 17:19:24 +0800 Subject: [PATCH 32/42] updated workflows --- Dockerfile | 1 - bin/docker-install-plugins.sh | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 27654dea..18053697 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,4 +26,3 @@ RUN /bin/bash /app/bin/docker-install-plugins.sh # start backend CMD ["/bin/bash", "/app/bin/docker-init.sh"] - diff --git a/bin/docker-install-plugins.sh b/bin/docker-install-plugins.sh index cad09643..9135fc74 100644 --- a/bin/docker-install-plugins.sh +++ b/bin/docker-install-plugins.sh @@ -6,7 +6,7 @@ function install_plugin() { if [ -d $bin_path ]; then : else - mkdir "$bin_path" + mkdir -p "$bin_path" fi # plugin name From da44b52b7662dc8c89f17cf81d0309aa690c96de Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 18:41:53 +0800 Subject: [PATCH 33/42] fixed plugin info missing issue --- backend/go.mod | 2 +- backend/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/go.mod b/backend/go.mod index cb1a57bf..07d5e177 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -2,4 +2,4 @@ module crawlab go 1.16 -require github.com/crawlab-team/crawlab-core v0.6.0-4 +require github.com/crawlab-team/crawlab-core v0.6.0-5 diff --git a/backend/go.sum b/backend/go.sum index 3f8f5caa..413326ec 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -122,8 +122,8 @@ github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfc github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/crawlab-team/crawlab-core v0.0.1/go.mod h1:6dJHMvrmIJbfYHhYNeGZkGOLEBvur+yGiFzLCRXx92k= -github.com/crawlab-team/crawlab-core v0.6.0-4 h1:91Wsu+AS+0SEGgYlzhIjsRVrIFE5E0nU2kP0BJdBaRc= -github.com/crawlab-team/crawlab-core v0.6.0-4/go.mod h1:KqfjSkEclVY39nC58bsq3MLcuXbDnsPp/ClcBDkqOF0= +github.com/crawlab-team/crawlab-core v0.6.0-5 h1:GKTGKkE6+msN+ER2qIX7KJqJUb+B+sUmvbPgVxF1EYo= +github.com/crawlab-team/crawlab-core v0.6.0-5/go.mod h1:KqfjSkEclVY39nC58bsq3MLcuXbDnsPp/ClcBDkqOF0= github.com/crawlab-team/crawlab-db v0.0.2/go.mod h1:o7o4rbcyAWlFGHg9VS7V7tM/GqRq+N2mnAXO71cZA78= github.com/crawlab-team/crawlab-db v0.6.0-beta.20220417.1300 h1:2EymVIiOspX28qNC1Qon3W1fzXKQ8hi6ho3QtXB4w6k= github.com/crawlab-team/crawlab-db v0.6.0-beta.20220417.1300/go.mod h1:gfeF0nAnFuup6iYvgHkY0in/HpO/+JktXqVNMdhoxhU= From a98e2a70854bdda3ccd633d864d04b0aa51ba36b Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 18:45:07 +0800 Subject: [PATCH 34/42] updated workflows --- .github/workflows/docker-crawlab.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-crawlab.yml b/.github/workflows/docker-crawlab.yml index 8dfca8d2..10f644dc 100644 --- a/.github/workflows/docker-crawlab.yml +++ b/.github/workflows/docker-crawlab.yml @@ -118,7 +118,7 @@ jobs: docker push $IMAGE_NAME:$IMAGE_VERSION build-crawlab: - if: ${{ always() }} + if: ${{ success() }} needs: [ setup, build-backend, build-frontend ] runs-on: ubuntu-latest steps: From ad031e0347d6687fd70351e3ca00212a613532cf Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 19:26:28 +0800 Subject: [PATCH 35/42] updated Dockerfile --- .github/workflows/docker-crawlab.yml | 4 ++-- Dockerfile | 8 +++++--- backend/Dockerfile | 6 +++++- bin/docker-install-plugins.sh | 25 ------------------------- frontend/Dockerfile | 7 ++++++- 5 files changed, 18 insertions(+), 32 deletions(-) delete mode 100644 bin/docker-install-plugins.sh diff --git a/.github/workflows/docker-crawlab.yml b/.github/workflows/docker-crawlab.yml index 10f644dc..3bd66861 100644 --- a/.github/workflows/docker-crawlab.yml +++ b/.github/workflows/docker-crawlab.yml @@ -87,7 +87,7 @@ jobs: cd $IMAGE_PATH_CRAWLAB_BACKEND docker build . --file Dockerfile --tag image - name: Log into registry - run: echo ${{ secrets.DOCKER_PASSWORD}} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin + run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin - name: Push image run: | IMAGE_VERSION=${{needs.setup.outputs.version}} @@ -109,7 +109,7 @@ jobs: cd $IMAGE_PATH_CRAWLAB_FRONTEND docker build . --file Dockerfile --tag image - name: Log into registry - run: echo ${{ secrets.DOCKER_PASSWORD}} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin + run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin - name: Push image run: | IMAGE_VERSION=${{needs.setup.outputs.version}} diff --git a/Dockerfile b/Dockerfile index 18053697..d05fbee4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,8 @@ FROM crawlabteam/crawlab-backend:latest AS backend-build FROM crawlabteam/crawlab-frontend:latest AS frontend-build +FROM crawlabteam/crawlab-public-plugins:latest AS public-plugins-build + # images FROM crawlabteam/crawlab-base:latest @@ -18,11 +20,11 @@ RUN cp /opt/bin/crawlab /usr/local/bin/crawlab-server # copy frontend files COPY --from=frontend-build /app/dist /app/dist +# copy public-plugins files +COPY --from=public-plugins-build /app/plugins /app/plugins + # copy nginx config files COPY ./nginx/crawlab.conf /etc/nginx/conf.d -# install plugins -RUN /bin/bash /app/bin/docker-install-plugins.sh - # start backend CMD ["/bin/bash", "/app/bin/docker-init.sh"] diff --git a/backend/Dockerfile b/backend/Dockerfile index 497cd804..65c0894a 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.16 +FROM golang:1.16 AS build WORKDIR /go/src/app COPY . . @@ -9,3 +9,7 @@ ENV GO111MODULE on RUN go mod tidy \ && go install -v ./... +FROM alpine:3.14 + +# copy files +COPY --from=backend-build /go/bin/crawlab /go/bin/crawlab diff --git a/bin/docker-install-plugins.sh b/bin/docker-install-plugins.sh deleted file mode 100644 index 9135fc74..00000000 --- a/bin/docker-install-plugins.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -function install_plugin() { - # plugins executables directory - local bin_path="/app/plugins/bin" - if [ -d $bin_path ]; then - : - else - mkdir -p "$bin_path" - fi - - # plugin name - local name=$1 - local url="https://github.com/crawlab-team/${name}" - local repo_path=""/app/plugins/${name} - git clone "$url" "$repo_path" - cd "$repo_path" && go build -o "${bin_path}/${name}" - chmod +x "${bin_path}/${name}" -} - -plugin_names="plugin-dependency plugin-notification plugin-spider-assistant" - -for name in $plugin_names; do - install_plugin "$name" -done diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 97b83d37..6e9e1fae 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1,4 +1,4 @@ -FROM node:12 +FROM node:12 AS build ADD . /app WORKDIR /app @@ -6,3 +6,8 @@ RUN rm /app/.npmrc # install frontend RUN yarn install && yarn run build:docker + +FROM alpine:3.14 + +# copy files +COPY --from=build /app/dist /app/dist From 249aa719212875c0e6fd66b7ddd5863b5ea41e95 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 19:28:48 +0800 Subject: [PATCH 36/42] updated package.json --- frontend/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/package.json b/frontend/package.json index ed46a80f..2d5ac7be 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -23,7 +23,7 @@ "@fortawesome/vue-fontawesome": "^3.0.0-5", "atom-material-icons": "^3.0.0", "codemirror": "^5.59.1", - "crawlab-ui": "0.6.0", + "crawlab-ui": "0.6.0-1", "echarts": "^5.1.2", "element-plus": "^1.3.0-beta.10", "vue": "^3.2", From 39b266d21e1107058660188058f5a906580de5a7 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 19:30:00 +0800 Subject: [PATCH 37/42] fixed plugin info missing issue --- backend/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 65c0894a..6cddfb80 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -12,4 +12,4 @@ RUN go mod tidy \ FROM alpine:3.14 # copy files -COPY --from=backend-build /go/bin/crawlab /go/bin/crawlab +COPY --from=build /go/bin/crawlab /go/bin/crawlab From 695f5a8b39918515c05b67e497a3a2e8b2aa86de Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 19:34:31 +0800 Subject: [PATCH 38/42] updated workflows --- .github/workflows/docker-crawlab.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-crawlab.yml b/.github/workflows/docker-crawlab.yml index 3bd66861..f8c01315 100644 --- a/.github/workflows/docker-crawlab.yml +++ b/.github/workflows/docker-crawlab.yml @@ -118,7 +118,7 @@ jobs: docker push $IMAGE_NAME:$IMAGE_VERSION build-crawlab: - if: ${{ success() }} + if: ${{ always() }} needs: [ setup, build-backend, build-frontend ] runs-on: ubuntu-latest steps: From 67ee2e2b1b26da6b0956440e9ae651cd7ec3ef87 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 19:50:13 +0800 Subject: [PATCH 39/42] fixed plugin info missing issue --- backend/go.mod | 2 +- backend/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/go.mod b/backend/go.mod index 07d5e177..1938f30f 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -2,4 +2,4 @@ module crawlab go 1.16 -require github.com/crawlab-team/crawlab-core v0.6.0-5 +require github.com/crawlab-team/crawlab-core v0.6.0-6 diff --git a/backend/go.sum b/backend/go.sum index 413326ec..83da9e8f 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -122,8 +122,8 @@ github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfc github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/crawlab-team/crawlab-core v0.0.1/go.mod h1:6dJHMvrmIJbfYHhYNeGZkGOLEBvur+yGiFzLCRXx92k= -github.com/crawlab-team/crawlab-core v0.6.0-5 h1:GKTGKkE6+msN+ER2qIX7KJqJUb+B+sUmvbPgVxF1EYo= -github.com/crawlab-team/crawlab-core v0.6.0-5/go.mod h1:KqfjSkEclVY39nC58bsq3MLcuXbDnsPp/ClcBDkqOF0= +github.com/crawlab-team/crawlab-core v0.6.0-6 h1:qCRnbjH7M+4Kn/EOamJQa5UensRf3xvcLnSk0hyzxVs= +github.com/crawlab-team/crawlab-core v0.6.0-6/go.mod h1:KqfjSkEclVY39nC58bsq3MLcuXbDnsPp/ClcBDkqOF0= github.com/crawlab-team/crawlab-db v0.0.2/go.mod h1:o7o4rbcyAWlFGHg9VS7V7tM/GqRq+N2mnAXO71cZA78= github.com/crawlab-team/crawlab-db v0.6.0-beta.20220417.1300 h1:2EymVIiOspX28qNC1Qon3W1fzXKQ8hi6ho3QtXB4w6k= github.com/crawlab-team/crawlab-db v0.6.0-beta.20220417.1300/go.mod h1:gfeF0nAnFuup6iYvgHkY0in/HpO/+JktXqVNMdhoxhU= From 1de2e5b67c031b000ca60181b2a1ef157fc0146c Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 20:37:13 +0800 Subject: [PATCH 40/42] fixed plugin info missing issue --- backend/go.mod | 2 +- backend/go.sum | 4 ++-- frontend/yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/backend/go.mod b/backend/go.mod index 1938f30f..48f0d69e 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -2,4 +2,4 @@ module crawlab go 1.16 -require github.com/crawlab-team/crawlab-core v0.6.0-6 +require github.com/crawlab-team/crawlab-core v0.6.0-7 diff --git a/backend/go.sum b/backend/go.sum index 83da9e8f..57afa5db 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -122,8 +122,8 @@ github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfc github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/crawlab-team/crawlab-core v0.0.1/go.mod h1:6dJHMvrmIJbfYHhYNeGZkGOLEBvur+yGiFzLCRXx92k= -github.com/crawlab-team/crawlab-core v0.6.0-6 h1:qCRnbjH7M+4Kn/EOamJQa5UensRf3xvcLnSk0hyzxVs= -github.com/crawlab-team/crawlab-core v0.6.0-6/go.mod h1:KqfjSkEclVY39nC58bsq3MLcuXbDnsPp/ClcBDkqOF0= +github.com/crawlab-team/crawlab-core v0.6.0-7 h1:23kTlKOZ3OqfSmD+SYJiwlqP1Cu1NJtPmbR8KeIGvgw= +github.com/crawlab-team/crawlab-core v0.6.0-7/go.mod h1:KqfjSkEclVY39nC58bsq3MLcuXbDnsPp/ClcBDkqOF0= github.com/crawlab-team/crawlab-db v0.0.2/go.mod h1:o7o4rbcyAWlFGHg9VS7V7tM/GqRq+N2mnAXO71cZA78= github.com/crawlab-team/crawlab-db v0.6.0-beta.20220417.1300 h1:2EymVIiOspX28qNC1Qon3W1fzXKQ8hi6ho3QtXB4w6k= github.com/crawlab-team/crawlab-db v0.6.0-beta.20220417.1300/go.mod h1:gfeF0nAnFuup6iYvgHkY0in/HpO/+JktXqVNMdhoxhU= diff --git a/frontend/yarn.lock b/frontend/yarn.lock index 991dbb33..be27574b 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -3472,10 +3472,10 @@ cosmiconfig@^5.0.0: js-yaml "^3.13.1" parse-json "^4.0.0" -crawlab-ui@0.6.0: - version "0.6.0" - resolved "https://registry.npmmirror.com/crawlab-ui/-/crawlab-ui-0.6.0.tgz#b0d67f33a8a3deef640707742a9a03588c9c1e76" - integrity sha512-ORMgyA++RLlKs/7qiQN9cvBQ839m9K0TLkLmdAo+BvUxvPTAPhyVeoBV0BOrqiiehRVj3xrO4DH7Cl+I3YrIig== +crawlab-ui@0.6.0-1: + version "0.6.0-1" + resolved "https://registry.npmjs.org/crawlab-ui/-/crawlab-ui-0.6.0-1.tgz#df6dc5473e7cee89738d8d459e5352dd7252671a" + integrity sha512-vDw9nvvq0+kFBLJVzaraawJg2s+mSjk6OmhQc/ocdr8UESCWHhKZf0i4pw28gzPY627pxmDhXuTfmNZ13iEtXg== dependencies: "@element-plus/icons" "^0.0.11" "@fortawesome/fontawesome-common-types" "^6.1.0" From 4ff40d4d6ae542b3da5121e1252fbe2e64683cb3 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 20:51:28 +0800 Subject: [PATCH 41/42] attempt to fix plugin unable to start issue --- backend/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/Dockerfile b/backend/Dockerfile index 6cddfb80..d273c609 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -13,3 +13,4 @@ FROM alpine:3.14 # copy files COPY --from=build /go/bin/crawlab /go/bin/crawlab + From 854c92a9863a2c7c33aefbbe1c3941ffab40278a Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 3 Jun 2022 21:43:05 +0800 Subject: [PATCH 42/42] attempt to fix plugin unable to start issue --- backend/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index d273c609..6cddfb80 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -13,4 +13,3 @@ FROM alpine:3.14 # copy files COPY --from=build /go/bin/crawlab /go/bin/crawlab -