Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iss2052 - Implement platform in maven #81

Merged
merged 2 commits into from
Nov 27, 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
8 changes: 8 additions & 0 deletions .github/workflows/maven.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ jobs:
run: |
cp /home/runner/work/secrets/settings.xml /home/runner/work/gpg/settings.xml

- name: Download platform from this workflow
id: download-platform
continue-on-error: true
uses: actions/download-artifact@v4
with:
name: platform
path: modules/artifacts

- name: Download gradle artifacts from this workflow
id: download-gradle
continue-on-error: true
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/pr-maven.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
description: 'True if this module has been changed and should be rebuilt'
required: true
type: string
platform-artifact-id:
description: 'The Workflow Run ID of the last workflow containing artifacts for the platform'
required: true
type: string
gradle-artifact-id:
description: 'The Workflow Run ID of the last workflow containing artifacts for the gradle module'
required: true
Expand Down Expand Up @@ -87,6 +91,14 @@ jobs:
# For any modules that were changed in this PR,
# download their artifacts from this workflow run.

- name: Download platform from this workflow
id: download-platform
continue-on-error: true
uses: actions/download-artifact@v4
with:
name: platform
path: modules/artifacts

- name: Download gradle artifacts from this workflow
id: download-gradle
continue-on-error: true
Expand All @@ -98,6 +110,15 @@ jobs:
# For any modules that weren't changed in this PR,
# download artifacts from the last successful workflow.

- name: Download platform from last successful workflow
if: ${{ steps.download-platform.outcome == 'failure' }}
uses: actions/download-artifact@v4
with:
name: platform
path: modules/artifacts
github-token: ${{ github.token }}
run-id: ${{ inputs.platform-artifact-id }}

- name: Download gradle artifacts from last successful workflow
if: ${{ steps.download-gradle.outcome == 'failure' }}
uses: actions/download-artifact@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pull-requests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ jobs:
with:
changed: ${{ needs.get-changed-modules.outputs.maven_changed }}
gradle-artifact-id: ${{ needs.find-artifacts.outputs.gradle_artifacts_id }}
platform-artifact-id: ${{ needs.find-artifacts.outputs.platform_artifacts_id }}

pr-build-framework:
name: Build the 'framework' module
Expand Down
127 changes: 14 additions & 113 deletions modules/maven/galasa-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>dev.galasa</groupId>
<artifactId>galasa-maven-plugin</artifactId>
<packaging>maven-plugin</packaging>
<version>0.34.0</version>
<version>0.38.0</version>

<name>Galasa Maven Plugin</name>
<description>Maven plugin for build Galasa artifacts such as the OBR, Test Catalog</description>
Expand Down Expand Up @@ -61,118 +61,19 @@
<dependencies>
<dependency>
<groupId>dev.galasa</groupId>
<artifactId>dev.galasa.plugin.common</artifactId>
<version>0.33.0</version>
<artifactId>dev.galasa.platform</artifactId>
<version>0.38.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>

<dependency>
<groupId>dev.galasa</groupId>
<artifactId>dev.galasa.plugin.common.impl</artifactId>
<version>0.33.0</version>
</dependency>

<dependency>
<groupId>dev.galasa</groupId>
<artifactId>dev.galasa.plugin.common.test</artifactId>
<version>0.33.0</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.11.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>3.6.2</version>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-shared-utils</artifactId>
<version>3.4.2</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>3.6.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-compat</artifactId>
<version>3.9.6</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-testing</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
<scope>test</scope>
<version>3.3.0</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.16.1</version>
</dependency>

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.15.1</version>
</dependency>

<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.bundlerepository</artifactId>
<version>2.0.10</version>
</dependency>

<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>0.9.11</version>
</dependency>

<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
</dependency>

<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.25.3</version>
</dependency>

<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.16</version>
</dependency>

<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.14</version>
</dependency>

</dependencies>
</dependencyManagement>


<dependencies>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
Expand All @@ -185,6 +86,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
Expand All @@ -193,10 +95,12 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-testing</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
Expand All @@ -206,27 +110,23 @@
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>

<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.bundlerepository</artifactId>
</dependency>

<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
</dependency>

<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>

<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.25.3</version>
</dependency>

<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
Expand All @@ -250,6 +150,7 @@
<dependency>
<groupId>dev.galasa</groupId>
<artifactId>dev.galasa.plugin.common.test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

Expand All @@ -273,8 +174,8 @@
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
</plugin>
</plugins>
</pluginManagement>
Expand Down Expand Up @@ -336,4 +237,4 @@
</plugins>
</build>

</project>
</project>
29 changes: 25 additions & 4 deletions modules/platform/dev.galasa.platform/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id 'java-platform'
id 'maven-publish'
id 'signing'
techcobweb marked this conversation as resolved.
Show resolved Hide resolved
}

version = "0.38.0"
Expand All @@ -9,9 +10,6 @@ javaPlatform {
allowDependencies()
}




dependencies {
constraints {
api 'com.auth0:java-jwt:4.4.0' // used by wrapper.
Expand Down Expand Up @@ -45,7 +43,7 @@ dependencies {

api 'commons-collections:commons-collections:3.2.2'

api 'commons-io:commons-io:2.16.1' // If updating, also update in galasa-boot build.gradlen and in obr/release.yaml.
api 'commons-io:commons-io:2.16.1' // If updating, also update in galasa-boot build.gradle and in obr/release.yaml.

api 'commons-lang:commons-lang:2.6'

Expand All @@ -54,6 +52,9 @@ dependencies {
api 'dev.galasa:dev.galasa:'+version
api 'dev.galasa:dev.galasa.framework:'+version
api 'dev.galasa:dev.galasa.platform:'+version
api 'dev.galasa:dev.galasa.plugin.common:'+version
api 'dev.galasa:dev.galasa.plugin.common.impl:'+version
api 'dev.galasa:dev.galasa.plugin.common.test:'+version
api 'dev.galasa:dev.galasa.wrapping.com.auth0.jwt:'+version
api 'dev.galasa:dev.galasa.wrapping.com.jcraft.jsch:'+version
api 'dev.galasa:dev.galasa.wrapping.gson:'+version // If updating, also update in obr/release.yaml.
Expand Down Expand Up @@ -127,8 +128,17 @@ dependencies {
api 'org.apache.logging.log4j:log4j-core:2.24.1' // If updating, also update in galasa-boot build.gradle.
api 'org.apache.logging.log4j:log4j-slf4j-impl:2.24.1'

api 'org.apache.maven:maven-artifact:3.9.6'
api 'org.apache.maven:maven-compat:3.6.2'
api 'org.apache.maven:maven-plugin-api:3.6.2'
api 'org.apache.maven:maven-repository-metadata:3.3.9'

api 'org.apache.maven.plugin-testing:maven-plugin-testing-harness:3.3.0'

api 'org.apache.maven.plugin-tools:maven-plugin-annotations:3.11.0'

api 'org.apache.maven.shared:maven-shared-utils:3.4.2'

api 'org.apache.tomcat:annotations-api:6.0.53'

api 'org.apache.velocity:velocity-engine-core:2.4.1'
Expand Down Expand Up @@ -174,6 +184,17 @@ dependencies {
}
}

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

tasks.withType(Sign) {
onlyIf { isMainOrRelease.toBoolean() }
}

publishing {
publications {
Expand Down
1 change: 1 addition & 0 deletions modules/platform/dev.galasa.platform/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
isMainOrRelease=false
4 changes: 4 additions & 0 deletions tools/get-changed-modules-pull-request.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,13 @@ function get_changed_modules_and_set_in_environment() {
if [[ "$module" == "platform" ]]; then
echo "PLATFORM_CHANGED=true" >> $GITHUB_OUTPUT
# Also rebuild modules that depend on the Platform...
echo "WRAPPING_CHANGED=true" >> $GITHUB_OUTPUT
echo "GRADLE_CHANGED=true" >> $GITHUB_OUTPUT
echo "MAVEN_CHANGED=true" >> $GITHUB_OUTPUT
echo "FRAMEWORK_CHANGED=true" >> $GITHUB_OUTPUT
# echo "EXTENSIONS_CHANGED=true" >> $GITHUB_OUTPUT # Not done yet
echo "MANAGERS_CHANGED=true" >> $GITHUB_OUTPUT
echo "OBR_CHANGED=true" >> $GITHUB_OUTPUT
continue
fi
if [[ "$module" == "buildutils" ]]; then
Expand Down
Loading