refactor: Extract shared PnP processor verify steps into a composite action - #400
Open
EvgheniPopusoi wants to merge 4 commits into
Open
EvgheniPopusoi wants to merge 4 commits into
EvgheniPopusoi wants to merge 4 commits into
Conversation
…action pnp-build-autopilot-processor-nested.yml and pnp-processor-build-image.yml duplicated the same setup/verify/lint prefix (checkout, secrets, gcloud, JDK setup, version, mvn verify, Kafka Streams Detekt lint). Extracts that into composite-actions/pnp/verify-processor and has both workflows call it, exposing the determined version as a step output for the remaining native-image/docker/pact/sonar steps that differ between the two. No behavior change: step order, conditions, and args are preserved in both callers; only the identical prefix moved into the composite action. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adopts pnp-processor-build-image.yml for GraalVM native image builds, following the same pattern used to derive pnp-build-native-autopilot-processor-nested.yml from pnp-build-autopilot-processor-nested.yml: splits test and native build-image into separate jobs (native compile runs on a 4-core runner with an 80 minute timeout), adds graalvm-version/distribution inputs, and bumps the default java-version to 25. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…kflows too Applies the same deduplication to pnp-build-native-autopilot-processor-nested.yml and pnp-processor-build-native-image.yml: their "test" jobs duplicated the same checkout/secrets/gcloud/JDK/version/verify/Kafka-lint prefix now extracted into composite-actions/pnp/verify-processor. Neither native workflow has the use-old-setup-java toggle, which the composite already defaults to false, so no input needed there. The separate build-image/release/deploy-staging jobs keep their own "Determine version" steps unchanged, since composite outputs don't cross job boundaries. No behavior change: step order, conditions, and args are preserved. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…sor-verify-composite-action # Conflicts: # .github/workflows/pnp-processor-build-native-image.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pnp-build-autopilot-processor-nested.ymlandpnp-processor-build-image.ymlduplicated the same setup/verify/lint prefix almost line-for-line: checkout,gcp-secret-manager,setup-gcloud, JDK setup (old/new toggle),Determine version,mvn verify, and the 5-step Kafka Streams Detekt lint blockcomposite-actions/pnp/verify-processor, following this repo's existingcomposite-actions/<clan>/<name>convention. It exposes the determinedversionas an output so downstream steps (native image packaging, Docker build) can still reference it viasteps.verify.outputs.versiontestjobs:pnp-build-native-autopilot-processor-nested.ymlandpnp-processor-build-native-image.yml(the latter added in feat: Add pnp-processor-build-native-image workflow for native builds #399, now merged tomaster— this branch is synced withmasterand the resulting add/add conflict on that file was resolved in favor of the composite-action version). Neither native workflow had theuse-old-setup-javatoggle; the composite action already defaults it tofalse, so no input is needed there.Non-goals / what I deliberately left alone
maven-argsvs implicit) — left as-is in each caller rather than risk changing Sonar plugin behavior for existing consumers-DskipTestsdiffer between files — left in each caller unchangedbuild-image/release/deploy-stagingjobs in the native workflows keep their ownDetermine versionsteps unchanged, since composite action outputs don't cross job boundariesTest plan
python3 -c "import yaml; yaml.safe_load(...)"on all changed/added filestest/build/build-imagejobs still pass and produce the same image tags🤖 Generated with Claude Code