Skip to content

Commit

Permalink
Added Develocity configuration
Browse files Browse the repository at this point in the history
- Added Develocity configuration to settings.gradle
- Added the CI (GHA) configuration for Develocity

Signed-off-by: Gasper Kojek <gkojek@gradle.com>
  • Loading branch information
ribafish authored and amvanbaren committed Feb 20, 2025
1 parent 3f10591 commit 125a127
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 4 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,12 @@ jobs:
run: docker build -t $WEBUI_TAG:$IMAGE_VERSION webui
- name: Run Server Tests
run: server/gradlew --no-daemon -p server check
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_API_TOKEN }}
- name: Build Server Image
run: docker build -t $SERVER_TAG:$IMAGE_VERSION server
run: docker build -t $SERVER_TAG:$IMAGE_VERSION server --secret id=dv-key,env=DEVELOCITY_ACCESS_KEY
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_API_TOKEN }}
- name: Push Docker Images
run: |
echo ${{ secrets.BOT_ACCESS_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ jobs:
- name: Build Web UI Image
run: docker build -t $WEBUI_TAG:$IMAGE_VERSION webui
- name: Build Server Image
run: docker build -t $SERVER_TAG:$IMAGE_VERSION server
run: docker build -t $SERVER_TAG:$IMAGE_VERSION server --secret id=dv-key,env=DEVELOCITY_ACCESS_KEY
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_API_TOKEN }}
- name: Push Docker Images
run: |
echo ${{ secrets.BOT_ACCESS_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[![Contribute](https://www.eclipse.org/che/contribute.svg)](https://workspaces.openshift.com#https://github.com/eclipse/openvsx)
[![Join the chat at https://gitter.im/eclipse/openvsx](https://badges.gitter.im/eclipse/openvsx.svg)](https://gitter.im/eclipse/openvsx)
[![CI](https://github.com/eclipse/openvsx/workflows/CI/badge.svg)](https://github.com/eclipse/openvsx/actions?query=workflow%3ACI)
[![Revved up by Develocity](https://img.shields.io/badge/Revved%20up%20by-Develocity-06A0CE?logo=Gradle&labelColor=02303A)](https://develocity-staging.eclipse.org/)

Open VSX is a [vendor-neutral](https://projects.eclipse.org/projects/ecd.openvsx) open-source alternative to the [Visual Studio Marketplace](https://marketplace.visualstudio.com/vscode). It provides a server application that manages [VS Code extensions](https://code.visualstudio.com/api) in a database, a web application similar to the VS Code Marketplace, and a command-line tool for publishing extensions similar to [vsce](https://code.visualstudio.com/api/working-with-extensions/publishing-extension#vsce).

Expand Down
6 changes: 4 additions & 2 deletions server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ COPY --chown=gradle:gradle gradlew *.gradle ./
COPY --chown=gradle:gradle gradle ./gradle/
COPY --chown=gradle:gradle src ./src/

# Build the server application
RUN ./gradlew --no-daemon assemble
ENV CI=true

# Build the server application
RUN --mount=type=secret,id=dv-key,env=DEVELOCITY_ACCESS_KEY \
./gradlew --no-daemon assemble -Ddevelocity.url=https://ge.solutions-team.gradle.com/

FROM eclipse-temurin:17.0.7_7-jdk

Expand Down
27 changes: 27 additions & 0 deletions server/settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,28 @@
plugins {
id 'com.gradle.develocity' version '3.19.1'
id 'com.gradle.common-custom-user-data-gradle-plugin' version '2.1'
}

def isCI = System.getenv('CI') != null // adjust to your CI provider

develocity {
server = "https://develocity-staging.eclipse.org"
projectId = "openvsx" // adjust to your project identifier / descriptor
buildScan {
uploadInBackground = !isCI
publishing.onlyIf { it.isAuthenticated() }
obfuscation {
ipAddresses { addresses -> addresses.collect { address -> "0.0.0.0" } }
}
}
}

buildCache {
remote(develocity.buildCache) {
enabled = true
push = isCI
}
}


rootProject.name = 'openvsx-server'

0 comments on commit 125a127

Please sign in to comment.