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

Commit

Permalink
Try gh workflow in galasa-dev
Browse files Browse the repository at this point in the history
Signed-off-by: Jade Carino <[email protected]>
  • Loading branch information
jadecarino committed Jul 15, 2024
1 parent 60d5d37 commit 4c1f247
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Main build

on:
workflow_dispatch:
pull_request:
branches: [main]

env:
NAMESPACE: galasa-dev

jobs:
build-extensions:
name: Build and test Extensions
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup JDK
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'semeru'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 6.9.2

- name: Test and Build Extensions using gradle
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ github.token }}
run: |
gradle -x sign -b galasa-extensions-parent/build.gradle check publish --info \
-PsourceMaven=https://development.galasa.dev/main/maven-repo/framework \
-PcentralMaven=https://repo.maven.apache.org/maven2/ \
-PtargetMaven=https://maven.pkg.github.com/${{env.NAMESPACE}}/extensions/ \
-PjacocoEnabled=true \
-PisMainOrRelease=true
36 changes: 36 additions & 0 deletions .github/workflows/pr-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: PR build

on:
workflow_dispatch:
pull_request:
branches: [main]

env:
NAMESPACE: galasa-dev

jobs:
build-extensions:
name: Build, test and publish Extensions
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup JDK
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'semeru'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 6.9.2

- name: Test and Build Extensions using gradle
run: |
gradle -b galasa-extensions-parent/build.gradle clean build --scan \
-PsourceMaven=https://development.galasa.dev/main/maven-repo/framework \
-PcentralMaven=https://repo.maven.apache.org/maven2/ \
-PtargetMaven=https://maven.pkg.github.com/${{env.NAMESPACE}}/extensions/
11 changes: 11 additions & 0 deletions galasa-extensions-parent/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ plugins {
id 'biz.aQute.bnd.builder' version '5.3.0' apply false
id 'dev.galasa.githash' version '0.15.0' apply false
id 'maven-publish'
// id 'signing'
}

version = '0.15.0'
Expand All @@ -13,6 +14,14 @@ task clean {
}
}

// signing {
// def signingKeyId = findProperty("signingKeyId")
// def signingKey = findProperty("signingKey")
// def signingPassword = findProperty("signingPassword")
// useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
// sign publishing.publications
// }

//---------------------------------------------------------------
// We need to gather the release and packaging metadata from each
// sub-project, to generate a release.yaml document which can act
Expand Down Expand Up @@ -201,6 +210,8 @@ publishing {
credentials {
username System.getenv('MAVENUSERNAME')
password System.getenv('MAVENPASSWORD')
// username System.getenv('GITHUB_ACTOR')
// password System.getenv('GITHUB_TOKEN')
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ repositories {
}

signing {
// def signingKeyId = findProperty("signingKeyId")
// def signingKey = findProperty("signingKey")
// def signingPassword = findProperty("signingPassword")
// useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
sign publishing.publications
}

Expand Down Expand Up @@ -109,6 +113,8 @@ publishing {
credentials {
username System.getenv('MAVENUSERNAME')
password System.getenv('MAVENPASSWORD')
// username System.getenv('GITHUB_ACTOR')
// password System.getenv('GITHUB_TOKEN')
}
}
}
Expand Down

0 comments on commit 4c1f247

Please sign in to comment.