diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 74d1098..534cc0f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -119,11 +119,12 @@ jobs: --settings /home/runner/work/gpg/settings.xml 2>&1 | tee galasa-bom-build.log - name: Upload Galasa BOM Build Log - if: always() + if: failure() uses: actions/upload-artifact@v4 with: name: galasa-bom-build-log path: galasa-bom-build.log + retention-days: 7 - name: Generate Galasa OBR run: | @@ -144,11 +145,12 @@ jobs: --settings /home/runner/work/gpg/settings.xml 2>&1 | tee galasa-obr-build.log - name: Upload Galasa OBR Build Log - if: always() + if: failure() uses: actions/upload-artifact@v4 with: name: galasa-obr-build-log path: galasa-obr-build.log + retention-days: 7 - name: Login to Github Container Registry uses: docker/login-action@v3 @@ -277,11 +279,12 @@ jobs: --settings /home/runner/work/gpg/settings.xml 2>&1 | tee build.log - name: Upload javadoc site Build Log - if: always() + if: failure() uses: actions/upload-artifact@v4 with: name: javadoc-site-build-log path: build.log + retention-days: 7 - name: Login to Github Container Registry uses: docker/login-action@v3 @@ -436,11 +439,12 @@ jobs: --settings /home/runner/work/gpg/settings.xml 2>&1 | tee build.log - name: Upload galasa obr generic Build Log - if: always() + if: failure() uses: actions/upload-artifact@v4 with: name: galasa-obr-generic-build-log path: build.log + retention-days: 7 - name: Login to Github Container Registry uses: docker/login-action@v3 @@ -518,16 +522,16 @@ jobs: runs-on: ubuntu-latest steps: - - name: Triggering helm build (github.ref is main) - if: env.BRANCH == 'main' - env: - GH_TOKEN: ${{ secrets.GALASA_TEAM_GITHUB_TOKEN }} - run: | - gh workflow run build-helm.yaml --repo https://github.com/galasa-dev/automation --ref ${{ env.BRANCH }} + # - name: Triggering helm build (github.ref is main) + # if: ${{env.BRANCH}} == 'main' + # env: + # GH_TOKEN: ${{ secrets.GALASA_TEAM_GITHUB_TOKEN }} + # run: | + # gh workflow run build-helm.yaml --repo https://github.com/galasa-dev/automation --ref ${{ env.BRANCH }} - name: Triggering cli build (github.ref is not main) - if: env.BRANCH != 'main' + if: ${{env.BRANCH}} != 'main' env: GH_TOKEN: ${{ secrets.GALASA_TEAM_GITHUB_TOKEN }} run: | - gh workflow run build.yaml --repo https://github.com/galasa-dev/cli --ref ${{ env.BRANCH }} \ No newline at end of file + gh workflow run build.yml --repo https://github.com/galasa-dev/cli --ref ${{ env.BRANCH }} \ No newline at end of file diff --git a/.github/workflows/pr-build.yaml b/.github/workflows/pr-build.yaml index 7ec5a83..27fe519 100644 --- a/.github/workflows/pr-build.yaml +++ b/.github/workflows/pr-build.yaml @@ -96,13 +96,22 @@ jobs: - name: Build Galasa BOM with maven run: | + set -o pipefail mvn -f ${{ github.workspace }}/obr/galasa-bom/pom.xml -X deploy \ -Dgpg.skip=true \ -Dgalasa.source.repo=https://development.galasa.dev/gh/maven-repo/managers \ -Dgalasa.central.repo=https://repo.maven.apache.org/maven2/ \ -Dgalasa.release.repo=file:${{ github.workspace }}/obr/repo \ --batch-mode --errors --fail-at-end \ - --settings /home/runner/work/gpg/settings.xml + --settings /home/runner/work/gpg/settings.xml 2>&1 | tee galasa-bom-build.log + + - name: Upload Galasa BOM Build Log + if: failure() + uses: actions/upload-artifact@v4 + with: + name: galasa-bom-build-log + path: galasa-bom-build.log + retention-days: 7 - name: Generate Galasa OBR run: | @@ -114,13 +123,22 @@ jobs: - name: Build Galasa OBR with maven run: | + set -o pipefail mvn -f ${{ github.workspace }}/obr/dev.galasa.uber.obr/pom.xml -X deploy \ -Dgpg.skip=true \ -Dgalasa.source.repo=https://development.galasa.dev/gh/maven-repo/managers \ -Dgalasa.central.repo=https://repo.maven.apache.org/maven2/ \ -Dgalasa.release.repo=file:${{ github.workspace }}/obr/repo \ --batch-mode --errors --fail-at-end \ - --settings /home/runner/work/gpg/settings.xml + --settings /home/runner/work/gpg/settings.xml 2>&1 | tee galasa-obr-build.log + + - name: Upload Galasa OBR Build Log + if: failure() + uses: actions/upload-artifact@v4 + with: + name: galasa-obr-build-log + path: galasa-obr-build.log + retention-days: 7 - name: Build OBR image for testing uses: docker/build-push-action@v5 @@ -213,13 +231,22 @@ jobs: - name: Build javadoc site using maven run: | + set -o pipefail mvn -f ${{ github.workspace }}/obr/javadocs/pom.xml -X deploy \ -Dgpg.skip=true \ -Dgalasa.source.repo=https://development.galasa.dev/gh/maven-repo/managers \ -Dgalasa.central.repo=https://repo.maven.apache.org/maven2/ \ -Dgalasa.release.repo=file:${{ github.workspace }}/obr/javadocs/docker/repo \ -Dmaven.javadoc.failOnError=false --batch-mode --errors --fail-at-end \ - --settings /home/runner/work/gpg/settings.xml + --settings /home/runner/work/gpg/settings.xml 2>&1 | tee build.log + + - name: Upload javadoc site Build Log + if: failure() + uses: actions/upload-artifact@v4 + with: + name: javadoc-site-build-log + path: build.log + retention-days: 7 - name: Build Javadoc site image for testing uses: docker/build-push-action@v5 @@ -287,13 +314,22 @@ jobs: - name: Build Galasa OBR generic pom.xml with maven working-directory: ${{ github.workspace }}/obr/obr-generic run: | + set -o pipefail mvn -f pom.xml -X process-sources \ -Dgpg.skip=true \ -Dgalasa.source.repo=https://development.galasa.dev/gh/maven-repo/obr \ -Dgalasa.central.repo=https://repo.maven.apache.org/maven2/ \ dev.galasa:galasa-maven-plugin:0.15.0:obrembedded \ --batch-mode --errors --fail-at-end \ - --settings settings.xml + --settings settings.xml 2>&1 | build.log + + - name: Upload galasa obr generic Build Log + if: failure() + uses: actions/upload-artifact@v4 + with: + name: galasa-obr-generic-build-log + path: build.log + retention-days: 7 - name: Build OBR generic image for testing uses: docker/build-push-action@v5