diff --git a/docs/BUILD-CACHE.md b/docs/BUILD-CACHE.md index 7eb0900b0..c2312c7fe 100644 --- a/docs/BUILD-CACHE.md +++ b/docs/BUILD-CACHE.md @@ -205,7 +205,7 @@ This caching support helps significantly speed up Node.js builds by avoiding rep ### Example: Maven Dependencies -Maven caching is automatically enabled when using the `maven/configure-mirror` or `maven/pombump` pipelines. When a cache directory is mounted at `/var/cache/melange`, the pipelines automatically symlink `~/.m2/repository` to `/var/cache/melange/m2repository` so that Maven's default local repository is backed by the cache. +Maven caching is automatically enabled when using the `maven/configure-mirror` pipeline. When a cache directory is mounted at `/var/cache/melange`, the pipeline automatically symlinks `~/.m2/repository` to `/var/cache/melange/m2repository` so that Maven's default local repository is backed by the cache. To use Maven caching, simply provide a cache directory: diff --git a/pkg/build/pipelines/maven/README.md b/pkg/build/pipelines/maven/README.md index 5407bdd19..596873607 100755 --- a/pkg/build/pipelines/maven/README.md +++ b/pkg/build/pipelines/maven/README.md @@ -1,9 +1,9 @@ + # Pipeline Reference - [maven/configure-mirror](#mavenconfigure-mirror) -- [maven/pombump](#mavenpombump) ## maven/configure-mirror @@ -14,21 +14,5 @@ Configure GCP Maven Central mirror for faster downloads | Name | Required | Description | Default | | ---- | -------- | ----------- | ------- | -## maven/pombump - -Run pombump tool to update versions and properties in a Maven POM file - -### Inputs - -| Name | Required | Description | Default | -| ---- | -------- | ----------- | ------- | -| debug | false | Enable debug mode, which will print out the diffs of the pom.xml file after running pombump | false | -| dependencies | false | Dependencies to be used for updating the POM file via command line flag | | -| patch-file | false | Patches file to use for updating the POM file | ./pombump-deps.yaml | -| pom | false | Path to pom.xml | pom.xml | -| properties | false | Properties to update / add the POM file via command line flag | | -| properties-file | false | Properties file to be used for updating the POM file | ./pombump-properties.yaml | -| show-dependency-tree | false | Display a dependency tree for the existing pom.xml file | false | - \ No newline at end of file diff --git a/pkg/build/pipelines/maven/pombump.yaml b/pkg/build/pipelines/maven/pombump.yaml deleted file mode 100644 index fcefc88f0..000000000 --- a/pkg/build/pipelines/maven/pombump.yaml +++ /dev/null @@ -1,86 +0,0 @@ -name: Run pombump tool to update versions and properties in a Maven POM file -needs: - packages: - - busybox - - pombump - -inputs: - patch-file: - description: | - Patches file to use for updating the POM file - default: ./pombump-deps.yaml - properties-file: - description: | - Properties file to be used for updating the POM file - default: ./pombump-properties.yaml - dependencies: - description: | - Dependencies to be used for updating the POM file via command line flag - properties: - description: | - Properties to update / add the POM file via command line flag - pom: - description: | - Path to pom.xml - default: pom.xml - debug: - description: | - Enable debug mode, which will print out the diffs of the pom.xml file after running pombump - default: false - show-dependency-tree: - default: false - description: Display a dependency tree for the existing pom.xml file - -pipeline: - - runs: | - # Point Maven's default local repository to the melange cache so - # downloaded dependencies can be reused across builds. Uses a symlink - # instead of settings.xml so that builds which - # hardcode ~/.m2/repository paths (e.g. Cassandra's build-resolver.xml) - # keep working. - # Symlink both /root/.m2/repository (used by qemu runner where the - # build user is root) and $HOME/.m2/repository (used by bubblewrap/ - # docker where HOME=/home/build). - if [ -d "/var/cache/melange" ]; then - mkdir -p /var/cache/melange/m2repository - for m2dir in /root/.m2 "$HOME/.m2"; do - mkdir -p "$m2dir" - if [ ! -e "$m2dir/repository" ]; then - ln -s /var/cache/melange/m2repository "$m2dir/repository" - fi - done - fi - - PATCH_FILE_FLAG="" - PROPERTIES_FILE_FLAG="" - DEPENDENCIES_FLAG="" - PROPERTIES_FLAG="" - - if [ -f "${{inputs.patch-file}}" ]; then - PATCH_FILE_FLAG="--patch-file ${{inputs.patch-file}}" - fi - - if [ -f "${{inputs.properties-file}}" ]; then - PROPERTIES_FILE_FLAG="--properties-file ${{inputs.properties-file}}" - fi - - if [ -n "${{inputs.dependencies}}" ]; then - DEPENDENCIES_FLAG="--dependencies ${{inputs.dependencies}}" - fi - - if [ -n "${{inputs.properties}}" ]; then - PROPERTIES_FLAG="--properties ${{inputs.properties}}" - fi - - if [ "${{inputs.show-dependency-tree}}" = "true" ]; then - mvn dependency:tree - fi - - pombump ${{inputs.pom}} $PATCH_FILE_FLAG $PROPERTIES_FILE_FLAG $DEPENDENCIES_FLAG $PROPERTIES_FLAG > "${{inputs.pom}}.new" - - if [ "${{inputs.debug}}" = "true" ]; then - # If there are any differences, it will return a non-zero exit code, so we use `|| true` to ignore that - diff -w "${{inputs.pom}}" "${{inputs.pom}}.new" || true - fi - - mv "${{inputs.pom}}.new" ${{inputs.pom}} \ No newline at end of file