diff --git a/.github/workflows/chart-preview.yml b/.github/workflows/chart-preview.yml
new file mode 100644
index 0000000..5083456
--- /dev/null
+++ b/.github/workflows/chart-preview.yml
@@ -0,0 +1,52 @@
+name: Chart Preview
+
+on:
+ pull_request:
+ paths:
+ - 'chart/**'
+ - '.github/workflows/chart-preview.yml'
+
+jobs:
+ preview:
+ permissions:
+ contents: read
+ packages: write
+ pull-requests: write
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Install Helm
+ uses: azure/setup-helm@v4
+
+ - name: Update chart dependencies
+ run: helm dependency update ./chart
+
+ - name: Set preview version
+ run: |
+ CURRENT_VERSION=$(grep '^version:' chart/Chart.yaml | awk '{print $2}')
+ PREVIEW_VERSION="${CURRENT_VERSION}-pr.${{ github.event.pull_request.number }}"
+ sed -i "s/^version: .*/version: ${PREVIEW_VERSION}/" chart/Chart.yaml
+ echo "PREVIEW_VERSION=${PREVIEW_VERSION}" >> $GITHUB_ENV
+
+ - name: Login to GHCR
+ run: echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io -u ${{ github.actor }} --password-stdin
+
+ - name: Package and push
+ run: |
+ helm package ./chart
+ helm push theia-shared-cache-${PREVIEW_VERSION}.tgz oci://ghcr.io/${{ github.repository_owner }}/charts
+
+ - name: Comment install instructions
+ uses: marocchino/sticky-pull-request-comment@v2
+ with:
+ header: chart-preview
+ message: |
+ ## 📦 Chart Preview Ready
+
+ ```bash
+ helm install test oci://ghcr.io/${{ github.repository_owner }}/charts/theia-shared-cache --version ${{ env.PREVIEW_VERSION }}
+ ```
+
+ _Updated: ${{ github.sha }}_
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index ae4198b..54ea06c 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -24,6 +24,12 @@ jobs:
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
+ - name: Install Helm
+ uses: azure/setup-helm@v4
+
+ - name: Update chart dependencies
+ run: helm dependency update ./chart
+
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.6.0
env:
diff --git a/.gitignore b/.gitignore
index efbeafc..0ffb6f6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
.vscode/
*.swp
*.swo
+.claude
diff --git a/.idea/theia-shared-cache.iml b/.idea/theia-shared-cache.iml
deleted file mode 100644
index 7ee078d..0000000
--- a/.idea/theia-shared-cache.iml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 94a25f7..0000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
deleted file mode 100644
index b2e01fc..0000000
--- a/.idea/workspace.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {}
- {
- "isMigrated": true
-}
- {
- "associatedIndex": 0
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1767539168921
-
-
- 1767539168921
-
-
-
-
-
-
-
- true
-
-
\ No newline at end of file
diff --git a/chart/templates/reposilite-shared-config.yaml b/chart/templates/reposilite-shared-config.yaml
index 6503c0f..09e76e4 100644
--- a/chart/templates/reposilite-shared-config.yaml
+++ b/chart/templates/reposilite-shared-config.yaml
@@ -10,32 +10,28 @@ data:
configuration.shared.json: |
{
"maven": {
- "repositories": {
- "releases": {
+ "repositories": [
+ {
+ "id": "releases",
"visibility": "PUBLIC",
"redeployment": false,
- "preserved": true,
- "storageProvider": {
- "type": "fs",
- "quota": "100%",
- "mount": ""
- },
+ "preserveSnapshots": false,
"proxied": [
{
- "link": "https://repo1.maven.org/maven2",
+ "reference": "https://repo1.maven.org/maven2",
"store": true,
"allowedGroups": [],
"allowedExtensions": [".jar", ".war", ".xml", ".pom", ".module", ".asc", ".md5", ".sha1", ".sha256", ".sha512"]
},
{
- "link": "https://plugins.gradle.org/m2",
+ "reference": "https://plugins.gradle.org/m2",
"store": true,
"allowedGroups": [],
"allowedExtensions": [".jar", ".war", ".xml", ".pom", ".module", ".asc", ".md5", ".sha1", ".sha256", ".sha512"]
}
]
}
- }
+ ]
}
}
{{- end }}
\ No newline at end of file
diff --git a/chart/values.yaml b/chart/values.yaml
index 7bdb31f..977f21f 100644
--- a/chart/values.yaml
+++ b/chart/values.yaml
@@ -71,15 +71,32 @@ reposilite:
- name: JAVA_OPTS
value: "-Xmx128M"
- name: REPOSILITE_OPTS
- value: "--token admin:changeme --shared-configuration=/app/data/configuration.shared.json"
+ value: "--token admin:changeme --shared-configuration=/etc/reposilite/configuration.shared.json"
- # Mount shared configuration into Reposilite pod
+ # Mount shared configuration + plugins into Reposilite pod
deployment:
+ initContainers:
+ - name: download-prometheus-plugin
+ image: busybox:1.36
+ command:
+ - sh
+ - -c
+ - |
+ wget -O /plugins/prometheus-plugin.jar \
+ "https://maven.reposilite.com/releases/com/reposilite/plugin/prometheus-plugin/3.5.26/prometheus-plugin-3.5.26-all.jar"
+ volumeMounts:
+ - name: plugins
+ mountPath: /plugins
additionalVolumes:
- name: shared-config
configMap:
name: reposilite-shared-config
+ - name: plugins
+ emptyDir: {}
additionalVolumeMounts:
- name: shared-config
- mountPath: /app/data/configuration.shared.json
- subPath: configuration.shared.json
\ No newline at end of file
+ mountPath: /etc/reposilite/configuration.shared.json
+ subPath: configuration.shared.json
+ readOnly: true
+ - name: plugins
+ mountPath: /app/data/plugins
\ No newline at end of file