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

Customize build steps in release.yml and ci-build.yml #519

Closed
kaklakariada opened this issue Jan 24, 2024 · 0 comments · Fixed by #564
Closed

Customize build steps in release.yml and ci-build.yml #519

kaklakariada opened this issue Jan 24, 2024 · 0 comments · Fixed by #564
Assignees
Labels
feature Product feature

Comments

@kaklakariada
Copy link
Collaborator

kaklakariada commented Jan 24, 2024

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:

    • 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
@kaklakariada kaklakariada added the feature Product feature label Jan 24, 2024
@kaklakariada kaklakariada self-assigned this Jan 24, 2024
kaklakariada added a commit that referenced this issue Mar 27, 2024
kaklakariada added a commit that referenced this issue Mar 27, 2024
kaklakariada added a commit that referenced this issue Mar 27, 2024
kaklakariada added a commit that referenced this issue Apr 3, 2024
* #519: Add configuration for step customization

* Improve error messages
kaklakariada added a commit that referenced this issue Apr 3, 2024
kaklakariada added a commit that referenced this issue Apr 5, 2024
kaklakariada added a commit that referenced this issue Apr 5, 2024
kaklakariada added a commit that referenced this issue Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Product feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant