Skip to content

Commit 5bdd408

Browse files
Made e2e repo first class citizen
1 parent bdb0df0 commit 5bdd408

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

src/main/java/io/micrometer/release/Main.java

+2-11
Original file line numberDiff line numberDiff line change
@@ -95,24 +95,15 @@ void run() {
9595

9696
private boolean isTrainRelease(String githubOrgRepo, String contextPropVersions, String micrometerVersions,
9797
String tracingVersions, String docsGenVersions) {
98-
String modifiedGhOrgRepo = modifyForE2eTests(githubOrgRepo);
99-
return switch (modifiedGhOrgRepo) {
98+
return switch (githubOrgRepo) {
10099
case "micrometer-metrics/context-propagation" -> hasText(contextPropVersions);
101-
case "micrometer-metrics/micrometer" -> hasText(micrometerVersions);
100+
case "micrometer-metrics/micrometer", "marcingrzejszczak/gh-actions-test" -> hasText(micrometerVersions);
102101
case "micrometer-metrics/tracing" -> hasText(tracingVersions);
103102
case "micrometer-metrics/micrometer-docs-generator" -> hasText(docsGenVersions);
104103
default -> false;
105104
};
106105
}
107106

108-
// This is used for e2e tests
109-
private String modifyForE2eTests(String githubOrgRepo) {
110-
if ("marcingrzejszczak/gh-actions-test".equalsIgnoreCase(githubOrgRepo)) {
111-
return "micrometer-metrics/micrometer";
112-
}
113-
return githubOrgRepo;
114-
}
115-
116107
private boolean hasText(String text) {
117108
return text != null && !text.isBlank();
118109
}

src/main/java/io/micrometer/release/train/TrainOptions.java

+5-3
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,9 @@ private static boolean hasText(String contextPropagationVersions) {
9595

9696
enum ProjectDefinition {
9797

98-
CONTEXT_PROPAGATION("context-propagation", "context-propagation"), MICROMETER("micrometer", "micrometer-bom"),
99-
TRACING("tracing", "micrometer-tracing-bom"), DOC_GEN("micrometer-docs-generator", "micrometer-docs-generator");
98+
TEST("gh-actions-test", "micrometer-bom"), CONTEXT_PROPAGATION("context-propagation", "context-propagation"),
99+
MICROMETER("micrometer", "micrometer-bom"), TRACING("tracing", "micrometer-tracing-bom"),
100+
DOC_GEN("micrometer-docs-generator", "micrometer-docs-generator");
100101

101102
private final String groupId = "io.micrometer";
102103

@@ -105,7 +106,8 @@ enum ProjectDefinition {
105106
private final String artifactId;
106107

107108
ProjectDefinition(String repository, String artifactId) {
108-
this.orgRepo = "micrometer-metrics/" + repository;
109+
this.orgRepo = repository.equals("gh-actions-test") ? "marcingrzejszczak" + repository
110+
: "micrometer-metrics/" + repository;
109111
this.artifactId = artifactId;
110112
}
111113

0 commit comments

Comments
 (0)