Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #982 from jaydee029/build
Browse files Browse the repository at this point in the history
Added build log and jacoco report generation/uploading
  • Loading branch information
jadecarino authored Aug 22, 2024
2 parents 103087e + 01c4270 commit a1ef630
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 6 deletions.
27 changes: 23 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,14 @@ jobs:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSPHRASE }}
run: |
gradle -b galasa-managers-parent/build.gradle check publish \
set -o pipefail
gradle -b galasa-managers-parent/build.gradle check publish --info \
-Dorg.gradle.jvmargs=-Xmx4096M \
-PsourceMaven=https://development.galasa.dev/${{ env.ARGO_APP_BRANCH }}/maven-repo/extensions \
-PcentralMaven=https://repo.maven.apache.org/maven2/ \
-PtargetMaven=${{github.workspace}}/repo \
-PjacocoEnabled=true \
-PisMainOrRelease=true
-PisMainOrRelease=true 2>&1 | tee build.log
- name: Build Managers source code
if: github.event_name == 'workflow_dispatch' # Use the input values provided by the workflow dispatch.
Expand All @@ -86,13 +87,31 @@ jobs:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSPHRASE }}
run: |
gradle -b galasa-managers-parent/build.gradle check publish \
set -o pipefail
gradle -b galasa-managers-parent/build.gradle check publish --info \
-Dorg.gradle.jvmargs=-Xmx4096M \
-PsourceMaven=https://development.galasa.dev/${{ env.ARGO_APP_BRANCH }}/maven-repo/extensions \
-PcentralMaven=https://repo.maven.apache.org/maven2/ \
-PtargetMaven=${{github.workspace}}/repo \
-PjacocoEnabled=${{ inputs.jacocoEnabled }} \
-PisMainOrRelease=${{ inputs.isMainOrRelease }}
-PisMainOrRelease=${{ inputs.isMainOrRelease }} 2>&1 | tee build.log
- name: Upload Gradle Build Log
if: failure()
uses: actions/upload-artifact@v4
with:
name: gradle-build-log
path: build.log
retention-days: 7

- name: Upload Jacoco Report
if: failure()
uses: actions/upload-artifact@v4
with:
name: jacoco-report
path: ${{github.workspace}}/galasa-managers-parent/**/**/build/reports/**/*.html
retention-days: 7
if-no-files-found: ignore

- name: Login to Github Container Registry
uses: docker/login-action@v3
Expand Down
22 changes: 20 additions & 2 deletions .github/workflows/pr-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,29 @@ jobs:

- name: Build Managers source code
run: |
gradle -b galasa-managers-parent/build.gradle check publish \
set -o pipefail
gradle -b galasa-managers-parent/build.gradle check publish --info \
-Dorg.gradle.jvmargs=-Xmx4096M \
-PsourceMaven=https://development.galasa.dev/gh/maven-repo/extensions \
-PcentralMaven=https://repo.maven.apache.org/maven2/ \
-PtargetMaven=${{github.workspace}}/repo
-PtargetMaven=${{github.workspace}}/repo 2>&1 | tee build.log
- name: Upload Gradle Build Log
if: failure()
uses: actions/upload-artifact@v4
with:
name: gradle-build-log
path: build.log
retention-days: 7

- name: Upload Jacoco Report
if: failure()
uses: actions/upload-artifact@v4
with:
name: jacoco-report
path: ${{github.workspace}}/galasa-managers-parent/**/**/build/reports/**/*.html
retention-days: 7
if-no-files-found: ignore

- name: Build Managers image for testing
uses: docker/build-push-action@v5
Expand Down

0 comments on commit a1ef630

Please sign in to comment.