diff --git a/.github/workflows/test-build-deploy.yml b/.github/workflows/test-build-deploy.yml index e031daabbc..05f708b350 100644 --- a/.github/workflows/test-build-deploy.yml +++ b/.github/workflows/test-build-deploy.yml @@ -143,15 +143,6 @@ jobs: run: | touch build-image/.uptodate make BUILD_IN_CONTAINER=false - - name: Build Website - run: | - touch build-image/.uptodate - make BUILD_IN_CONTAINER=false web-build - - name: Upload Website Artifact - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 - with: - name: website public - path: website/public/ - name: Save Images run: | mkdir /tmp/images @@ -322,48 +313,6 @@ jobs: echo "Running configs integration tests on ${{ matrix.arch }}" make BUILD_IMAGE=quay.io/cortexproject/build-image:master-fe84258322 TTY='' configs-integration-test - deploy_website: - needs: [build, test, lint] - if: false && github.ref == 'refs/heads/master' && github.repository == 'cortexproject/cortex' - runs-on: ubuntu-24.04 - container: - image: quay.io/cortexproject/build-image:master-fe84258322 - steps: - - name: Checkout Repo - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - with: - # web-deploy script expects repo to be cloned with ssh for some commands to work - ssh-key: ${{ secrets.WEBSITE_DEPLOY_SSH_PRIVATE_KEY }} - - name: Setup Git safe.directory - run: | - echo "this step is needed because when running in container, actions/checkout does not set safe.directory effectively." - echo "See https://github.com/actions/runner/issues/2033. We should use --system instead of --global" - git config --system --add safe.directory $GITHUB_WORKSPACE - - name: Sym Link Expected Path to Workspace - run: | - mkdir -p /go/src/github.com/cortexproject/cortex - ln -s $GITHUB_WORKSPACE/* /go/src/github.com/cortexproject/cortex - - name: Download Website Artifact - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 - with: - name: website public - path: website/public - - name: Setup SSH Keys and known_hosts for Github Authentication to Deploy Website - run: | - mkdir -p ~/.ssh - ssh-keyscan github.com >> ~/.ssh/known_hosts - ssh-agent -a $SSH_AUTH_SOCK > /dev/null - ssh-add - <<< "${{ secrets.WEBSITE_DEPLOY_SSH_PRIVATE_KEY }}" - env: - SSH_AUTH_SOCK: /tmp/ssh_agent.sock - shell: bash - - name: Deploy Website - # SSH is used to authentricate with Github because web-deploy script uses git to checkout and push to gh-pages - run: make BUILD_IN_CONTAINER=false web-deploy - env: - SSH_AUTH_SOCK: /tmp/ssh_agent.sock - GIT_SSH_COMMAND: "ssh -o StrictHostKeyChecking=no" - deploy: needs: [build, test, lint, integration, integration-configs-db] if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.repository == 'cortexproject/cortex' diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 4fa5bddda5..0000000000 --- a/.gitmodules +++ /dev/null @@ -1,4 +0,0 @@ - -[submodule "themes/docsy"] - path = website/themes/docsy - url = https://github.com/google/docsy diff --git a/Makefile b/Makefile index ca8a83c632..b686e1bc01 100644 --- a/Makefile +++ b/Makefile @@ -126,7 +126,7 @@ GOVOLUMES= -v $(shell pwd)/.cache:/go/cache:delegated,z \ -v $(shell pwd)/.pkg:/go/pkg:delegated,z \ -v $(shell pwd):/go/src/github.com/cortexproject/cortex:delegated,z -exes $(EXES) protos $(PROTO_GOS) lint test cover shell mod-check check-protos web-build web-pre web-deploy doc modernize: build-image/$(UPTODATE) +exes $(EXES) protos $(PROTO_GOS) lint test cover shell mod-check check-protos doc modernize: build-image/$(UPTODATE) @mkdir -p $(shell pwd)/.pkg @mkdir -p $(shell pwd)/.cache @echo @@ -241,16 +241,6 @@ mod-check: check-protos: clean-protos protos @git diff --exit-code -- $(PROTO_GOS) -web-pre: - cd website && git submodule update --init --recursive - ./tools/website/web-pre.sh - -web-build: web-pre - cd website && HUGO_ENV=production hugo --config config.toml --minify -v - -web-deploy: - ./tools/website/web-deploy.sh - modernize: GOTOOLCHAIN=auto go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@v0.21.0 -fix ./... diff --git a/build-image/Dockerfile b/build-image/Dockerfile index 036f85fe63..4d455535ee 100644 --- a/build-image/Dockerfile +++ b/build-image/Dockerfile @@ -3,12 +3,6 @@ ARG goproxyValue ENV GOPROXY=${goproxyValue} RUN apt-get update && apt-get install -y curl file gettext jq unzip protobuf-compiler libprotobuf-dev && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -RUN curl -sL https://deb.nodesource.com/setup_18.x | bash - -RUN apt-get install -y nodejs && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - -# Install website builder dependencies. Whenever you change these version, please also change website/package.json -# and vice versa. -RUN npm install -g postcss-cli@7.1.2 autoprefixer@9.8.5 ENV SHFMT_VERSION=3.2.4 RUN GOARCH=$(go env GOARCH) && \ @@ -25,17 +19,14 @@ RUN GOARCH=$(go env GOARCH) && \ RUN curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b /usr/bin v2.10.1 -ENV HUGO_VERSION=v0.101.0 RUN go install github.com/client9/misspell/cmd/misspell@v0.3.4 &&\ go install github.com/golang/protobuf/protoc-gen-go@v1.3.1 &&\ go install github.com/gogo/protobuf/protoc-gen-gogoslick@v1.3.0 &&\ go install github.com/weaveworks/tools/cover@bdd647e92546027e12cdde3ae0714bb495e43013 &&\ go install github.com/fatih/faillint@v1.15.0 &&\ go install github.com/campoy/embedmd@v1.0.0 &&\ - go install --tags extended github.com/gohugoio/hugo@${HUGO_VERSION} &&\ rm -rf /go/pkg /go/src /root/.cache -ENV NODE_PATH=/usr/lib/node_modules COPY build.sh / ENV GOCACHE=/go/cache ENTRYPOINT ["/build.sh"]