Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upsync (for later) #56

Open
wants to merge 546 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
546 commits
Select commit Hold shift + click to select a range
35e4b03
Ensure cookie is properly set before response is sent
J12934 Oct 18, 2024
f45ebe8
Use an easier way to unset the balancer cookie
J12934 Oct 18, 2024
f4a43cd
Add logout endpoint
J12934 Oct 18, 2024
3bc45be
Change initial timestamp to be also unix milli
J12934 Oct 18, 2024
ac2fdc9
Copy index file instead of creating a new one to ensure content somew…
J12934 Oct 18, 2024
891056d
Fix duplicate import warning
J12934 Oct 19, 2024
6f919d7
Ensure that there is always an error / panic when the signature valid…
J12934 Oct 19, 2024
3233649
Implement passcode reset
J12934 Oct 19, 2024
bcbd1ca
Use proper logger in wait till ready
J12934 Oct 19, 2024
59039b2
Break down join function into more managle pieces
J12934 Oct 19, 2024
3e19954
Fix go linter warning
J12934 Oct 19, 2024
e6fe7ac
Rename function / attribute to make more sense
J12934 Oct 19, 2024
96f9012
Fix linter paths in pipeline
J12934 Oct 19, 2024
2b9e2d7
Integrate go staticcheck into the ci
J12934 Oct 19, 2024
611ff00
Add go vet and staticcheck as local targets
J12934 Oct 19, 2024
91f2aee
Set explicit working directory for staticcheck action
J12934 Oct 19, 2024
a8276db
Update github action dependency versions
J12934 Oct 21, 2024
4724150
Add comment on why the passcode generation function is on the bundle
J12934 Oct 24, 2024
21047a0
Add basic proxy test
J12934 Oct 24, 2024
d2d8bc0
Add instance up checks
J12934 Oct 24, 2024
36117a3
Use a lock to ensure safe(ish) map access across go routines
J12934 Oct 24, 2024
2b55141
Add test for default GetJuiceShopUrlForTeam function
J12934 Oct 24, 2024
7aac90c
Handle "instance missing" differently
J12934 Oct 24, 2024
7f69066
Move test deployment into reusable vars
J12934 Oct 24, 2024
11d05a8
Remove unused second teamname
J12934 Oct 24, 2024
5447dba
Add test checking for redirect handling
J12934 Oct 24, 2024
6ea7af9
Add test case to ensure that the secret must match
J12934 Oct 24, 2024
c93391a
Drop patch version go mod file for consistency
J12934 Oct 24, 2024
190db72
Add simple prometheus metrics
J12934 Oct 24, 2024
b38da3e
Add some explanation to the status recorder
J12934 Oct 24, 2024
090d21b
Read config file generated from helm values
J12934 Oct 24, 2024
02e04a2
Add cookie signing secret for dev script to make cookie stay valid af…
J12934 Oct 25, 2024
aa7eb59
Run metrics on a different server to avoid having to have basic auth …
J12934 Oct 25, 2024
3f0097c
Run tests with bun if available
J12934 Oct 25, 2024
cf51e40
Fix typo
J12934 Oct 25, 2024
a2161b4
Remove notes about having to set a prometheus password
J12934 Oct 25, 2024
016051c
Add back login metrics
J12934 Oct 25, 2024
7ed1f37
Add back teamname server side validation
J12934 Oct 27, 2024
fd7759e
Add owner references to deployment and service
J12934 Oct 28, 2024
fbab41e
Remove option to not set owner references
J12934 Oct 28, 2024
a49bbee
Upgrade golang dependencies
J12934 Oct 28, 2024
b5df9cf
Use a more specific import alias for metav1
J12934 Oct 29, 2024
57b7b17
Return index.html for frontend routed paths
J12934 Oct 29, 2024
7c0d0a9
Implement score calculation
J12934 Nov 1, 2024
17ef44b
Fix incompatability with progress watchdog with the new deployment na…
J12934 Nov 1, 2024
f3304e4
Add log
J12934 Nov 1, 2024
3518b86
Slightly change the response and log out the error
J12934 Nov 1, 2024
f083c0d
Slight refactor
J12934 Nov 1, 2024
4dbc946
Slightly refactor tests to make more tests easier to write
J12934 Nov 1, 2024
95ab288
truncate teams to 24 again to ensure we don't accidentally overwork t…
J12934 Nov 1, 2024
6a1b9d5
use a loop to genereate the test team names
J12934 Nov 1, 2024
70ec55e
Ensure unknown challenges are skipped properly
J12934 Nov 1, 2024
679d916
Remove trailing slash from path
J12934 Nov 1, 2024
4c11ddd
fix typo
J12934 Nov 2, 2024
02401fc
make test name more understandable
J12934 Nov 2, 2024
9160404
Add comments explaining what the bundle is for
J12934 Nov 2, 2024
f956236
Use a consistent mechanism to reference juice shop challenges.
J12934 Nov 2, 2024
79c7e37
Change default cookie name to team from balancer
J12934 Nov 2, 2024
9fe7451
Set cookie as secure when configured
J12934 Nov 2, 2024
daeaa47
Move team creation to test local functions
J12934 Nov 2, 2024
6de6517
Implement max instance count setting
J12934 Nov 2, 2024
7e27abb
Change regex to match frontend
J12934 Nov 2, 2024
87daef1
Remove debug log
J12934 Nov 2, 2024
a86eeb7
Reimplement pod labels & annotations
J12934 Nov 2, 2024
4275c7d
Reduce footgun potential by not letting users overwrite labels requir…
J12934 Nov 2, 2024
386623d
Remove acceptable team name from list of bad names
J12934 Nov 2, 2024
23af873
Pass request context to all kubernetes api calls in join handler
J12934 Nov 2, 2024
57b6863
Properly use request context in the other routes
J12934 Nov 2, 2024
2c460d5
Add more explanation comments
J12934 Nov 2, 2024
ec2924d
Implement admin login
J12934 Nov 2, 2024
0bc918f
Reimplement listing instance endpoint
J12934 Nov 2, 2024
11f0bee
Implement admin instance deletion
J12934 Nov 2, 2024
7d61054
Ensure via tests that it only deletes the one instance
J12934 Nov 2, 2024
67e638e
Add part of labels to pod too
J12934 Nov 2, 2024
83b8296
Add instance restart route
J12934 Nov 2, 2024
3a2cb41
Merge branch 'go-balancer'
J12934 Nov 3, 2024
d286084
Make the admin page somewhat simpler by removing the complex table de…
J12934 Nov 3, 2024
69cdc43
Fix ingress.yaml service/port, make custom domain more obvious
matt-perrotti Nov 14, 2024
3b1a1c3
Update ssl.md
matt-perrotti Nov 15, 2024
bb51f95
Fix ingress name
J12934 Nov 15, 2024
edf013a
Add v8 docs warning
J12934 Nov 15, 2024
b00a97c
WIP auto translation to tailwind
J12934 Nov 5, 2024
ba9b9c0
Start migrating the layout to a more proper tailwind setup
J12934 Nov 5, 2024
1f7f873
Rework css layout
J12934 Nov 8, 2024
dbc3fd2
Siplify layout mechanism
J12934 Nov 8, 2024
354cb34
Some more layoutting / alignment improvments
J12934 Nov 9, 2024
a7f5d06
Prefix all server route with api to easily poxy to them from the vite…
J12934 Nov 9, 2024
6c54111
Make button work properly with "as" prop
J12934 Nov 9, 2024
4021d83
En en locale for all english sub languages, removes a spammy console …
J12934 Nov 9, 2024
3a43265
Add optional typescript support
J12934 Nov 9, 2024
75c1cd8
More simple typescript migrations
J12934 Nov 9, 2024
a8c1841
More typescript migration
J12934 Nov 9, 2024
f3ea1c1
Move admin page to typescript
J12934 Nov 9, 2024
84c7ac8
Rework admin page layout
J12934 Nov 9, 2024
eb495cd
Remove form and input related components
J12934 Nov 9, 2024
4fa33c4
Unify cards
J12934 Nov 9, 2024
714d404
Migrate score-board
J12934 Nov 9, 2024
87ebd11
Move score-board calculation to a standalone worker
J12934 Nov 9, 2024
34674b0
Use new (correcter) position value for teams with tied scores
J12934 Nov 9, 2024
f4f4d0a
Try to migrate most of the cards into one unified one which is consis…
J12934 Nov 10, 2024
035387e
Fix incorrect label selector in service monitor
J12934 Nov 13, 2024
7146fe3
Default port to 8080
J12934 Nov 13, 2024
56cd656
Fix incorrect target port of juice shop service monitor
J12934 Nov 13, 2024
424df27
Properly update last request timestamp
J12934 Nov 13, 2024
28110d5
Fix warn log about superfluous call to set the status code
J12934 Nov 13, 2024
a0ea532
More work on getting the team status page working
J12934 Nov 13, 2024
d2f6201
Move card to ts and remove now unused card
J12934 Nov 13, 2024
487100e
Migrate join page to ts
J12934 Nov 13, 2024
7c58b91
Migrate joining page to ts
J12934 Nov 13, 2024
a64811c
Complete typescript frontend migration
J12934 Nov 13, 2024
8cd1e17
Have a smarter primary back link via the multi juicer logo
J12934 Nov 13, 2024
cd5c7d9
Minor styling adjustments
J12934 Nov 13, 2024
cead763
Add a simple confirmation step before allowing users to log out
J12934 Nov 13, 2024
2a9255f
Add missing key prop
J12934 Nov 13, 2024
f55514e
Require confirmation on login page
J12934 Nov 13, 2024
034f016
Remove unused wait-till-ready handler
J12934 Nov 13, 2024
eca2eb3
redirect balancer requests with an active team to their status page
J12934 Nov 13, 2024
b1d567e
Update helm test snapshots after port fixes
J12934 Nov 14, 2024
52a7cc4
Fix incorrect endpoint used in status test
J12934 Nov 14, 2024
73e170b
Move components to more consistent places
J12934 Nov 14, 2024
7e42525
Remove unused wrapper
J12934 Nov 14, 2024
45b67db
Properly return html on status page
J12934 Nov 14, 2024
b037c53
Fix invalid teamname regex
J12934 Nov 14, 2024
16df855
Fix duplicate class name for width
J12934 Nov 14, 2024
709ce05
Add a header to the scoreboard page
J12934 Nov 14, 2024
72978e9
Add endpoint to fetch the individual progress of a team
J12934 Nov 14, 2024
9a5de45
Validate teamnames in a requests that take them in
J12934 Nov 14, 2024
abae7f6
Add very simple display of challenges solved by team
J12934 Nov 14, 2024
2e5bd8f
Include solved at timestamp
J12934 Nov 15, 2024
bcace08
Add challenge name and solved at time to the individual score page
J12934 Nov 15, 2024
740a75f
Properly display passcodes and make them copyable
J12934 Nov 16, 2024
9992e05
More visible error box
J12934 Nov 16, 2024
b79a36e
Ensure that status page is properly linked when returing later
J12934 Nov 16, 2024
fd7a457
Highlight active team on scoreboard
J12934 Nov 16, 2024
d4d6c32
Consistently refer to MJ score overview instead of score board
J12934 Nov 16, 2024
7ded472
A bit more consistent table styling
J12934 Nov 16, 2024
fd836e2
Show difficulty using stars
J12934 Nov 16, 2024
302d716
Fix incorrect route to score overviews
J12934 Nov 16, 2024
fccbdd0
Improve line breaks on status page
J12934 Nov 16, 2024
a8c8f33
Bump cross-spawn from 7.0.3 to 7.0.5 in /balancer/ui
dependabot[bot] Nov 16, 2024
0784a19
Refresh the instance status quicker while it's not ready
J12934 Nov 17, 2024
6ff116b
Add task to analyse bundle size
J12934 Nov 17, 2024
0e9acd1
Minor dependency updates
J12934 Nov 17, 2024
734e255
Slightly more consistent dev vs prod dependency grouping
J12934 Nov 17, 2024
b3d65e7
Remove outdated / wrongly auto generated readme for balancer ui
J12934 Nov 18, 2024
e76825d
Add a magic move animation when teams switch positions on the score o…
J12934 Nov 21, 2024
ef4ff9c
Restructure scoring to more easily allow to switch to kubernetes watches
J12934 Nov 24, 2024
9569558
Implement fairer and more stable sorting for tied teams
J12934 Nov 24, 2024
b742cb8
Make bolder teamname readable
J12934 Nov 24, 2024
712de54
Correct copy pastas log
J12934 Nov 24, 2024
39488ee
Use kubernetes watch for tracking challenge updates
J12934 Nov 24, 2024
a4e0cc2
Make watcher cancellable and add test
J12934 Nov 24, 2024
2833a4e
Only update score if it has changed
J12934 Nov 24, 2024
6304567
tmp unsafe waiting code
J12934 Nov 24, 2024
8cb9cdb
Use a less efficient but way less complicated mechanism to wait for u…
J12934 Nov 24, 2024
dce69f9
Correct url redirected to after sucessfully entering the team passcode
J12934 Nov 25, 2024
0e991b8
Correct incorrect frontend route in static file handling
J12934 Nov 25, 2024
fb725ee
Improve joining ux by having giving better feedback on failed joins a…
J12934 Nov 25, 2024
6387492
Remove outline which looks weird on bright theme
J12934 Nov 27, 2024
52a2b33
Improve spacing of translation button
J12934 Nov 27, 2024
4690384
Improve score board page for bright theme
J12934 Nov 27, 2024
1920456
Let admin page grow large enought so that timestamps aren't broken up…
J12934 Nov 27, 2024
2b28bf0
Remove outline which looks weird on bright theme
J12934 Nov 27, 2024
53605fa
Make text on admin page better readable on bright theme
J12934 Nov 27, 2024
643cab7
prefetch all place icons
J12934 Nov 27, 2024
6f8f9f3
Always load team status on first page load to properly set links and …
J12934 Nov 28, 2024
d1729da
Return a teamname of admin team on status response
J12934 Nov 28, 2024
d9e58c3
Update frontend dependencies
J12934 Nov 28, 2024
c0e249c
Split score board into lazy loaded bundle to avoid having to have mot…
J12934 Nov 28, 2024
8612cdf
Save readiness with scoring
J12934 Nov 29, 2024
a43f10a
Let score board endpoint return a custom response to be tailored to t…
J12934 Dec 11, 2024
a783a2d
Use readiness from scoring watcher for status check
J12934 Dec 11, 2024
4bd2b05
Adopt tests for new scoring / readyness calculation
J12934 Dec 11, 2024
5451271
Fix typo in function param
J12934 Dec 11, 2024
c0dfd4f
Bump golang.org/x/crypto from 0.28.0 to 0.31.0 in /balancer
dependabot[bot] Dec 12, 2024
af76176
Minor ui dependency updates
J12934 Dec 8, 2024
b46a22d
Enable strict mode
J12934 Dec 8, 2024
f04b735
Minor ui dependency updates
J12934 Dec 11, 2024
b7fe11a
Rename misleading struct field
J12934 Dec 11, 2024
71e45db
Remove spammy logs
J12934 Dec 11, 2024
e56e14b
Add back polling for immediate instance status responses
J12934 Dec 11, 2024
0298f66
Remove specifc test for removed egde case handling
J12934 Dec 14, 2024
9312ca2
Ignore updatedAt timestamps in tests to keep them straight forward
J12934 Dec 14, 2024
03f9d22
Update kubernetes go dependencies
J12934 Dec 14, 2024
8964ce7
Update smaller go dependencies
J12934 Dec 14, 2024
c9a2922
Fix status page not loading the status correctly on initial load
J12934 Dec 14, 2024
7b2436c
More consistent balancer logs
J12934 Dec 14, 2024
32f94eb
Bump nanoid from 3.3.7 to 3.3.8 in /balancer/ui
dependabot[bot] Dec 12, 2024
1d6c893
Remove debug log
J12934 Dec 14, 2024
264e58a
Tweak confusing / spammy server logs
J12934 Dec 14, 2024
ba18743
Update translation
J12934 Dec 14, 2024
36b6b8a
Ensure passcode reset button doesn't overflow on larger screens with …
J12934 Dec 14, 2024
8b62f04
Readd score board animation using framer motion directly
J12934 Dec 15, 2024
ffdb7b6
Try restarting scoring worker if it randomly stops
J12934 Dec 27, 2024
f5963ce
Re-add livenessProbe and readinessProbe
stuebingerb Jan 7, 2025
3ecf0a0
Regenerate helm values table
J12934 Jan 7, 2025
69d18fd
Increment version in local chart.yaml file
J12934 Jan 7, 2025
9e58bf6
Update go crypto lib
J12934 Jan 7, 2025
8cfc854
Bump to 8.0.1
J12934 Jan 7, 2025
c391d74
Bump vitest from 2.1.8 to 2.1.9 in /balancer/ui
dependabot[bot] Feb 4, 2025
afbd6df
Bump vite from 6.0.3 to 6.0.11 in /balancer/ui
dependabot[bot] Feb 4, 2025
21a5381
Bump golang.org/x/net from 0.30.0 to 0.33.0 in /cleaner
dependabot[bot] Feb 4, 2025
2f5c4f7
Fix explanation text
J12934 Feb 7, 2025
58b721f
Update node dependencies
J12934 Feb 7, 2025
eabee7a
Update golang dependencies
J12934 Feb 7, 2025
3ac7b46
Update to tailwind 4
J12934 Feb 7, 2025
3649d07
Fix generated passcodes only being comprised of numbers
J12934 Feb 25, 2025
3a30969
Minor frontend package updates
J12934 Feb 25, 2025
20c3b47
Ensure build isn't using cached dependencies
J12934 Feb 25, 2025
2684471
Update to golang 1.24
J12934 Feb 25, 2025
85205d1
Minor golang updates
J12934 Feb 25, 2025
6d038ea
Fix incorrect name for action
J12934 Feb 25, 2025
99f85af
Update go staticcheck to 2025.1
J12934 Feb 25, 2025
8564dd8
Fix missing labels on balancer deployment
J12934 Feb 27, 2025
d4db9e2
Update helm snapshots to expect proper labels
J12934 Feb 27, 2025
7d669c5
Configured resource requests/limits now passed on to juiceshop deploy…
stijn-kramer Mar 4, 2025
aa097b3
Improve readability of error message
stuebingerb Mar 4, 2025
13bdc90
Update grafana dashboard
stuebingerb Mar 4, 2025
94ade8a
Explicitly mark the chart version as a plcaeholder to avoid confusion
J12934 Mar 4, 2025
9b95376
Remove loki from monitoring guide and update kube-prometheus-stack chart
J12934 Mar 4, 2025
b9c5a6a
Update dashboard again for newer grafana version
J12934 Mar 4, 2025
e4ef00d
Update snapshot with new grafana dashboard
J12934 Mar 4, 2025
0232d35
Automatically set the app version for the chart during release
J12934 Mar 5, 2025
a1c25f9
Remove outdated upcoming v8 warning
J12934 Mar 12, 2025
db21040
Bump golang.org/x/net from 0.34.0 to 0.36.0 in /progress-watchdog
dependabot[bot] Mar 13, 2025
bceef74
Minor package updates
J12934 Mar 13, 2025
0720f72
Add a dependabot config to auto-update go and npm dependencies
J12934 Mar 13, 2025
0ce6d49
chore(deps): bump tailwindcss from 4.0.9 to 4.0.14 in /balancer/ui
dependabot[bot] Mar 13, 2025
65c8f70
chore(deps-dev): bump typescript from 5.7.3 to 5.8.2 in /balancer/ui
dependabot[bot] Mar 13, 2025
4825063
chore(deps): bump motion from 12.4.7 to 12.5.0 in /balancer/ui
dependabot[bot] Mar 13, 2025
8bd65e7
chore(deps-dev): bump vitest from 3.0.5 to 3.0.8 in /balancer/ui
dependabot[bot] Mar 13, 2025
bcb36f3
chore(deps-dev): bump vite from 6.2.0 to 6.2.1 in /balancer/ui
dependabot[bot] Mar 13, 2025
14e7a2b
Try grouping together golang pr's
J12934 Mar 14, 2025
dbb2539
Also combine npm dep upgrades into a single pr one per dev and prod deps
J12934 Mar 14, 2025
a6dbd5d
Automatically update docker dependencies
J12934 Mar 14, 2025
3d2ae4f
chore(deps): bump the npm-dev-dependencies group
dependabot[bot] Mar 14, 2025
e3276b4
chore(deps): bump golang.org/x/net from 0.34.0 to 0.36.0 in /cleaner
dependabot[bot] Mar 14, 2025
41c5e9e
chore(deps): bump golang.org/x/net from 0.34.0 to 0.36.0 in /balancer
dependabot[bot] Mar 14, 2025
c9c8883
chore(deps-dev): bump vite in /balancer/ui in the npm-dependencies group
dependabot[bot] Mar 14, 2025
f7bd55e
Update to JuiceShop v17.2.0
J12934 Mar 15, 2025
8cfdfb5
set imagePullSecrets in helm-chart for private repositories
stijn-kramer Mar 18, 2025
98fe293
fix indent depth
stijn-kramer Mar 18, 2025
02de3b6
add imagePullSecrets for juice-shop instances
stijn-kramer Mar 19, 2025
66d10ed
update helm unittest snapshot
stijn-kramer Mar 19, 2025
c28e5fa
helm unittest snapshot with LF line endings
stijn-kramer Mar 19, 2025
a0de0fa
Add comment / warning to also set the JuiceShop setting
J12934 Mar 20, 2025
f7f43e0
chore(deps-dev): bump the npm-dependencies group
dependabot[bot] Mar 24, 2025
bef0f40
chore(deps): bump the npm-dev-dependencies group
dependabot[bot] Mar 24, 2025
c5f9449
chore(deps): bump the npm-dev-dependencies group
dependabot[bot] Mar 31, 2025
e22df98
chore(deps-dev): bump the npm-dependencies group
dependabot[bot] Mar 31, 2025
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
72 changes: 72 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/balancer"
schedule:
interval: "weekly"
commit-message:
prefix: "chore"
include: "scope"
groups:
golang-dependencies:
patterns:
- "*"

- package-ecosystem: "gomod"
directory: "/cleaner"
schedule:
interval: "weekly"
commit-message:
prefix: "chore"
include: "scope"
groups:
golang-dependencies:
patterns:
- "*"

- package-ecosystem: "gomod"
directory: "/progress-watchdog"
schedule:
interval: "weekly"
commit-message:
prefix: "chore"
include: "scope"
groups:
golang-dependencies:
patterns:
- "*"

- package-ecosystem: "npm"
directory: "/balancer/ui"
schedule:
interval: "weekly"
commit-message:
prefix: "chore"
include: "scope"
groups:
npm-dependencies:
patterns:
- "*"
dependency-type: "development"
update-types:
- "minor"
- "patch"
npm-dev-dependencies:
patterns:
- "*"
dependency-type: "production"
update-types:
- "minor"
- "patch"

- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
commit-message:
prefix: "chore"
include: "scope"
groups:
docker-dependencies:
patterns:
- "*"
23 changes: 0 additions & 23 deletions .github/release-drafter.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
changelog:
categories:
- title: "🚀 Features"
labels:
- "feature"
- "enhancement"
- title: "🐛 Bug Fixes"
labels:
- "fix"
- "bugfix"
- "bug"
- title: "📚 Docs"
label: "documentation"
- title: "🌐 I18N"
label: "i18n"
- title: "🧰 Maintenance"
label: "i18n"
99 changes: 66 additions & 33 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,67 +1,100 @@
name: "Release Build"
on:
release:
types: [published]
name: "Publish Docker Images"
env:
CONTAINER_REGISTRY: ghcr.io/juice-shop
jobs:
helmRelease:
name: "Package Helm Chart"
name: "Publish Helm Chart"
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v1
- name: "Install yq"
run: |
sudo snap install yq
- name: "Patch Chart.yaml to the current released version"
working-directory: helm/multi-juicer/
- uses: actions/checkout@v4

- id: release-version
name: Parse Release Version
run: |
RELEASE_VERSION="${GITHUB_REF#refs/*/}"
# Remove leading 'v' from git tag to create valid semver
RELEASE_VERSION="${RELEASE_VERSION//v}"
# patch the version & appVersion in the Chart.yaml to the release version
yq eval -i ".version = \"$RELEASE_VERSION\", .appVersion = \"$RELEASE_VERSION\"" Chart.yaml
- uses: J12934/[email protected]
with:
access-token: ${{ secrets.ACCESS_TOKEN }}
charts-folder: helm
deploy-branch: gh-pages
echo "version=$RELEASE_VERSION" >> "$GITHUB_OUTPUT"

- name: "Login to Package Registry"
run: 'echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login --username ${{ github.actor }} --password-stdin ${{ env.CONTAINER_REGISTRY }}'

- name: "Package Helm Chart"
working-directory: helm/multi-juicer/
run: |
helm package --version "${{ steps.release-version.outputs.version }}" --app-version "${{ steps.release-version.outputs.version }}" .

- name: "Push Helm Chart"
working-directory: helm/multi-juicer/
run: |
helm push "multi-juicer-${{ steps.release-version.outputs.version }}.tgz" oci://${{ env.CONTAINER_REGISTRY }}/multi-juicer/helm

dockerBuilds:
name: "Build"
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write # needed for signing the images with GitHub OIDC Token
strategy:
matrix:
component:
- progress-watchdog
- cleaner
- juice-balancer
- balancer
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install Cosign
uses: sigstore/cosign-installer@v3

- name: Docker Meta
id: docker_meta
uses: docker/metadata-action@v3
- id: image-metadata
name: Container Image Metadata
uses: docker/metadata-action@v5
with:
images: iteratec/${{ matrix.component }}
images: ${{ env.CONTAINER_REGISTRY }}/multi-juicer/${{ matrix.component }}
tags: |
type=semver,pattern={{raw}}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/setup-buildx-action@v3
- name: Login to Container Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: ${{ env.CONTAINER_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract JuiceShop Version from Helm Values
id: extract-juice-shop-version
run: |
JUICE_SHOP_VERSION=$(yq eval '.config.juiceShop.tag' helm/multi-juicer/values.yaml)
echo "version=$JUICE_SHOP_VERSION" >> "$GITHUB_OUTPUT"

- name: Build and Push
uses: docker/build-push-action@v3
- id: build-and-push
name: Build and Push
uses: docker/build-push-action@v6
with:
context: ./${{ matrix.component }}
file: ./${{ matrix.component }}/Dockerfile
platforms: linux/amd64,linux/arm/v7,linux/arm64
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
tags: ${{ steps.image-metadata.outputs.tags }}
labels: ${{ steps.image-metadata.outputs.labels }}
build-args: |
JUICE_SHOP_VERSION=${{ steps.extract-juice-shop-version.outputs.version }}

- name: Sign the images with GitHub OIDC Token
env:
DIGEST: ${{ steps.build-and-push.outputs.digest }}
TAGS: ${{ steps.image-metadata.outputs.tags }}
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
17 changes: 0 additions & 17 deletions .github/workflows/release-notes.yaml

This file was deleted.

112 changes: 75 additions & 37 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,90 @@
on: [push, pull_request]
name: "Run Tests"
name: "Tests"
permissions:
contents: read
env:
GO_STATIC_CHECK_VERSION: "2025.1"
jobs:
cleaner:
name: Cleaner
runs-on: ubuntu-latest
defaults:
run:
working-directory: cleaner
steps:
- uses: actions/checkout@master
- name: Install Balancer
run: |
cd cleaner
npm ci
- name: Run Linter
run: |
cd cleaner
npm run lint
- name: Test Balancer
run: |
cd cleaner
npm test -- --ci --color --verbose
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: "cleaner/go.mod"
cache-dependency-path: "cleaner/go.sum"
- name: "Lint"
run: go vet ./...
- uses: dominikh/[email protected]
with:
version: "${{ env.GO_STATIC_CHECK_VERSION }}"
working-directory: cleaner
- name: "Test"
run: go test -cover ./...

balancer:
name: Balancer
runs-on: ubuntu-latest
defaults:
run:
working-directory: balancer
steps:
- uses: actions/checkout@master
- name: "Install & Build BalancerUI"
run: |
cd juice-balancer/ui
npm ci
npm run build
- name: Install Balancer
run: |
cd juice-balancer
npm ci
- name: Run Linter
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: "balancer/go.mod"
cache-dependency-path: "balancer/go.sum"
- name: "Place index.html file into ui build folder"
run: |
cd juice-balancer
npm run lint
- name: Test Balancer
run: |
cd juice-balancer
npm test -- --ci --color --verbose
progressWatchdog:
mkdir ui/build/
cp ui/index.html ui/build/index.html
- name: "Lint"
run: go vet ./...
- uses: dominikh/[email protected]
with:
version: "${{ env.GO_STATIC_CHECK_VERSION }}"
working-directory: balancer
- name: "Test"
run: go test -cover ./...

progress-watchdog:
name: ProgressWatchdog
runs-on: ubuntu-latest
defaults:
run:
working-directory: progress-watchdog
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: "progress-watchdog/go.mod"
cache-dependency-path: "progress-watchdog/go.sum"
- name: "Lint"
run: go vet ./...
- uses: dominikh/[email protected]
with:
version: "${{ env.GO_STATIC_CHECK_VERSION }}"
working-directory: progress-watchdog
- name: "Test"
run: go test -cover ./...

helm:
name: Helm
runs-on: ubuntu-latest
defaults:
run:
working-directory: helm/multi-juicer/
steps:
- uses: actions/checkout@master
- name: "Test ProgressWatchdog"
- uses: actions/checkout@v4
- name: Verify tools
run: |
helm version
- name: Install Helm Unit Test Plugin
run: |
cd progress-watchdog
go vet
go test -cover
helm plugin install https://github.com/helm-unittest/helm-unittest.git --version 0.6.2
- name: Helm-Chart Unit Tests | Operator
run: helm unittest .
Loading