Skip to content

Commit 6947c4c

Browse files
authored
Merge pull request #1091 from ribafish/feature/develocity
Added Develocity setup
2 parents 3fdf86b + 125a127 commit 6947c4c

File tree

5 files changed

+40
-4
lines changed

5 files changed

+40
-4
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,12 @@ jobs:
3838
run: docker build -t $WEBUI_TAG:$IMAGE_VERSION webui
3939
- name: Run Server Tests
4040
run: server/gradlew --no-daemon -p server check
41+
env:
42+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_API_TOKEN }}
4143
- name: Build Server Image
42-
run: docker build -t $SERVER_TAG:$IMAGE_VERSION server
44+
run: docker build -t $SERVER_TAG:$IMAGE_VERSION server --secret id=dv-key,env=DEVELOCITY_ACCESS_KEY
45+
env:
46+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_API_TOKEN }}
4347
- name: Push Docker Images
4448
run: |
4549
echo ${{ secrets.BOT_ACCESS_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ jobs:
1818
- name: Build Web UI Image
1919
run: docker build -t $WEBUI_TAG:$IMAGE_VERSION webui
2020
- name: Build Server Image
21-
run: docker build -t $SERVER_TAG:$IMAGE_VERSION server
21+
run: docker build -t $SERVER_TAG:$IMAGE_VERSION server --secret id=dv-key,env=DEVELOCITY_ACCESS_KEY
22+
env:
23+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_API_TOKEN }}
2224
- name: Push Docker Images
2325
run: |
2426
echo ${{ secrets.BOT_ACCESS_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
[![Slack workspace](https://img.shields.io/badge/Slack-Join%20workspace-4A154B?logo=slack&logoColor=white)](https://join.slack.com/t/openvsxworkinggroup/shared_invite/zt-2y07y1ggy-ct3IfJljjGI6xWUQ9llv6A)
66
[![License](https://img.shields.io/github/license/eclipse/openvsx)](https://github.com/eclipse/openvsx/blob/master/LICENSE)
77
[![CI](https://github.com/eclipse/openvsx/workflows/CI/badge.svg)](https://github.com/eclipse/openvsx/actions?query=workflow%3ACI)
8+
[![Revved up by Develocity](https://img.shields.io/badge/Revved%20up%20by-Develocity-06A0CE?logo=Gradle&labelColor=02303A)](https://develocity-staging.eclipse.org/)
89

910
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).
1011

server/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ COPY --chown=gradle:gradle gradlew *.gradle ./
66
COPY --chown=gradle:gradle gradle ./gradle/
77
COPY --chown=gradle:gradle src ./src/
88

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

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

1315
FROM eclipse-temurin:17.0.7_7-jdk
1416

server/settings.gradle

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,28 @@
1+
plugins {
2+
id 'com.gradle.develocity' version '3.19.1'
3+
id 'com.gradle.common-custom-user-data-gradle-plugin' version '2.1'
4+
}
5+
6+
def isCI = System.getenv('CI') != null // adjust to your CI provider
7+
8+
develocity {
9+
server = "https://develocity-staging.eclipse.org"
10+
projectId = "openvsx" // adjust to your project identifier / descriptor
11+
buildScan {
12+
uploadInBackground = !isCI
13+
publishing.onlyIf { it.isAuthenticated() }
14+
obfuscation {
15+
ipAddresses { addresses -> addresses.collect { address -> "0.0.0.0" } }
16+
}
17+
}
18+
}
19+
20+
buildCache {
21+
remote(develocity.buildCache) {
22+
enabled = true
23+
push = isCI
24+
}
25+
}
26+
27+
128
rootProject.name = 'openvsx-server'

0 commit comments

Comments
 (0)