Skip to content

Commit 2c00c94

Browse files
build an offline OBR for galasa uber
Signed-off-by: Stewart Francis <stewartfrancis@uk.ibm.com>
1 parent d0c6b22 commit 2c00c94

11 files changed

Lines changed: 408 additions & 16 deletions

File tree

modules/cli/pkg/cmd/runsCleanupLocal.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,10 @@ func (cmd *RunsCleanupLocalCommand) createCobraCmd(
100100
"the version of galasa you want to use. This should match the version of the galasa obr you built your resource cleanup providers against.")
101101

102102
runsCleanupLocalCobraCmd.Flags().StringSliceVar(&cmd.values.runsCleanupLocalCmdParams.RemoteMavenRepos, "remoteMaven",
103-
[]string{"https://repo.maven.apache.org/maven2"},
103+
[]string{},
104104
"the urls of the remote maven repositories where galasa bundles can be loaded from. "+
105-
"Defaults to maven central.")
105+
"If not specified, no remote Maven repositories will be used and mvn: URIs in OBRs will fail to resolve. "+
106+
"Multiple repositories can be specified by using this flag multiple times.")
106107

107108
runsCleanupLocalCobraCmd.Flags().StringVar(&cmd.values.runsCleanupLocalCmdParams.LocalMaven, "localMaven", "",
108109
"The url of a local maven repository are where galasa bundles can be loaded from on your local file system. Defaults to your home .m2/repository file. Please note that this should be in a URL form e.g. 'file:///Users/myuserid/.m2/repository', or 'file://C:/Users/myuserid/.m2/repository'")

modules/cli/pkg/cmd/runsSubmitLocal.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ func (cmd *RunsSubmitLocalCommand) createRunsSubmitLocalCobraCmd(
9999
//currentUserName := runs.GetCurrentSystemUserName()
100100

101101
runsSubmitLocalCobraCmd.Flags().StringVar(&cmd.values.runsSubmitLocalCmdParams.RemoteMaven, "remoteMaven",
102-
"https://repo.maven.apache.org/maven2",
103-
"the url of the remote maven where galasa bundles can be loaded from. "+
104-
"Defaults to maven central.")
102+
"",
103+
"the url of the remote maven repository where galasa bundles can be loaded from. "+
104+
"If not specified, no remote Maven repository will be used and mvn: URIs in OBRs will fail to resolve.")
105105

106106
runsSubmitLocalCobraCmd.Flags().StringVar(&cmd.values.runsSubmitLocalCmdParams.LocalMaven, "localMaven", "",
107107
"The url of a local maven repository are where galasa bundles can be loaded from on your local file system. Defaults to your home .m2/repository file. Please note that this should be in a URL form e.g. 'file:///Users/myuserid/.m2/repository', or 'file://C:/Users/myuserid/.m2/repository'")

modules/cli/pkg/launcher/jvmLauncher.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,6 @@ func (launcher *JvmLauncher) IsLocal() bool {
603603
// --remotemaven $REMOTE_MAVEN \
604604
// --bootstrap file:${HOME}/.galasa/bootstrap.properties \
605605
// --overrides file:${HOME}/.galasa/overrides.properties \
606-
// --obr mvn:dev.galasa/dev.galasa.uber.obr/${OBR_VERSION}/obr \
607606
// --obr mvn:${TEST_OBR_GROUP_ID}/${TEST_OBR_ARTIFACT_ID}/${TEST_OBR_VERSION}/obr \
608607
// --test ${TEST_BUNDLE}/${TEST_JAVA_CLASS} | tee jvm-log.txt | grep "[*][*][*]" | grep -v "[*][*][*][*]" | sed -e "s/[--]*//g"
609608
//
@@ -614,7 +613,6 @@ func (launcher *JvmLauncher) IsLocal() bool {
614613
// --remotemaven https://development.galasa.dev/main/maven-repo/obr/ \
615614
// --bootstrap file:/Users/mcobbett/.galasa/bootstrap.properties \
616615
// --overrides file:/Users/mcobbett/.galasa/overrides.properties \
617-
// --obr mvn:dev.galasa/dev.galasa.uber.obr/0.26.0/obr \
618616
// --obr mvn:dev.galasa.example.banking/dev.galasa.example.banking.obr/0.0.1-SNAPSHOT/obr \
619617
// --test dev.galasa.example.banking.payee/dev.galasa.example.banking.payee.TestPayee
620618
func getCommandSyntax(

modules/cli/pkg/launcher/jvmLauncherUtils.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,6 @@ func getBaseCommandSyntax(
103103
args = append(args, obrMvnPath)
104104
}
105105

106-
// --obr mvn:dev.galasa/dev.galasa.uber.obr/${OBR_VERSION}/obr
107-
args = append(args, "--obr")
108-
galasaUberObrPath := "mvn:dev.galasa/dev.galasa.uber.obr/" + galasaVersionToRun + "/obr"
109-
args = append(args, galasaUberObrPath)
110-
111106
if isTraceEnabled {
112107
args = append(args, "--trace")
113108
}

modules/cli/pkg/launcher/resourceCleanupJvmLauncher.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ func (launcher *ResourceCleanupJvmLauncher) RunResourceCleanup() error {
192192
// --localmaven file:${M2_PATH}/repository/ \
193193
// --remotemaven $REMOTE_MAVEN \
194194
// --bootstrap file:${HOME}/.galasa/bootstrap.properties \
195-
// --obr mvn:dev.galasa/dev.galasa.uber.obr/${OBR_VERSION}/obr \
196195
// --obr mvn:${OBR_GROUP_ID}/${OBR_ARTIFACT_ID}/${OBR_VERSION}/obr \
197196
// --includes-monitor-pattern "dev.galasa.*"
198197
// --excludes-monitor-pattern "*MyUnwantedCleanupJob"

modules/framework/galasa-parent/galasa-boot/src/main/java/dev/galasa/boot/Launcher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ private void checkForRemoteMaven(CommandLine commandLine) {
445445
this.remoteMavenRepos.add(new URL(option.replaceFirst("/*$", "")));
446446
}
447447
}
448-
this.remoteMavenRepos.add(new URL("https://repo.maven.apache.org/maven2"));
448+
// No longer automatically adding Maven Central - users must explicitly opt-in via --remotemaven
449449
} catch (MalformedURLException e) {
450450
logger.error("invalid remote maven urls", e);
451451
commandLineError(null);

modules/gradle/build-locally.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ function check_secrets {
208208
function build_gradle_plugin() {
209209
h1 "Building ${project}"
210210

211-
cmd="gradle --no-daemon \
211+
cmd="./gradlew --no-daemon \
212212
${CONSOLE_FLAG} \
213213
-Dorg.gradle.java.home=${JAVA_HOME} \
214214
-PsourceMaven=${SOURCE_MAVEN} ${OPTIONAL_DEBUG_FLAG} \

modules/gradle/gradlew

Lines changed: 248 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)