Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/chart-preview.yml
Original file line number Diff line number Diff line change
@@ -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
Comment thread
coderabbitai[bot] marked this conversation as resolved.
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
Comment thread
KevinGruber2001 marked this conversation as resolved.

- 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 }}_
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
.vscode/
*.swp
*.swo
.claude
4 changes: 0 additions & 4 deletions .idea/theia-shared-cache.iml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

72 changes: 0 additions & 72 deletions .idea/workspace.xml

This file was deleted.

18 changes: 7 additions & 11 deletions chart/templates/reposilite-shared-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
25 changes: 21 additions & 4 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment thread
KevinGruber2001 marked this conversation as resolved.
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
mountPath: /etc/reposilite/configuration.shared.json
subPath: configuration.shared.json
readOnly: true
- name: plugins
mountPath: /app/data/plugins