Skip to content

Commit

Permalink
Move tests that use the SEM manager into a separate subproject
Browse files Browse the repository at this point in the history
Signed-off-by: Eamonn Mansour <[email protected]>
  • Loading branch information
eamansour committed Sep 20, 2024
1 parent a8aeacc commit f3e6095
Show file tree
Hide file tree
Showing 29 changed files with 236 additions and 55 deletions.
19 changes: 6 additions & 13 deletions build-locally.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function gradle_build {
-Dorg.gradle.java.home=${JAVA_HOME} \
-PsourceMaven=https://development.galasa.dev/main/maven-repo/obr ${OPTIONAL_DEBUG_FLAG} \
-PcentralMaven=https://repo.maven.apache.org/maven2/ \
publish publishToMavenLocal \
build publishToMavenLocal \
"

info "Using this command: $cmd"
Expand All @@ -136,29 +136,22 @@ function gradle_build {
success "Built OK"
}

function publish_artifacts {
h2 "Publishing using Maven..."
function build_obr {
h2 "Building OBR using Maven..."
cd ${BASEDIR}/galasa-inttests-parent/dev.galasa.inttests.obr

context=inttests/galasa-inttests-parent/dev.galasa.inttests.obr
bootstrap=https://galasa-ecosystem1.galasa.dev/api/bootstrap

cmd="mvn \
-Dgalasa.source.repo=https://development.galasa.dev/main/maven-repo/obr \
-Dgalasa.central.repo=https://repo.maven.apache.org/maven2/ \
-Dgalasa.release.repo=file://$BASEDIR/temp \
-Dgalasa.bootstrap=${bootstrap} \
-Dgalasa.skip.deploytestcatalog=true \
-Dgalasa.skip.bundletestcatalog=false \
deploy dev.galasa:galasa-maven-plugin:deploytestcat \
install
"

info "Using this command: $cmd"
$cmd 2>&1 >> ${log_file}
rc=$? ; if [[ "${rc}" != "0" ]]; then error "Failed to build ${project} log is at ${log_file}" ; exit 1 ; fi
success "Published to '${bootstrap}' OK"
success "Built ${project} OBR OK"
}

mkdir -p $BASEDIR/temp
gradle_build
publish_artifacts
build_obr
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// This section tells gradle which gradle plugins to use to build this project.
plugins {
id 'base'
id 'maven-publish'
id 'dev.galasa.obr' version '0.36.0'
id 'dev.galasa.testcatalog' version '0.36.0'
}

// Set the variables which will control what the built OSGi bundle will be called
// and the name it will be published under in the maven repository.
group = 'dev.galasa'
version = '0.38.0'

// What are the dependencies of the obr ?
dependencies {
bundle project(':dev.galasa.internal.inttests')
}

def testcatalog = file('build/testcatalog.json')
def obrFile = file('build/galasa.obr')


tasks.withType(PublishToMavenLocal) { task ->
task.dependsOn genobr
task.dependsOn mergetestcat
}

// Tell gradle to publish the built OBR as a maven artifact on the
// local maven repository.
publishing {
publications {
maven(MavenPublication) {
artifact obrFile
artifact (testcatalog) {
classifier "testcatalog"
extension "json"
}
}
}
repositories {
maven {
url "$targetMaven"

if ("$targetMaven".startsWith('http')) {
credentials {
username System.getenv('GITHUB_ACTOR')
password System.getenv('GITHUB_TOKEN')
}
}
}
}
}

// If we are deploying a test catalog using the galasa plugin,
// directly to the ecosystem, then we can get the properties
// we need from the system properties, passed on the command line using
// -DGALASA_STREAM=xxx -DGALASA_BOOTSTRAP=xxx -DGALASA_TOKEN=xxx
deployTestCatalog {
bootstrap = System.getProperty("GALASA_BOOTSTRAP")
stream = System.getProperty("GALASA_STREAM")
token = System.getProperty("GALASA_TOKEN");
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Bundle-Version: 0.0.1-SNAPSHOT
Bundle-Name: dev.galasa.internal.inttests
Import-Package: *
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// This section tells gradle which gradle plugins to use to build this project.
plugins {
id 'java'
id 'maven-publish'
id 'dev.galasa.tests' version '0.36.0'
id 'biz.aQute.bnd.builder' version '6.4.0'
}

// This section tells gradle where it should look for any dependencies
repositories {
mavenLocal()
mavenCentral()
maven {
url "$sourceMaven"
}
maven {
url "$internalMaven"
}

}

// Set the variables which will control what the built OSGi bundle will be called
// and the name it will be published under in the maven repository.
group = 'dev.galasa'
version = '0.38.0'

// What are the dependencies of the test code ?
// When more managers and dependencies are added, this list will need to grow.
dependencies {
implementation platform('dev.galasa:galasa-bom:0.38.0')

implementation 'dev.galasa:dev.galasa'
implementation 'dev.galasa:dev.galasa.framework'
implementation 'dev.galasa:dev.galasa.core.manager'
implementation 'commons-logging:commons-logging'
implementation 'org.assertj:assertj-core'

implementation 'dev.galasa:dev.galasa.galasaecosystem.manager'
implementation 'dev.galasa:dev.galasa.sem.manager'
implementation 'dev.galasa:dev.galasa.cicsts.manager'
implementation 'dev.galasa:dev.galasa.sdv.manager'
implementation 'dev.galasa:dev.galasa.zosprogram.manager'

implementation 'com.google.code.gson:gson:2.10.1'
}

// Tell gradle to publish the built OSGi bundles as maven artifacts on the
// local maven repository.
publishing {
publications {
maven(MavenPublication) {
from components.java
}
}
repositories {
maven {
url "$targetMaven"

if ("$targetMaven".startsWith('http')) {
credentials {
username System.getenv('GITHUB_ACTOR')
password System.getenv('GITHUB_TOKEN')
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package dev.galasa.inttests.ceci;
package dev.galasa.internal.inttests.ceci;

import static org.assertj.core.api.Assertions.assertThat;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package dev.galasa.inttests.ceci.local;
package dev.galasa.internal.inttests.ceci.local;

import dev.galasa.Tags;
import dev.galasa.Test;
import dev.galasa.TestAreas;
import dev.galasa.galasaecosystem.IGenericEcosystem;
import dev.galasa.galasaecosystem.ILocalEcosystem;
import dev.galasa.galasaecosystem.LocalEcosystem;
import dev.galasa.inttests.ceci.AbstractCECILocal;
import dev.galasa.internal.inttests.ceci.AbstractCECILocal;
import dev.galasa.java.JavaVersion;
import dev.galasa.java.ubuntu.IJavaUbuntuInstallation;
import dev.galasa.java.ubuntu.JavaUbuntuInstallation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package dev.galasa.inttests.ceci.local.isolated;
package dev.galasa.internal.inttests.ceci.local.isolated;

import dev.galasa.Test;
import dev.galasa.TestAreas;
import dev.galasa.galasaecosystem.IGenericEcosystem;
import dev.galasa.galasaecosystem.ILocalEcosystem;
import dev.galasa.galasaecosystem.LocalEcosystem;
import dev.galasa.galasaecosystem.IsolationInstallation;
import dev.galasa.inttests.ceci.AbstractCECILocal;
import dev.galasa.internal.inttests.ceci.AbstractCECILocal;
import dev.galasa.java.JavaVersion;
import dev.galasa.java.ubuntu.IJavaUbuntuInstallation;
import dev.galasa.java.ubuntu.JavaUbuntuInstallation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package dev.galasa.inttests.ceci.local.mvp;
package dev.galasa.internal.inttests.ceci.local.mvp;

import dev.galasa.Test;
import dev.galasa.TestAreas;
import dev.galasa.galasaecosystem.IGenericEcosystem;
import dev.galasa.galasaecosystem.ILocalEcosystem;
import dev.galasa.galasaecosystem.LocalEcosystem;
import dev.galasa.galasaecosystem.IsolationInstallation;
import dev.galasa.inttests.ceci.AbstractCECILocal;
import dev.galasa.internal.inttests.ceci.AbstractCECILocal;
import dev.galasa.java.JavaVersion;
import dev.galasa.java.ubuntu.IJavaUbuntuInstallation;
import dev.galasa.java.ubuntu.JavaUbuntuInstallation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package dev.galasa.inttests.ceda;
package dev.galasa.internal.inttests.ceda;

import static org.assertj.core.api.Assertions.assertThat;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package dev.galasa.inttests.ceda.local;
package dev.galasa.internal.inttests.ceda.local;

import dev.galasa.Tags;
import dev.galasa.Test;
import dev.galasa.TestAreas;
import dev.galasa.galasaecosystem.IGenericEcosystem;
import dev.galasa.galasaecosystem.ILocalEcosystem;
import dev.galasa.galasaecosystem.LocalEcosystem;
import dev.galasa.inttests.ceda.AbstractCEDALocal;
import dev.galasa.internal.inttests.ceda.AbstractCEDALocal;
import dev.galasa.java.JavaVersion;
import dev.galasa.java.ubuntu.IJavaUbuntuInstallation;
import dev.galasa.java.ubuntu.JavaUbuntuInstallation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package dev.galasa.inttests.ceda.local.isolated;
package dev.galasa.internal.inttests.ceda.local.isolated;

import dev.galasa.Test;
import dev.galasa.TestAreas;
import dev.galasa.galasaecosystem.IGenericEcosystem;
import dev.galasa.galasaecosystem.ILocalEcosystem;
import dev.galasa.galasaecosystem.LocalEcosystem;
import dev.galasa.galasaecosystem.IsolationInstallation;
import dev.galasa.inttests.ceda.AbstractCEDALocal;
import dev.galasa.internal.inttests.ceda.AbstractCEDALocal;
import dev.galasa.java.JavaVersion;
import dev.galasa.java.ubuntu.IJavaUbuntuInstallation;
import dev.galasa.java.ubuntu.JavaUbuntuInstallation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package dev.galasa.inttests.cemt;
package dev.galasa.internal.inttests.cemt;

import static org.assertj.core.api.Assertions.assertThat;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package dev.galasa.inttests.cemt.local;
package dev.galasa.internal.inttests.cemt.local;

import dev.galasa.Tags;
import dev.galasa.Test;
import dev.galasa.TestAreas;
import dev.galasa.galasaecosystem.IGenericEcosystem;
import dev.galasa.galasaecosystem.ILocalEcosystem;
import dev.galasa.galasaecosystem.LocalEcosystem;
import dev.galasa.inttests.cemt.AbstractCEMTLocal;
import dev.galasa.internal.inttests.cemt.AbstractCEMTLocal;
import dev.galasa.java.JavaVersion;
import dev.galasa.java.ubuntu.IJavaUbuntuInstallation;
import dev.galasa.java.ubuntu.JavaUbuntuInstallation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package dev.galasa.inttests.cemt.local.isolated;
package dev.galasa.internal.inttests.cemt.local.isolated;

import dev.galasa.Test;
import dev.galasa.TestAreas;
import dev.galasa.galasaecosystem.IGenericEcosystem;
import dev.galasa.galasaecosystem.ILocalEcosystem;
import dev.galasa.galasaecosystem.LocalEcosystem;
import dev.galasa.galasaecosystem.IsolationInstallation;
import dev.galasa.inttests.cemt.AbstractCEMTLocal;
import dev.galasa.internal.inttests.cemt.AbstractCEMTLocal;
import dev.galasa.java.JavaVersion;
import dev.galasa.java.ubuntu.IJavaUbuntuInstallation;
import dev.galasa.java.ubuntu.JavaUbuntuInstallation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package dev.galasa.inttests.cicsts;
package dev.galasa.internal.inttests.cicsts;

import static org.assertj.core.api.Assertions.assertThat;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package dev.galasa.inttests.cicsts.local;
package dev.galasa.internal.inttests.cicsts.local;

import dev.galasa.Tags;
import dev.galasa.Test;
import dev.galasa.TestAreas;
import dev.galasa.galasaecosystem.IGenericEcosystem;
import dev.galasa.galasaecosystem.ILocalEcosystem;
import dev.galasa.galasaecosystem.LocalEcosystem;
import dev.galasa.inttests.cicsts.AbstractCICSTSLocal;
import dev.galasa.internal.inttests.cicsts.AbstractCICSTSLocal;
import dev.galasa.java.JavaVersion;
import dev.galasa.java.ubuntu.IJavaUbuntuInstallation;
import dev.galasa.java.ubuntu.JavaUbuntuInstallation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package dev.galasa.inttests.cicsts.local.isolated;
package dev.galasa.internal.inttests.cicsts.local.isolated;

import dev.galasa.Test;
import dev.galasa.TestAreas;
import dev.galasa.galasaecosystem.IGenericEcosystem;
import dev.galasa.galasaecosystem.ILocalEcosystem;
import dev.galasa.galasaecosystem.LocalEcosystem;
import dev.galasa.galasaecosystem.IsolationInstallation;
import dev.galasa.inttests.cicsts.AbstractCICSTSLocal;
import dev.galasa.internal.inttests.cicsts.AbstractCICSTSLocal;
import dev.galasa.java.JavaVersion;
import dev.galasa.java.ubuntu.IJavaUbuntuInstallation;
import dev.galasa.java.ubuntu.JavaUbuntuInstallation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package dev.galasa.inttests.sdv;
package dev.galasa.internal.inttests.sdv;

import static org.assertj.core.api.Assertions.assertThat;

Expand Down
Loading

0 comments on commit f3e6095

Please sign in to comment.