Skip to content
54 changes: 10 additions & 44 deletions .github/workflows/bootzooka-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
cache: 'sbt'
distribution: "zulu"
java-version: "21"
cache: "sbt"

- uses: sbt/setup-sbt@v1

Expand All @@ -49,10 +49,9 @@ jobs:
working-directory: ./ui

publish:
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master'
needs: [ verify ]
needs: [verify]
runs-on: ubuntu-24.04

if: github.ref == 'refs/heads/master'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need the github.event_name != 'pull_request' check? so that this doesn't run on PRs to master?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's enough, for pull requests the github.ref is set to refs/pull/<pr_number>/merge.

steps:
- name: Check-out repository
id: repo-checkout
Expand All @@ -61,9 +60,9 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
cache: 'sbt'
distribution: "zulu"
java-version: "21"
cache: "sbt"

- uses: sbt/setup-sbt@v1

Expand All @@ -83,40 +82,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Publish docker image
run: sbt docker/docker:publish

deploy:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessarily in scope, but I think this can be removed - we don't publish tag-based releases. It was a failed experiments some years ago

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/v')
needs: [ verify ]
runs-on: ubuntu-24.04

steps:
- name: Check-out repository
id: repo-checkout
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
cache: 'sbt'

- name: Extract version
run: |
version=${GITHUB_REF/refs\/tags\/v/}
echo "VERSION=$version" >> $GITHUB_ENV

- name: Publish release notes
uses: release-drafter/release-drafter@v5
with:
config-name: release-drafter.yaml
publish: true
name: "v${{ env.VERSION }}"
tag: "v${{ env.VERSION }}"
version: "v${{ env.VERSION }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: sbt 'set docker / version := "'${GITHUB_RUN_ID}-${GITHUB_SHA:0:7}'"' docker/docker:publish

label:
# only for PRs by softwaremill-ci
Expand All @@ -126,5 +92,5 @@ jobs:
auto-merge:
# only for PRs by softwaremill-ci
if: github.event.pull_request.user.login == 'softwaremill-ci'
needs: [ verify, label ]
needs: [verify, label]
uses: softwaremill/github-actions-workflows/.github/workflows/auto-merge.yml@main
12 changes: 0 additions & 12 deletions .github/workflows/bootzooka-helm-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,3 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Publish Helm Chart
id: helm-publish-chart
uses: stefanprodan/[email protected]
with:
token: ${{ secrets.CR_TOKEN }}
charts_dir: helm
charts_url: https://softwaremill.github.io/sml-helm-public-repo
owner: softwaremill
repository: sml-helm-public-repo
helm_version: 3.10.0
linting: off
4 changes: 2 additions & 2 deletions helm/bootzooka/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "1.0"
description: "A Helm chart for Bootzooka"
name: bootzooka
version: 0.2.1
version: 0.3.0
type: application
keywords:
- scala
Expand All @@ -22,7 +22,7 @@ icon: https://raw.githubusercontent.com/softwaremill/bootzooka/master/banner.png
dependencies:
- name: postgresql
version: ^16
repository: https://charts.bitnami.com/bitnami
repository: oci://registry-1.docker.io/bitnamicharts
condition: postgresql.enabled
annotations:
artifacthub.io/links: |
Expand Down
6 changes: 5 additions & 1 deletion helm/bootzooka/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# bootzooka

![Version: 0.2.1](https://img.shields.io/badge/Version-0.2.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0](https://img.shields.io/badge/AppVersion-1.0-informational?style=flat-square)
![Version: 0.3.0](https://img.shields.io/badge/Version-0.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0](https://img.shields.io/badge/AppVersion-1.0-informational?style=flat-square)

A Helm chart for Bootzooka

Expand Down Expand Up @@ -49,13 +49,17 @@ The following table lists the configurable parameters of the chart and the defau
| bootzooka.ingress.tls[0].hosts[0] | string | `"bootzooka.example.com"` | |
| bootzooka.ingress.tls[0].secretName | string | `"bootzooka-tls"` | |
| bootzooka.ingress.tls_enabled | bool | `false` | |
| bootzooka.java_opts | string | `"-XX:MaxRAMPercentage=60"` | |
| bootzooka.liveness_initial_delay | int | `60` | |
| bootzooka.logback_json_encode | bool | `false` | |
| bootzooka.nameOverride | string | `""` | |
| bootzooka.nodeSelector | object | `{}` | |
| bootzooka.otel.enabled | bool | `false` | |
| bootzooka.otel.endpoint | string | `""` | |
| bootzooka.otel.metric_export_interval | string | `"60s"` | |
| bootzooka.otel.protocol | string | `""` | |
| bootzooka.otel.service_name | string | `"bootzooka"` | |
| bootzooka.readiness_initial_delay | int | `60` | |
| bootzooka.replicaCount | int | `1` | |
| bootzooka.reset_password_url | string | `"https://bootzooka.example.com/password-reset?code=%s"` | |
| bootzooka.resources | object | `{}` | |
Expand Down
2 changes: 2 additions & 0 deletions helm/bootzooka/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: ConfigMap
metadata:
name: {{ include "bootzooka.fullname" . }}-config
data:
JAVA_OPTS: "{{ .Values.bootzooka.java_opts }}"
SMTP_ENABLED: "{{ .Values.bootzooka.smtp.enabled }}"
SMTP_HOST: "{{ .Values.bootzooka.smtp.host }}"
SMTP_PORT: "{{ .Values.bootzooka.smtp.port }}"
Expand All @@ -20,3 +21,4 @@ data:
OTEL_EXPORTER_OTLP_PROTOCOL: "{{ .Values.bootzooka.otel.protocol }}"
OTEL_SERVICE_NAME: "{{ .Values.bootzooka.otel.service_name }}"
OTEL_METRIC_EXPORT_INTERVAL: "{{ .Values.bootzooka.otel.metric_export_interval }}"
LOGBACK_JSON_ENCODE: "{{ .Values.bootzooka.logback_json_encode }}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't seem to be used anywhere in the code, are you sure this does something? ;)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bump

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@paapug this got merged, but is this setting needed?

2 changes: 2 additions & 0 deletions helm/bootzooka/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ spec:
containerPort: 8080
protocol: TCP
livenessProbe:
initialDelaySeconds: {{ .Values.bootzooka.liveness_initial_delay }}
httpGet:
path: /
port: http
readinessProbe:
initialDelaySeconds: {{ .Values.bootzooka.readiness_initial_delay }}
httpGet:
path: /
port: http
Expand Down
5 changes: 5 additions & 0 deletions helm/bootzooka/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ postgresql:

bootzooka:
replicaCount: 1
liveness_initial_delay: 60
readiness_initial_delay: 60
reset_password_url: "https://bootzooka.example.com/password-reset?code=%s"
sql:
# -- Value will be taken from 'postgresql.fullnameOverride' setting
Expand Down Expand Up @@ -55,6 +57,9 @@ bootzooka:
tag: latest
pullPolicy: Always

java_opts: "-XX:MaxRAMPercentage=60"
logback_json_encode: false

nameOverride: ""
fullnameOverride: ""

Expand Down