ppalaga commented on code in PR #4645: URL: https://github.com/apache/camel-quarkus/pull/4645#discussion_r1144537280
########## .github/workflows/ci-build.yaml: ########## @@ -57,9 +57,74 @@ env: TESTCONTAINERS_RYUK_DISABLED: true jobs: - initial-mvn-install: + pre-build-checks: if: github.repository == 'apache/camel-quarkus' runs-on: ubuntu-latest + outputs: + continue-build: ${{ steps.pre-build-checks.outputs.continue-build }} + run-checks: ${{ steps.init.outputs.run-checks }} + steps: + - name: Initialize + id: init + run: | + if [[ "${{ github.event_name }}" == "pull_request" ]] && [[ "${{ github.actor }}" == "dependabot[bot]" ]]; then + echo "run-checks=true" >> $GITHUB_OUTPUT + else + echo "run-checks=false" >> $GITHUB_OUTPUT + fi + - name: Set up JDK 17 + uses: actions/setup-java@v2 + if: steps.init.outputs.run-checks == 'true' + with: + distribution: 'temurin' + java-version: '17' + - name: Checkout + uses: actions/checkout@v2 + if: steps.init.outputs.run-checks == 'true' + with: + ref: ${{ github.head_ref }} + fetch-depth: 0 + - name: Pre build checks + id: pre-build-checks + run: | + if [[ "${{ steps.init.outputs.run-checks }}" == "true" ]]; then + ./mvnw cq:sync-versions -N ${CQ_MAVEN_ARGS} + ./mvnw clean install -N ${CQ_MAVEN_ARGS} + + cd poms + ../mvnw clean install -N ${CQ_MAVEN_ARGS} + + cd bom + ../../mvnw process-resources -Dcq.flatten-bom.format --fail-never ${CQ_MAVEN_ARGS} + ../../mvnw clean install ${CQ_MAVEN_ARGS} + + cd ../../ Review Comment: > The flatten-bom default to process-resources phase and is not installed in the first "mvn clean install" line ? Yes, and I know no way how to do it better. The problem is that `-Dcq.flatten-bom.format` may add some exclusions and other edits to the source `pom.xml` that the further flattening does not see, because it uses Maven APIs to get the entries of the flattened POM. Maven APIs read the source pom.xml file only once before I do the edits. So currently, if `-Dcq.flatten-bom.format` does some edits, it throws an exception that recommends the user to invoke `mnv install` again. `--fail-never` is thus need so that it does not fail the whole CI job. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org