-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
241 additions
and
167 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 41 additions & 47 deletions
88
src/main/java/org/jenkins/tools/test/PluginCompatTester.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,8 @@ | |
import java.util.Collections; | ||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.logging.Level; | ||
import java.util.logging.Logger; | ||
import org.apache.maven.scm.ScmFileSet; | ||
import org.apache.maven.scm.ScmTag; | ||
import org.apache.maven.scm.command.checkout.CheckOutScmResult; | ||
|
@@ -19,9 +21,11 @@ | |
* each plugin is in its own repository, these plugins automatically fail since they are "not | ||
* found". | ||
* | ||
* <p>This is an example of what needs to change to handle multimodule parents. | ||
* <p>This is an example of what needs to change to handle multi-module parents. | ||
*/ | ||
public class ExampleMultiParent { //extends PluginCompatTesterHookBeforeCheckout { | ||
private static final Logger LOGGER = Logger.getLogger(ExampleMultiParent.class.getName()); | ||
|
||
private String parentUrl = "scm:git:[email protected]:jenkinsci/parent_repo.git"; | ||
private String parentName = "parent_repo"; | ||
private List<String> allBundlePlugins = Arrays.asList("possible", "plugins"); | ||
|
@@ -50,12 +54,12 @@ public Map<String, Object> action(Map<String, Object> moreInfo) throws Exception | |
|
||
// Determine if we need to run the download; only run for first identified plugin in the series | ||
if(firstRun){ | ||
System.out.println("Preparing for Multimodule checkout."); | ||
LOGGER.log(Level.INFO, "Preparing for multi-module checkout"); | ||
|
||
// Checkout to the parent directory. All other processes will be on the child directory | ||
File parentPath = new File(config.workDirectory.getAbsolutePath()+"/"+parentName); | ||
|
||
System.out.println("Checking out from SCM connection URL : "+parentUrl+" ("+parentName+"-"+currentPlugin.version+")"); | ||
LOGGER.log(Level.INFO, "Checking out from SCM connection URL: {0} ({1}-{2})", new Object[]{parentUrl, parentName, currentPlugin.version}); | ||
ScmManager scmManager = SCMManagerFactory.getInstance().createScmManager(); | ||
ScmRepository repository = scmManager.makeScmRepository(parentUrl); | ||
CheckOutScmResult result = scmManager.checkOut(repository, new ScmFileSet(parentPath), new ScmTag(parentName+"-"+currentPlugin.version)); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.