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

Added test report generation/uploading , fixed java version, added workflow triggers #170

Merged
merged 7 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 73 additions & 10 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '11'
java-version: '17'
distribution: 'semeru'
cache: maven

Expand Down Expand Up @@ -110,12 +110,21 @@ jobs:

- name: Build Galasa BOM with maven
run: |
mvn -f ${{ github.workspace }}/obr/galasa-bom/pom.xml deploy \
set -o pipefail
mvn -f ${{ github.workspace }}/obr/galasa-bom/pom.xml -X deploy \
-Dgalasa.source.repo=https://development.galasa.dev/${{ env.ARGO_APP_BRANCH }}/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: |
Expand All @@ -127,12 +136,21 @@ jobs:

- name: Build Galasa OBR with maven
run: |
mvn -f ${{ github.workspace }}/obr/dev.galasa.uber.obr/pom.xml deploy \
set -o pipefail
mvn -f ${{ github.workspace }}/obr/dev.galasa.uber.obr/pom.xml -X deploy \
-Dgalasa.source.repo=https://development.galasa.dev/${{ env.ARGO_APP_BRANCH }}/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: Login to Github Container Registry
uses: docker/login-action@v3
Expand Down Expand Up @@ -203,7 +221,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '18'
java-version: '17'
distribution: 'semeru'
cache: maven

Expand Down Expand Up @@ -252,12 +270,21 @@ jobs:

- name: Build javadoc site using maven
run: |
mvn -f ${{ github.workspace }}/obr/javadocs/pom.xml deploy \
set -o pipefail
mvn -f ${{ github.workspace }}/obr/javadocs/pom.xml -X deploy \
-Dgalasa.source.repo=https://development.galasa.dev/${{ env.ARGO_APP_BRANCH }}/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: Login to Github Container Registry
uses: docker/login-action@v3
Expand Down Expand Up @@ -350,6 +377,13 @@ jobs:
path: managers
ref: ${{ env.BRANCH }}

- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'semeru'
cache: maven

- name: Make secrets directory
run : |
mkdir /home/runner/work/secrets
Expand Down Expand Up @@ -396,12 +430,21 @@ jobs:
- name: Build Galasa OBR generic pom.xml with maven
working-directory: ${{ github.workspace }}/obr/obr-generic
run: |
mvn -f pom.xml process-sources \
set -o pipefail
mvn -f pom.xml -X process-sources \
-Dgalasa.source.repo=https://development.galasa.dev/${{ env.ARGO_APP_BRANCH }}/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 /home/runner/work/gpg/settings.xml
--settings /home/runner/work/gpg/settings.xml 2>&1 | tee 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: Login to Github Container Registry
uses: docker/login-action@v3
Expand Down Expand Up @@ -472,3 +515,23 @@ jobs:
tag=${{ env.BRANCH }}
dockerRepository=${{ env.REGISTRY }}
platform=x86_64

trigger-workflow:
name: Trigger workflow depending upon the branch
needs: [build-obr, build-obr-generic, build-obr-javadocs]
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 cli build (github.ref is not main)
if: ${{env.BRANCH}} != 'main'
env:
GH_TOKEN: ${{ secrets.GALASA_TEAM_GITHUB_TOKEN }}
run: |
gh workflow run build.yml --repo https://github.com/galasa-dev/cli --ref ${{ env.BRANCH }}
63 changes: 53 additions & 10 deletions .github/workflows/pr-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '11'
java-version: '17'
distribution: 'semeru'
cache: maven

Expand Down Expand Up @@ -96,13 +96,22 @@ jobs:

- name: Build Galasa BOM with maven
run: |
mvn -f ${{ github.workspace }}/obr/galasa-bom/pom.xml deploy \
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: |
Expand All @@ -114,13 +123,22 @@ jobs:

- name: Build Galasa OBR with maven
run: |
mvn -f ${{ github.workspace }}/obr/dev.galasa.uber.obr/pom.xml deploy \
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
Expand Down Expand Up @@ -164,7 +182,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '18'
java-version: '17'
distribution: 'semeru'
cache: maven

Expand Down Expand Up @@ -213,13 +231,22 @@ jobs:

- name: Build javadoc site using maven
run: |
mvn -f ${{ github.workspace }}/obr/javadocs/pom.xml deploy \
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
Expand Down Expand Up @@ -276,17 +303,33 @@ jobs:
- name: Display Galasa OBR generic pom.xml
run: |
cat ${{ github.workspace }}/obr/obr-generic/pom.xml

- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'semeru'
cache: maven

- name: Build Galasa OBR generic pom.xml with maven
working-directory: ${{ github.workspace }}/obr/obr-generic
run: |
mvn -f pom.xml process-sources \
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
Expand Down
Loading