Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ NATS_TLS_ENABLED=false # Enable TLS for NATS connection (default: false)

### HadesAPI Options ###
API_PORT=8080 # Port for the API to listen on (default: 8080)
AUTH_KEY="" # Key used for Basic Auth with the API (default: "" for no auth)
AUTH_KEY="" # Key used for Basic Auth with the API. REQUIRED: the API refuses to start without it unless ALLOW_UNAUTHENTICATED=true, and compose.yml refuses to start without it. Generate one with `openssl rand -hex 32`.

### Dashboard (operator web UI, served by HadesAPI) ###
# The dashboard is disabled unless USERNAME, PASSWORD_HASH and SESSION_SECRET are
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ jobs:

- name: Determine benchmark mode and host
id: mode_resolve
env:
JENKINS_USER_SECRET: ${{ secrets.JENKINS_USER }}
JENKINS_TOKEN_SECRET: ${{ secrets.JENKINS_TOKEN }}
run: |
set -euo pipefail
echo "Selected mode: ${{ inputs.mode }}"
Expand All @@ -61,8 +64,9 @@ jobs:
jenkins)
echo "MODE_PATH=jenkins" >> $GITHUB_ENV
echo "BENCHMARK_HOST=${{ vars.JENKINS_HOST }}" >> $GITHUB_ENV
echo "JENKINS_USER=${{ secrets.JENKINS_USER }}" >> $GITHUB_ENV
echo "JENKINS_TOKEN=${{ secrets.JENKINS_TOKEN }}" >> $GITHUB_ENV
echo "JENKINS_USER=${JENKINS_USER_SECRET}" >> $GITHUB_ENV
echo "::add-mask::${JENKINS_TOKEN_SECRET}"
echo "JENKINS_TOKEN=${JENKINS_TOKEN_SECRET}" >> $GITHUB_ENV
echo "JENKINS_JOB_PATH=${{ vars.JENKINS_JOB_PATH }}" >> $GITHUB_ENV
;;
*)
Expand Down Expand Up @@ -178,7 +182,7 @@ jobs:
QUERY="host=${ENCODED_HOST}&count=${COUNT}&commit_hash=${COMMIT_HASH}"
fi

echo "POST ${URL}?${QUERY}"
echo "POST ${URL}?${QUERY//${JENKINS_TOKEN:-__none__}/***}"

curl -sS --fail-with-body --retry 3 --retry-delay 2 --max-time 120 \
-X POST "${URL}?${QUERY}" \
Expand Down
50 changes: 31 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ concurrency:

permissions:
contents: read
packages: write
actions: write

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Setup Go
uses: actions/setup-go@v7
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
with:
go-version-file: go.work
cache-dependency-path: "**/*.sum"
Expand All @@ -53,9 +53,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Setup Go
uses: actions/setup-go@v7
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
with:
go-version-file: go.work
cache-dependency-path: "**/*.sum"
Expand All @@ -79,9 +81,11 @@ jobs:
- name: HadesOperator
path: HadesScheduler/HadesOperator
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Setup Go
uses: actions/setup-go@v7
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
with:
go-version-file: go.work
cache-dependency-path: "**/*.sum"
Expand All @@ -91,19 +95,19 @@ jobs:
run: cd ${{ matrix.path }} && go test ./... -json > "${{ github.workspace }}/TestResults-${{ matrix.name }}.json"
- name: Upload test results
if: always()
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: Go-results-${{ matrix.name }}
path: TestResults-${{ matrix.name }}.json

ui:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
cache: npm
Expand All @@ -120,51 +124,59 @@ jobs:
build-api:
needs: [lint, build, test, ui]
if: github.actor != 'dependabot[bot]'
uses: ls1intum/.github/.github/workflows/build-and-push-docker-image.yml@v1.2.0
uses: ls1intum/.github/.github/workflows/build-and-push-docker-image.yml@ee1b52f07891ed489887681c09c52b4a83fa9fb2 # v1.2.0
permissions:
contents: read
packages: write
with:
image-name: hades-scheduler/hades/hades-api
docker-file: ./HadesAPI/Dockerfile
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest,enable={{is_default_branch}}
secrets: inherit

build-scheduler:
needs: [lint, build, test]
if: github.actor != 'dependabot[bot]'
uses: ls1intum/.github/.github/workflows/build-and-push-docker-image.yml@v1.2.0
uses: ls1intum/.github/.github/workflows/build-and-push-docker-image.yml@ee1b52f07891ed489887681c09c52b4a83fa9fb2 # v1.2.0
permissions:
contents: read
packages: write
with:
image-name: hades-scheduler/hades/hades-scheduler
docker-file: ./HadesScheduler/Dockerfile
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest,enable={{is_default_branch}}
secrets: inherit

build-operator:
needs: [lint, build, test]
if: github.actor != 'dependabot[bot]'
uses: ls1intum/.github/.github/workflows/build-and-push-docker-image.yml@v1.2.0
uses: ls1intum/.github/.github/workflows/build-and-push-docker-image.yml@ee1b52f07891ed489887681c09c52b4a83fa9fb2 # v1.2.0
permissions:
contents: read
packages: write
with:
image-name: hades-scheduler/hades/hades-operator
docker-file: ./HadesScheduler/HadesOperator/Dockerfile
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest,enable={{is_default_branch}}
secrets: inherit

build-log-manager:
needs: [lint, build, test]
if: github.actor != 'dependabot[bot]'
uses: ls1intum/.github/.github/workflows/build-and-push-docker-image.yml@v1.2.0
uses: ls1intum/.github/.github/workflows/build-and-push-docker-image.yml@ee1b52f07891ed489887681c09c52b4a83fa9fb2 # v1.2.0
permissions:
contents: read
packages: write
with:
image-name: hades-scheduler/hades/hades-log-manager
docker-file: ./HadesLogManager/Dockerfile
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest,enable={{is_default_branch}}
secrets: inherit
4 changes: 2 additions & 2 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
fetch-depth: 0
persist-credentials: false

- uses: actions/setup-node@v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
cache: yarn
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deploy-k8s-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ name: Deploy to Kubernetes (test)
on:
workflow_dispatch:
inputs:
# For pr-N the chart and CRDs of that PR (fork PRs included) are applied with the
# test cluster's kubeconfig. Review the PR's helm/ and CRD changes before dispatching.
version:
description: "Image tag to deploy (e.g. latest, 1.0.0, pr-123, or a branch/sha tag)."
required: true
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/deploy-k8s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,16 @@ jobs:
environment: ${{ inputs.environment }}
steps:
- name: Checkout chart source
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
ref: ${{ inputs.chart-ref }}

- name: Install Helm
uses: azure/setup-helm@v4
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4

- name: Install kubectl
uses: azure/setup-kubectl@v4
uses: azure/setup-kubectl@776406bce94f63e41d621b960d78ee25c8b76ede # v4

- name: Configure kubeconfig
env:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ jobs:
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Setup Go
uses: actions/setup-go@v7
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
with:
go-version-file: go.work
cache-dependency-path: "**/*.sum"
- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
cache: npm
Expand All @@ -48,7 +48,7 @@ jobs:
run: cd HadesAPI/web && npm run test:e2e
- name: Upload report
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: playwright-report
path: HadesAPI/web/playwright-report/
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/release-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
persist-credentials: false

- name: Install Helm
uses: azure/setup-helm@v4
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4

- name: Lint and template
run: |
helm repo add nats https://nats-io.github.io/k8s/helm/charts/
helm dependency build helm/hades
helm lint helm/hades
helm template hades helm/hades > /dev/null
helm template hades helm/hades --set hadesApi.authKeySecret=hades-auth > /dev/null

# Publishes only on pushes to main (and manual dispatch), never on PRs.
release:
Expand All @@ -52,10 +54,12 @@ jobs:
packages: write # push the chart to GHCR
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
persist-credentials: false

- name: Install Helm
uses: azure/setup-helm@v4
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4

- name: Log in to GHCR
run: echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io -u "${{ github.actor }}" --password-stdin
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/verify-crd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v7
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
with:
go-version-file: go.work
cache: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/verify-openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0
persist-credentials: false

- name: Set up Go
uses: actions/setup-go@v7
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
with:
go-version-file: go.work
cache: true
Expand Down
Loading
Loading