From ece45cd65a8887dff1691f7ffd8c1adfbca0a3e1 Mon Sep 17 00:00:00 2001 From: dhruv Date: Thu, 22 Aug 2024 10:25:26 +0530 Subject: [PATCH 1/4] added build log generation/uploading Signed-off-by: dhruv --- .github/workflows/build.yaml | 28 ++++++++++++++++++++++------ .github/workflows/pr-build.yaml | 8 ++++---- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 71621ac..df3e9d3 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -20,7 +20,7 @@ jobs: - name: Setup JDK uses: actions/setup-java@v4 with: - java-version: '11' + java-version: '17' distribution: 'semeru' cache: maven @@ -31,25 +31,41 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 with: - gradle-version: 6.9.2 + gradle-version: 8.9 - name: Build Integration Tests Gradle source code run: | - gradle -b galasa-inttests-parent/build.gradle publish publishToMavenLocal \ + set -o pipefail + gradle -b galasa-inttests-parent/build.gradle publish publishToMavenLocal --info \ -PsourceMaven=https://development.galasa.dev/gh/maven-repo/obr \ -PcentralMaven=https://repo.maven.apache.org/maven2/ \ - -PtargetMaven=${{github.workspace}}/repo + -PtargetMaven=${{github.workspace}}/repo 2>&1 | tee gradle-build.log + + - name: Upload Maven Build Log + if: always() + uses: actions/upload-artifact@v4 + with: + name: gradle-build-log + path: gradle-build.log - name: Building Integration Tests Maven source code run: | - mvn -f galasa-inttests-parent/dev.galasa.inttests.obr/pom.xml deploy \ + set -o pipefail + mvn -f galasa-inttests-parent/dev.galasa.inttests.obr/pom.xml -X deploy \ -Dgalasa.source.repo=https://development.galasa.dev/gh/maven-repo/obr \ -Dgalasa.central.repo=https://repo.maven.apache.org/maven2/ \ -Dgalasa.release.repo=file:${{ github.workspace }}/repo \ -Dgalasa.skip.deploytestcatalog=true \ -Dgalasa.skip.bundletestcatalog=false \ --batch-mode --errors --fail-at-end \ - --settings ${{github.workspace}}/settings.xml + --settings ${{github.workspace}}/settings.xml 2>&1 | maven-build.log + + - name: Upload Maven Build Log + if: always() + uses: actions/upload-artifact@v4 + with: + name: maven-build-log + path: maven-build.log - name: Login to Github Container Registry uses: docker/login-action@v3 diff --git a/.github/workflows/pr-build.yaml b/.github/workflows/pr-build.yaml index 8d7df2b..19b4d11 100644 --- a/.github/workflows/pr-build.yaml +++ b/.github/workflows/pr-build.yaml @@ -16,7 +16,7 @@ jobs: - name: Setup JDK uses: actions/setup-java@v4 with: - java-version: '11' + java-version: '17' distribution: 'semeru' cache: maven @@ -27,18 +27,18 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 with: - gradle-version: 6.9.2 + gradle-version: 8.9 - name: Build Integration Tests Gradle source code run: | - gradle -b galasa-inttests-parent/build.gradle publish publishToMavenLocal \ + gradle -b galasa-inttests-parent/build.gradle publish publishToMavenLocal --info \ -PsourceMaven=https://development.galasa.dev/gh/maven-repo/obr \ -PcentralMaven=https://repo.maven.apache.org/maven2/ \ -PtargetMaven=${{github.workspace}}/repo - name: Building Integration Tests Maven source code run: | - mvn -f galasa-inttests-parent/dev.galasa.inttests.obr/pom.xml deploy -Dgpg.skip=true \ + mvn -f galasa-inttests-parent/dev.galasa.inttests.obr/pom.xml -X deploy -Dgpg.skip=true \ -Dgalasa.source.repo=https://development.galasa.dev/gh/maven-repo/obr \ -Dgalasa.central.repo=https://repo.maven.apache.org/maven2/ \ -Dgalasa.release.repo=file:${{ github.workspace }}/repo \ From 59ec5bb5c92dfa129a0932df382a8e3d940a7b85 Mon Sep 17 00:00:00 2001 From: dhruv Date: Thu, 22 Aug 2024 19:16:49 +0530 Subject: [PATCH 2/4] made required changes Signed-off-by: dhruv --- .github/workflows/build.yaml | 8 +++++--- .github/workflows/pr-build.yaml | 24 ++++++++++++++++++++---- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index df3e9d3..665c59c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -41,12 +41,13 @@ jobs: -PcentralMaven=https://repo.maven.apache.org/maven2/ \ -PtargetMaven=${{github.workspace}}/repo 2>&1 | tee gradle-build.log - - name: Upload Maven Build Log - if: always() + - name: Upload Gradle Build Log + if: failure() uses: actions/upload-artifact@v4 with: name: gradle-build-log path: gradle-build.log + retention-days: 7 - name: Building Integration Tests Maven source code run: | @@ -61,11 +62,12 @@ jobs: --settings ${{github.workspace}}/settings.xml 2>&1 | maven-build.log - name: Upload Maven Build Log - if: always() + if: failure() uses: actions/upload-artifact@v4 with: name: maven-build-log path: maven-build.log + retention-days: 7 - name: Login to Github Container Registry uses: docker/login-action@v3 diff --git a/.github/workflows/pr-build.yaml b/.github/workflows/pr-build.yaml index 19b4d11..9b1a311 100644 --- a/.github/workflows/pr-build.yaml +++ b/.github/workflows/pr-build.yaml @@ -31,11 +31,20 @@ jobs: - name: Build Integration Tests Gradle source code run: | + set -o pipefail gradle -b galasa-inttests-parent/build.gradle publish publishToMavenLocal --info \ -PsourceMaven=https://development.galasa.dev/gh/maven-repo/obr \ -PcentralMaven=https://repo.maven.apache.org/maven2/ \ - -PtargetMaven=${{github.workspace}}/repo + -PtargetMaven=${{github.workspace}}/repo 2>&1 | tee gradle-build.log + - name: Upload Gradle Build Log + if: failure() + uses: actions/upload-artifact@v4 + with: + name: gradle-build-log + path: gradle-build.log + retention-days: 7 + - name: Building Integration Tests Maven source code run: | mvn -f galasa-inttests-parent/dev.galasa.inttests.obr/pom.xml -X deploy -Dgpg.skip=true \ @@ -45,9 +54,16 @@ jobs: -Dgalasa.skip.deploytestcatalog=true \ -Dgalasa.skip.bundletestcatalog=false \ --batch-mode --errors --fail-at-end \ - --settings ${{github.workspace}}/settings.xml - - + --settings ${{github.workspace}}/settings.xml 2>&1 | maven-build.log + + - name: Upload Maven Build Log + if: failure() + uses: actions/upload-artifact@v4 + with: + name: maven-build-log + path: maven-build.log + retention-days: 7 + - name: Build Integration Tests image for testing uses: docker/build-push-action@v5 with: From 9d92bb08c89edcb7d33dc197b1e4efa2b3693fca Mon Sep 17 00:00:00 2001 From: dhruv Date: Thu, 22 Aug 2024 19:18:42 +0530 Subject: [PATCH 3/4] made required changes Signed-off-by: dhruv --- .github/workflows/build.yaml | 4 ++-- .github/workflows/pr-build.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 665c59c..63b3dd5 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -45,7 +45,7 @@ jobs: if: failure() uses: actions/upload-artifact@v4 with: - name: gradle-build-log + name: inttests-gradle-build-log path: gradle-build.log retention-days: 7 @@ -65,7 +65,7 @@ jobs: if: failure() uses: actions/upload-artifact@v4 with: - name: maven-build-log + name: inttests-obr-maven-build-log path: maven-build.log retention-days: 7 diff --git a/.github/workflows/pr-build.yaml b/.github/workflows/pr-build.yaml index 9b1a311..a6c9270 100644 --- a/.github/workflows/pr-build.yaml +++ b/.github/workflows/pr-build.yaml @@ -41,7 +41,7 @@ jobs: if: failure() uses: actions/upload-artifact@v4 with: - name: gradle-build-log + name: inttests-gradle-build-log path: gradle-build.log retention-days: 7 @@ -60,7 +60,7 @@ jobs: if: failure() uses: actions/upload-artifact@v4 with: - name: maven-build-log + name: inttests-obr-maven-build-log path: maven-build.log retention-days: 7 From 1e51ec84e348135e8986f045421c1fe0980b20fd Mon Sep 17 00:00:00 2001 From: dhruv Date: Thu, 22 Aug 2024 19:24:10 +0530 Subject: [PATCH 4/4] made required changes Signed-off-by: dhruv --- .github/workflows/build.yaml | 2 +- .github/workflows/pr-build.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 63b3dd5..5845544 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -59,7 +59,7 @@ jobs: -Dgalasa.skip.deploytestcatalog=true \ -Dgalasa.skip.bundletestcatalog=false \ --batch-mode --errors --fail-at-end \ - --settings ${{github.workspace}}/settings.xml 2>&1 | maven-build.log + --settings ${{github.workspace}}/settings.xml 2>&1 | tee maven-build.log - name: Upload Maven Build Log if: failure() diff --git a/.github/workflows/pr-build.yaml b/.github/workflows/pr-build.yaml index a6c9270..0b24e5e 100644 --- a/.github/workflows/pr-build.yaml +++ b/.github/workflows/pr-build.yaml @@ -54,7 +54,7 @@ jobs: -Dgalasa.skip.deploytestcatalog=true \ -Dgalasa.skip.bundletestcatalog=false \ --batch-mode --errors --fail-at-end \ - --settings ${{github.workspace}}/settings.xml 2>&1 | maven-build.log + --settings ${{github.workspace}}/settings.xml 2>&1 | tee maven-build.log - name: Upload Maven Build Log if: failure()