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
20 changes: 17 additions & 3 deletions .github/workflows/ci-cd-build-deploy-maven-lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,19 @@ on:
- application-type - string, always 'maven-library'
For optional fields see possible inputs to the create-build-envs action.
required: true
runs-on:
type: string
required: false
# Empty (default) = the historical self-hosted pool, kept inside the workflow as a fromJSON
# fallback so callers that don't set this are unaffected. Any non-empty value is used as-is
# (like the terraform actions), so opting in is just a plain string — no JSON.
default: ""
description: |
Global runner for all jobs, as a plain string: a single GitHub-hosted larger runner name
(matched by name), e.g. 'builder-app-platform-ghr-ubuntu-large'. Empty (default) uses the
self-hosted pool [self-hosted, dsb-builder, linux, x64]. Can be overridden per application
with a 'runs-on' field on an entry in 'apps'. The final 'ci-cd-conclusion' gate always
runs on ubuntu-latest.
# below are repo-specific settings, not app specific and thus does not belong in 'apps'
# for explanation of maven artifact pruning configuration see inputs of 'ci-cd/prune-maven-artifacts-in-repo/action.yml'
# sane defaults are defined but can be overridden pr. repo
Expand Down Expand Up @@ -65,7 +78,7 @@ on:
jobs:
create-matrix:
name: Create build matrix
runs-on: [self-hosted, dsb-builder, linux, x64]
runs-on: ${{ inputs.runs-on || fromJSON('["self-hosted", "dsb-builder", "linux", "x64"]') }}
defaults:
run:
shell: bash
Expand All @@ -91,7 +104,8 @@ jobs:
build-and-deploy:
name: Build and deploy to artifact repo
needs: create-matrix
runs-on: [self-hosted, dsb-builder, linux, x64]
# per-app 'runs-on' wins, else the global input, else the self-hosted default
runs-on: ${{ matrix.app-vars.runs-on || inputs.runs-on || fromJSON('["self-hosted", "dsb-builder", "linux", "x64"]') }}
strategy:
matrix: ${{ fromJSON(needs.create-matrix.outputs.app-vars-matrix) }}
defaults:
Expand Down Expand Up @@ -213,7 +227,7 @@ jobs:
&&
( github.event_name != 'pull_request' || github.event.action == 'closed' )
needs: [create-matrix, build-and-deploy]
runs-on: [self-hosted, dsb-builder, linux, x64]
runs-on: ${{ inputs.runs-on || fromJSON('["self-hosted", "dsb-builder", "linux", "x64"]') }}
defaults:
run:
shell: bash
Expand Down
24 changes: 19 additions & 5 deletions .github/workflows/ci-cd-default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,19 @@ on:
- application-name - string
For optional fields see possible inputs to the create-build-envs action.
required: true
runs-on:
type: string
required: false
# Empty (default) = the historical self-hosted pool, kept inside the workflow as a fromJSON
# fallback so callers that don't set this are unaffected. Any non-empty value is used as-is
# (like the terraform actions), so opting in is just a plain string — no JSON.
default: ""
description: |
Global runner for all jobs, as a plain string: a single GitHub-hosted larger runner name
(matched by name), e.g. 'builder-app-platform-ghr-ubuntu-large'. Empty (default) uses the
self-hosted pool [self-hosted, dsb-builder, linux, x64]. Can be overridden per application
with a 'runs-on' field on an entry in 'apps'. The final 'ci-cd-conclusion' gate always
runs on ubuntu-latest.
# below are repo-specific settings, not app specific and thus does not belong in 'apps'
# for explanation of maven artifact pruning configuration see inputs of 'ci-cd/prune-maven-artifacts-in-repo/action.yml'
# sane defaults are defined but can be overridden pr. repo
Expand Down Expand Up @@ -71,7 +84,7 @@ on:
jobs:
check-docker-disk-space:
name: Check Docker Disk Space & Prune if Needed
runs-on: [self-hosted, dsb-builder, linux, x64]
runs-on: ${{ inputs.runs-on || fromJSON('["self-hosted", "dsb-builder", "linux", "x64"]') }}
defaults:
run:
shell: bash
Expand All @@ -91,7 +104,7 @@ jobs:
create-matrix:
name: Create build matrix
needs: check-docker-disk-space
runs-on: [self-hosted, dsb-builder, linux, x64]
runs-on: ${{ inputs.runs-on || fromJSON('["self-hosted", "dsb-builder", "linux", "x64"]') }}
defaults:
run:
shell: bash
Expand Down Expand Up @@ -133,7 +146,8 @@ jobs:
build-deploy:
name: Build and deploy
needs: create-matrix
runs-on: [self-hosted, dsb-builder, linux, x64]
# per-app 'runs-on' wins, else the global input, else the self-hosted default
runs-on: ${{ matrix.app-vars.runs-on || inputs.runs-on || fromJSON('["self-hosted", "dsb-builder", "linux", "x64"]') }}
strategy:
matrix: ${{ fromJSON(needs.create-matrix.outputs.app-vars-matrix) }}
fail-fast: false
Expand Down Expand Up @@ -468,7 +482,7 @@ jobs:
if: |
(github.event_name == 'push' || github.event_name == 'workflow_dispatch' )
needs: [create-matrix, build-deploy]
runs-on: [self-hosted, dsb-builder, linux, x64]
runs-on: ${{ inputs.runs-on || fromJSON('["self-hosted", "dsb-builder", "linux", "x64"]') }}
defaults:
run:
shell: bash
Expand Down Expand Up @@ -546,7 +560,7 @@ jobs:
&&
( github.event_name != 'pull_request' || github.event.action == 'closed' )
needs: [create-matrix, build-deploy]
runs-on: [self-hosted, dsb-builder, linux, x64]
runs-on: ${{ inputs.runs-on || fromJSON('["self-hosted", "dsb-builder", "linux", "x64"]') }}
defaults:
run:
shell: bash
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/maven-artifacts-pruner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ name: "DSB retention policy for maven artifacts in GitHub Packages"
on:
workflow_call:
inputs:
runs-on:
type: string
required: false
# Empty (default) = the historical self-hosted pool, kept inside the workflow as a fromJSON
# fallback so callers that don't set this are unaffected. Any non-empty value is used as-is
# (like the terraform actions), so opting in is just a plain string — no JSON.
default: ""
description: |
Runner for the prune job, as a plain string: a single GitHub-hosted larger runner name
(matched by name), e.g. 'builder-app-platform-ghr-ubuntu-large'. Empty (default) uses the
self-hosted pool [self-hosted, dsb-builder, linux, x64]. The 'ci-cd-conclusion' gate
always runs on ubuntu-latest.
# for explanation of maven artifact pruning configuration see inputs of 'ci-cd/prune-maven-artifacts-in-repo/action.yml'
# sane defaults are defined but can be overridden pr. repo
release-prune-keep-min-count:
Expand Down Expand Up @@ -45,7 +57,7 @@ jobs:
prune-maven-artifacts:
name: Prune maven artifacts
# This job handles pruning of maven artifacts published in the calling repo
runs-on: [self-hosted, dsb-builder, linux, x64]
runs-on: ${{ inputs.runs-on || fromJSON('["self-hosted", "dsb-builder", "linux", "x64"]') }}
defaults:
run:
shell: bash
Expand Down