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

Trying GH actions workflows in galasa-dev org #957

Closed
wants to merge 2 commits into from
Closed
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
44 changes: 44 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Main build

on:
workflow_dispatch:
pull_request:
branches: [main]

env:
NAMESPACE: galasa-dev

jobs:
build-managers:
name: Build and test Managers with Gradle
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: Build, Test and Publish Managers
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.GPG_KEYID }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSPHRASE }}
run: |
gradle -b galasa-managers-parent/build.gradle check publish --info \
-Dorg.gradle.jvmargs=-Xmx4096M \
-PsourceMaven=https://maven.pkg.github.com/${{env.NAMESPACE}}/extensions/ \
-PcentralMaven=https://repo.maven.apache.org/maven2/ \
-PtargetMaven=https://maven.pkg.github.com/${{env.NAMESPACE}}/managers/ \
-PjacocoEnabled=true \
-PisMainOrRelease=true
37 changes: 37 additions & 0 deletions .github/workflows/pr-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: PR build

on:
workflow_dispatch:
pull_request:
branches: [main]

env:
NAMESPACE: galasa-dev

jobs:
build-managers:
name: Build and test Managers with Gradle
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: Build and Test Managers
run: |
gradle -b galasa-managers-parent/build.gradle clean build \
-Dorg.gradle.jvmargs=-Xmx4096M \
-PsourceMaven=https://maven.pkg.github.com/${{env.NAMESPACE}}/extensions/ \
-PcentralMaven=https://repo.maven.apache.org/maven2/ \
-PtargetMaven=https://maven.pkg.github.com/${{env.NAMESPACE}}/managers/
12 changes: 8 additions & 4 deletions galasa-managers-parent/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ repositories {
}

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

Expand All @@ -74,8 +78,8 @@ if (jacocoEnabled.toBoolean()) {

if ("$targetMaven".startsWith('http')) {
credentials {
username System.getenv('MAVENUSERNAME')
password System.getenv('MAVENPASSWORD')
username System.getenv('GITHUB_ACTOR')
password System.getenv('GITHUB_TOKEN')
}
}
}
Expand Down Expand Up @@ -230,8 +234,8 @@ publishing {

if ("$targetMaven".startsWith('http')) {
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 @@ -58,6 +58,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 @@ -108,8 +112,8 @@ publishing {

if ("$targetMaven".startsWith('http')) {
credentials {
username System.getenv('MAVENUSERNAME')
password System.getenv('MAVENPASSWORD')
username System.getenv('GITHUB_ACTOR')
password System.getenv('GITHUB_TOKEN')
}
}
}
Expand Down
Loading