Some projects need custom preparation / build / cleanup steps like installing additional tools (Go, node, ...), writing test config files, passing secrets as env variables to the build step or deleting resources afterwards.
Implementation
Add optional configuration options to .project-keeper.yml:
pre-build / preparations: list of build steps
custom-build / build: single build step
use run: mvn verify by default
use additional env if present
post-build / cleanup: list of build steps
Each option can have the following properties for a custom build step using GH action syntax (see GH documentation):
name: optional readable name
uses: optional GH action (-> e.g. allow installing other tools)
with: optional map of args for a GH action
run: multiline shell script
shell: optional shell type (bash, powershell, ...)
env: list of environment variables. This allows specifying GH secrets or matrix build variables
if: allow running for specific versions/OS/always()
Option questions
Naming of the configuration options?
Out of scope:
Customizing the "Next Java build" workflow by running mvn javadoc:javadoc instead of mvn package
Validation of custom build steps
Build steps will run during normal CI build and would fail there
Goal: Custom preparation / build / cleanup steps
Some projects need custom preparation / build / cleanup steps like installing additional tools (Go, node, ...), writing test config files, passing secrets as env variables to the build step or deleting resources afterwards.
Implementation
Add optional configuration options to
.project-keeper.yml
:run: mvn verify
by defaultenv
if presentEach option can have the following properties for a custom build step using GH action syntax (see GH documentation):
name:
optional readable nameuses:
optional GH action (-> e.g. allow installing other tools)with:
optional map of args for a GH actionrun:
multiline shell scriptshell:
optional shell type (bash, powershell, ...)env:
list of environment variables. This allows specifying GH secrets or matrix build variablesif:
allow running for specific versions/OS/always()Option questions
Out of scope:
mvn javadoc:javadoc
instead ofmvn package