jamesnetherton commented on code in PR #4645:
URL: https://github.com/apache/camel-quarkus/pull/4645#discussion_r1134211824


##########
.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 ? If someone has light to share, that would 
be welcome.
   
   I think the suggestion made 
[here](https://github.com/jamesnetherton/camel-quarkus/commit/281c5789e68733dfcbf8e16da9c24adfc15b8b1e#r100230924),
 was that we want the relevant POM hierarchy installed before 
`cq.flatten-bom.format` runs. Thus `mvnw clean install -pl poms/bom -am 
-Dcq.flatten-bom.format` would be enough to do everything we need in one step.
   



-- 
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

Reply via email to