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/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 }}') 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 }} diff --git a/Dockerfile b/Dockerfile index 3a5e9907..f5fe8f94 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,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/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. diff --git a/configuration/application.yml b/configuration/application.yml index a79629ee..53026bbe 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 @@ -162,6 +165,7 @@ ovsx: elasticsearch: enabled: true ssl: true + search: relevance: rating: 0.2 downloads: 1.0