From 13448e9ccb18dd6ec4a56d6c3d07d84d7617437d Mon Sep 17 00:00:00 2001 From: John Kellerman Date: Thu, 26 Sep 2024 14:44:50 -0400 Subject: [PATCH 1/7] Update README.md Adding a pointer to instructions for publishers. --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 419a6d0f..969bf36d 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,11 @@ This repository contains the source of [open-vsx.org](https://open-vsx.org), the The main artifact is the Docker image available at [ghcr.io/eclipsefdn/openvsx-website](https://github.com/orgs/EclipseFdn/packages/container/package/openvsx-website). It contains the server application with customized frontend and base configuration. +## Publishing and Managing Extensions + +For information on publishing and managing extensions at [open-vsx.org](https://open-vsx.org), please see +the [open-vsx.org wiki](https://github.com/EclipseFdn/open-vsx.org/wiki). + ## Claiming Namespace Ownership [Open VSX namespaces](https://github.com/eclipse/openvsx/wiki/Namespace-Access) are public by default. [Create an issue here](https://github.com/EclipseFdn/open-vsx.org/issues/new/choose) to claim ownership of a namespace. From 2da08ff82776b5f38627a002f1548c492ed46977 Mon Sep 17 00:00:00 2001 From: amvanbaren Date: Fri, 27 Sep 2024 10:25:46 +0300 Subject: [PATCH 2/7] test 3c1f6326 --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3a5e9907..3f49ecb9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG SERVER_VERSION=v0.17.0 +ARG SERVER_VERSION=3c1f6326 # Builder image to compile the website FROM ubuntu as builder @@ -29,7 +29,8 @@ RUN /usr/bin/yarn --cwd website \ && /usr/bin/yarn --cwd website build # Main image derived from openvsx-server -FROM ghcr.io/eclipse/openvsx-server:${SERVER_VERSION} +#FROM ghcr.io/eclipse/openvsx-server:${SERVER_VERSION} +FROM docker.io/amvanbaren/openvsx-server:${SERVER_VERSION} ARG SERVER_VERSION COPY --from=builder --chown=openvsx:openvsx /workdir/website/static/ BOOT-INF/classes/static/ From 24573a2f1c50373e67cf6091b0925dd8ec77e999 Mon Sep 17 00:00:00 2001 From: amvanbaren Date: Fri, 27 Sep 2024 11:22:31 +0300 Subject: [PATCH 3/7] test 195ff526 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3f49ecb9..97aaadf0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG SERVER_VERSION=3c1f6326 +ARG SERVER_VERSION=195ff526 # Builder image to compile the website FROM ubuntu as builder @@ -29,7 +29,7 @@ RUN /usr/bin/yarn --cwd website \ && /usr/bin/yarn --cwd website build # Main image derived from openvsx-server -#FROM ghcr.io/eclipse/openvsx-server:${SERVER_VERSION} +# FROM ghcr.io/eclipse/openvsx-server:${SERVER_VERSION} FROM docker.io/amvanbaren/openvsx-server:${SERVER_VERSION} ARG SERVER_VERSION From 8e570d027f0b699dee392939c8c88fffd0173a66 Mon Sep 17 00:00:00 2001 From: amvanbaren Date: Mon, 30 Sep 2024 15:09:01 +0300 Subject: [PATCH 4/7] disable prometheus and tracing --- Dockerfile | 7 +++---- configuration/application.yml | 5 ++++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 97aaadf0..f5fe8f94 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG SERVER_VERSION=195ff526 +ARG SERVER_VERSION=v0.17.0 # Builder image to compile the website FROM ubuntu as builder @@ -29,8 +29,7 @@ RUN /usr/bin/yarn --cwd website \ && /usr/bin/yarn --cwd website build # Main image derived from openvsx-server -# FROM ghcr.io/eclipse/openvsx-server:${SERVER_VERSION} -FROM docker.io/amvanbaren/openvsx-server:${SERVER_VERSION} +FROM ghcr.io/eclipse/openvsx-server:${SERVER_VERSION} ARG SERVER_VERSION COPY --from=builder --chown=openvsx:openvsx /workdir/website/static/ BOOT-INF/classes/static/ @@ -39,4 +38,4 @@ COPY --from=builder --chown=openvsx:openvsx /workdir/configuration/logback-sprin COPY --from=builder --chown=openvsx:openvsx /workdir/configuration/ehcache.xml BOOT-INF/classes/ # Replace version placeholder with arg value -RUN sed -i "s//$SERVER_VERSION/g" config/application.yml +RUN sed -i "s//$SERVER_VERSION/g" config/application.yml \ No newline at end of file diff --git a/configuration/application.yml b/configuration/application.yml index a79629ee..6b6419f4 100644 --- a/configuration/application.yml +++ b/configuration/application.yml @@ -21,6 +21,9 @@ server: spring: application: name: openvsx-server + autoconfigure: + # don't send traces to Zipkin + exclude: org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinAutoConfiguration config: import: file:${DEPLOYMENT_CONFIG} cache: @@ -77,7 +80,7 @@ management: exposure: include: - health - - prometheus + # - prometheus tracing: sampling: probability: 0.1 From 17e959247401c1d80e54d6f3ea6851e05584b2c2 Mon Sep 17 00:00:00 2001 From: amvanbaren Date: Mon, 30 Sep 2024 17:38:18 +0300 Subject: [PATCH 5/7] Replace deprecated elasticsearch props --- configuration/application.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/configuration/application.yml b/configuration/application.yml index 6b6419f4..53026bbe 100644 --- a/configuration/application.yml +++ b/configuration/application.yml @@ -165,6 +165,7 @@ ovsx: elasticsearch: enabled: true ssl: true + search: relevance: rating: 0.2 downloads: 1.0 From 4907a73878c7c16f9b5389fd2d791f6ecc619739 Mon Sep 17 00:00:00 2001 From: amvanbaren Date: Wed, 2 Oct 2024 22:03:57 +0300 Subject: [PATCH 6/7] Production deploy smoketest --- .github/workflows/smoketest.yml | 60 +++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/smoketest.yml diff --git a/.github/workflows/smoketest.yml b/.github/workflows/smoketest.yml new file mode 100644 index 00000000..fad0efb2 --- /dev/null +++ b/.github/workflows/smoketest.yml @@ -0,0 +1,60 @@ +name: Playwright Tests against open-vsx.org +on: + push: + branches: + - production +jobs: + test: + timeout-minutes: 60 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + path: open-vsx.org + - uses: actions/checkout@v4 + with: + repository: eclipse/openvsx + path: openvsx + - uses: actions/setup-node@v4 + with: + node-version: 18.x + - name: Install dependencies + working-directory: ./openvsx/webui + run: yarn + - name: Install Playwright Browsers + working-directory: ./openvsx/webui + run: yarn playwright install --with-deps + - name: Get server version + id: read_version + run: | + read -r line < ./open-vsx.org/Dockerfile + version="${line:19}" + echo "version=${line:19}" >> "$GITHUB_OUTPUT" + - name: Wait 10 minutes for deployment + run: sleep 10m + - name: Get running server version + id: running_version + uses: fjogeleit/http-request-action@v1 + with: + url: "https://open-vsx.org/api/version" + method: GET + - name: Check new server deployment is running + id: check_version + run: | + echo "is_version=${{ steps.running_version.outputs.status == 200 && fromJson(steps.running_version.outputs.response).version == steps.read_version.outputs.version }}" >> "$GITHUB_OUTPUT" + - name: Run Playwright tests + if: steps.check_version.outputs.is_version == 'true' + working-directory: ./openvsx/webui + run: yarn smoke-tests + - uses: actions/upload-artifact@v4 + if: steps.check_version.outputs.is_version == 'true' + with: + name: playwright-report + path: openvsx/webui/playwright-report/ + retention-days: 30 + - name: Fail smoke test + if: steps.check_version.outputs.is_version != 'true' + uses: actions/github-script@v7 + with: + script: | + core.setFailed('Deployed version is not ${{ steps.read_version.outputs.version }}') From 347086a55b59b2855f558e3f6beca85b92fbcbf5 Mon Sep 17 00:00:00 2001 From: amvanbaren Date: Wed, 2 Oct 2024 22:16:27 +0300 Subject: [PATCH 7/7] Update action versions --- .github/workflows/main.yml | 2 +- .github/workflows/sonar.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 63161dfe..e8457aec 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ jobs: run: echo ${{ github.event.number }} > PR_NUMBER.txt - name: Archive PR number if: github.event_name == 'pull_request' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: PR_NUMBER path: PR_NUMBER.txt \ No newline at end of file diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 7068f253..1193478f 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Download PR number artifact if: github.event.workflow_run.event == 'pull_request' - uses: dawidd6/action-download-artifact@v2 + uses: dawidd6/action-download-artifact@v6 with: workflow: Build run_id: ${{ github.event.workflow_run.id }} @@ -32,7 +32,7 @@ jobs: full_name: ${{ github.event.repository.full_name }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: repository: ${{ github.event.workflow_run.head_repository.full_name }} ref: ${{ github.event.workflow_run.head_branch }}