Skip to content

Commit

Permalink
Revert "Merge pull request #291 from ryanjbaxter/release-bundle-distr…
Browse files Browse the repository at this point in the history
…ibution-for-commercial"

This reverts commit cb226a0, reversing
changes made to 43b2b71.
  • Loading branch information
ryanjbaxter committed Jun 4, 2024
1 parent cb226a0 commit 9b9709e
Show file tree
Hide file tree
Showing 13 changed files with 8 additions and 489 deletions.
14 changes: 1 addition & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-build</artifactId>
<version>4.0.6</version>
<version>4.0.3</version>
<relativePath/>
<!-- lookup parent from repository -->
</parent>
Expand Down Expand Up @@ -47,8 +47,6 @@
<fliptables.version>1.1.0</fliptables.version>
<zt.exec.version>1.12</zt.exec.version>
<okhttp.version>4.11.0</okhttp.version>
<artifactory-client.version>2.17.0</artifactory-client.version>
<groovy.version>4.0.6</groovy.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -147,16 +145,6 @@
<artifactId>awaitility</artifactId>
<version>${awaitility.version}</version>
</dependency>
<dependency>
<groupId>org.jfrog.artifactory.client</groupId>
<artifactId>artifactory-java-client-services</artifactId>
<version>${artifactory-client.version}</version>
</dependency>
<dependency>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy</artifactId>
<version>${groovy.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
55 changes: 0 additions & 55 deletions projects/spring-cloud/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,58 +113,3 @@ releaser:
projects-to-skip:
- spring-boot
- spring-cloud-stream
bundles:
repos:
spring-cloud-build:
- "org/springframework/cloud/spring-cloud-build*"
- "org/springframework/cloud/spring-cloud-starter-build*"
- "org/springframework/cloud/spring-cloud-dependencies-parent*"
spring-cloud-config:
- "org/springframework/cloud/spring-cloud-config*"
- "org/springframework/cloud/spring-cloud-starter-config*"
spring-cloud-function:
- "org/springframework/cloud/spring-cloud-function*"
- "org/springframework/cloud/spring-cloud-starter-function*"
spring-cloud-stream:
- "org/springframework/cloud/spring-cloud-stream*"
- "org/springframework/cloud/spring-cloud-starter-stream*"
spring-cloud-task:
- "org/springframework/cloud/spring-cloud-task*"
- "org/springframework/cloud/spring-cloud-starter-task*"
spring-cloud-bus:
- "org/springframework/cloud/spring-cloud-bus*"
- "org/springframework/cloud/spring-cloud-starter-bus*"
spring-cloud-commons:
- "org/springframework/cloud/spring-cloud-commons*"
- "org/springframework/cloud/spring-cloud-starter-commons*"
spring-cloud-netflix:
- "org/springframework/cloud/spring-cloud-netflix*"
- "org/springframework/cloud/spring-cloud-starter-netflix*"
spring-cloud-openfeign:
- "org/springframework/cloud/spring-cloud-openfeign*"
- "org/springframework/cloud/spring-cloud-starter-openfeign*"
spring-cloud-consul:
- "org/springframework/cloud/spring-cloud-consul*"
- "org/springframework/cloud/spring-cloud-starter-consul*"
spring-cloud-circuitbreaker:
- "org/springframework/cloud/spring-cloud-circuitbreaker*"
- "org/springframework/cloud/spring-cloud-starter-circuitbreaker*"
spring-cloud-gateway:
- "org/springframework/cloud/spring-cloud-gateway*"
- "org/springframework/cloud/spring-cloud-starter-gateway*"
spring-cloud-zookeeper:
- "org/springframework/cloud/spring-cloud-zookeeper*"
- "org/springframework/cloud/spring-cloud-starter-zookeeper*"
spring-cloud-contract:
- "org/springframework/cloud/spring-cloud-contract*"
- "org/springframework/cloud/spring-cloud-starter-contract*"
spring-cloud-kubernetes:
- "org/springframework/cloud/spring-cloud-kubernetes*"
- "org/springframework/cloud/spring-cloud-starter-kubernetes*"
spring-cloud-vault:
- "org/springframework/cloud/spring-cloud-vault*"
- "org/springframework/cloud/spring-cloud-starter-vault*"
# This is Spring Cloud Release, the POM id is spring-cloud-starter-build
spring-cloud-starter-build:
- "org/springframework/cloud/spring-cloud-starter*"
- "org/springframework/cloud/spring-cloud-dependencies*"
8 changes: 0 additions & 8 deletions releaser-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,6 @@
<groupId>io.spring.initializr</groupId>
<artifactId>initializr-metadata</artifactId>
</dependency>
<dependency>
<groupId>org.jfrog.artifactory.client</groupId>
<artifactId>artifactory-java-client-services</artifactId>
</dependency>
<dependency>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
Expand Down
46 changes: 2 additions & 44 deletions releaser-core/src/main/java/releaser/internal/Releaser.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@

import java.io.File;
import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import releaser.internal.buildsystem.GradleUpdater;
import releaser.internal.buildsystem.ProjectPomUpdater;
import releaser.internal.commercial.ReleaseBundleCreator;
import releaser.internal.docs.DocumentationUpdater;
import releaser.internal.git.ProjectGitHandler;
import releaser.internal.github.ProjectGitHubHandler;
Expand Down Expand Up @@ -71,13 +69,11 @@ public class Releaser {

private ReleaserProperties releaserProperties;

private ReleaseBundleCreator releaseBundleCreator;

public Releaser(ReleaserProperties releaserProperties, ProjectPomUpdater projectPomUpdater,
ProjectCommandExecutor projectCommandExecutor, ProjectGitHandler projectGitHandler,
ProjectGitHubHandler projectGitHubHandler, TemplateGenerator templateGenerator, GradleUpdater gradleUpdater,
SaganUpdater saganUpdater, DocumentationUpdater documentationUpdater, PostReleaseActions postReleaseActions,
ReleaseBundleCreator releaseBundleCreator) {
SaganUpdater saganUpdater, DocumentationUpdater documentationUpdater,
PostReleaseActions postReleaseActions) {
this.releaserProperties = releaserProperties;
this.projectPomUpdater = projectPomUpdater;
this.projectCommandExecutor = projectCommandExecutor;
Expand All @@ -88,7 +84,6 @@ public Releaser(ReleaserProperties releaserProperties, ProjectPomUpdater project
this.saganUpdater = saganUpdater;
this.documentationUpdater = documentationUpdater;
this.postReleaseActions = postReleaseActions;
this.releaseBundleCreator = releaseBundleCreator;
}

public File clonedProjectFromOrg(String projectName) {
Expand Down Expand Up @@ -382,41 +377,4 @@ public ExecutionResult updateReleaseTrainWiki(Projects projects) {
return ExecutionResult.skipped();
}

public ExecutionResult createReleaseBundle(boolean commercial, ProjectVersion versionFromBom, Boolean dryRun,
Map<String, List<String>> commercialRepos, String projectName) {
if (dryRun) {
log.info("\nWon't create a release bundle for a dry run");
return ExecutionResult.skipped();
}
if (versionFromBom.isSnapshot()) {
log.info("\nWon't create a release bundle for a SNAPSHOT version");
return ExecutionResult.skipped();
}
if (!commercial) {
log.info("\nWon't create a release bundle for a non commercial project");
return ExecutionResult.skipped();
}
log.info("\nCreating a release bundle");
if (!commercialRepos.containsKey(projectName)) {
log.warn("No commercial repos configured for project [{}], double check releaser.bundles.repos",
projectName);
}
List<String> repos = commercialRepos.get(projectName);
log.info("Creating release bundles for project [{}] in repos [{}]", projectName, repos);
try {
boolean result = this.releaseBundleCreator.createReleaseBundle(repos, versionFromBom.version,
"TNZ-" + projectName + "-commercial");
if (!result) {
log.warn("Failed to create release bundle");
return ExecutionResult.unstable(new BuildUnstableException("Failed to create a release bundle"));
}
log.info("\nSuccessfully created a release bundle");
return ExecutionResult.success();
}
catch (Exception ex) {
log.error("Failed to create a release bundle", ex);
return ExecutionResult.unstable(new BuildUnstableException("Failed to create a release bundle", ex));
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ public class ReleaserProperties implements Serializable {

private boolean commercial = false;

private Bundles bundles = new Bundles();

/**
* Project name to its version - overrides all versions retrieved from a release train
* repository like Spring Cloud Release.
Expand Down Expand Up @@ -210,14 +208,6 @@ public void setCommercial(boolean commercial) {
this.commercial = commercial;
}

public Bundles getBundles() {
return bundles;
}

public void setBundles(Bundles bundles) {
this.bundles = bundles;
}

@Override
public String toString() {
return "ReleaserProperties{" + "workingDir='" + this.workingDir + '\'' + ", git=" + this.git + ", pom="
Expand Down Expand Up @@ -1573,68 +1563,4 @@ public String toString() {

}

public static class Bundles implements Serializable {

private boolean createProjectReleaseBundle = false;

private boolean createReleaseTrainReleaseBundle = false;

private String repoUrl = "https://usw1.packages.broadcom.com";

private String repoUsername;

private String repoAccessToken;

private Map<String, List<String>> repos;

public boolean isCreateProjectReleaseBundle() {
return createProjectReleaseBundle;
}

public void setCreateProjectReleaseBundle(boolean createProjectReleaseBundle) {
this.createProjectReleaseBundle = createProjectReleaseBundle;
}

public boolean isCreateReleaseTrainReleaseBundle() {
return createReleaseTrainReleaseBundle;
}

public void setCreateReleaseTrainReleaseBundle(boolean createReleaseTrainReleaseBundle) {
this.createReleaseTrainReleaseBundle = createReleaseTrainReleaseBundle;
}

public Map<String, List<String>> getRepos() {
return repos;
}

public void setRepos(Map<String, List<String>> repos) {
this.repos = repos;
}

public String getRepoUrl() {
return repoUrl;
}

public void setRepoUrl(String repoUrl) {
this.repoUrl = repoUrl;
}

public String getRepoUsername() {
return repoUsername;
}

public void setRepoUsername(String repoUsername) {
this.repoUsername = repoUsername;
}

public String getRepoAccessToken() {
return repoAccessToken;
}

public void setRepoAccessToken(String repoAccessToken) {
this.repoAccessToken = repoAccessToken;
}

}

}

This file was deleted.

Loading

0 comments on commit 9b9709e

Please sign in to comment.