|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
SFEE Hudson PluginI've seen that draft plugin for integrating hudson with Collabnet SFEE
has been developed yet. Starting form that source code I've made some modification in order to make it working a little bit more. Are you interested in my modifications? If yes, where can I post them ? Regards, Fulvio --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: SFEE Hudson PluginHi Fulvio,
what kind of changes have you made ? You can post a patch here, or (preferred) create an issue in the issue tracker and attach it. Tom On Fri, Jul 4, 2008 at 1:39 PM, Fulvio Cavarretta <fulvio.cavarretta@...> wrote: > I've seen that draft plugin for integrating hudson with Collabnet SFEE has > been developed yet. > > Starting form that source code I've made some modification in order to > make it working a little bit more. > Are you interested in my modifications? > If yes, where can I post them ? > > Regards, > Fulvio > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@... > For additional commands, e-mail: dev-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: SFEE Hudson Plugin
Hi Tom,
the changes I've made are related to the missing artifacts upload on user request (or automatically) at the ends of the build and the missing list of fixed artifact in the build page. I've done nothing in relation to REALM related classes and jelly files. There are still some known issues: - This plugin make use of some classes contained in 'activation.jar'. Hudson includes the 'activation.jar' in the sealed war -> If you run hudson + sfee plugin in a JRE 1.6.0 environment you get a runtime exception because JRE 1.6.0 already contains 'activation.jar' classes. So you have to use JRE 1.50. - SFEE History widget should be somehow reworked and the '(trend)' link does not work properly. Attached there is the 'svn diff' command result. Regars, Fulvio P.S. I also had to uncomment the module build in main pom file. Tom Huybrechts wrote: Hi Fulvio, what kind of changes have you made ? You can post a patch here, or (preferred) create an issue in the issue tracker and attach it. Tom On Fri, Jul 4, 2008 at 1:39 PM, Fulvio Cavarretta fulvio.cavarretta@... wrote:I've seen that draft plugin for integrating hudson with Collabnet SFEE has been developed yet. Starting form that source code I've made some modification in order to make it working a little bit more. Are you interested in my modifications? If yes, where can I post them ? Regards, Fulvio --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@...--------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... Index: src/main/java/hudson/plugins/sfee/SFEEReleasePublisher.java =================================================================== --- src/main/java/hudson/plugins/sfee/SFEEReleasePublisher.java (revision 10573) +++ src/main/java/hudson/plugins/sfee/SFEEReleasePublisher.java (working copy) @@ -26,9 +26,10 @@ + "[^\\s]* ([^\\s]*)"; private final String releaseToReplace; - private final boolean uploadArtifacts; + private final boolean uploadArtifacts = true; private final String maturity; private final boolean uploadAutomatically; + private final boolean replaceArtifacts; private final String sourceRegexp; @@ -36,9 +37,10 @@ @DataBoundConstructor public SFEEReleasePublisher(String sourceRegexp, String releaseName, String releaseToReplace, String maturity, - boolean uploadArtifacts, boolean uploadAutomatically) { + /*boolean uploadArtifacts, */ boolean replaceArtifacts, boolean uploadAutomatically) { this.releaseToReplace = StringUtils.isBlank(releaseToReplace) ? null : releaseToReplace.trim(); - this.uploadArtifacts = uploadArtifacts; + /* this.uploadArtifacts = uploadArtifacts; */ + this.replaceArtifacts = replaceArtifacts; this.maturity = maturity; this.uploadAutomatically= uploadAutomatically; this.sourceRegexp = sourceRegexp; @@ -65,7 +67,7 @@ return false; } - SFEEReleaseTask<AbstractBuild> newReleaseTask = new SFEEReleaseTask<AbstractBuild>(build, releasePackageId, version, releaseToReplace, maturity, uploadArtifacts); + SFEEReleaseTask<AbstractBuild> newReleaseTask = new SFEEReleaseTask<AbstractBuild>(build, releasePackageId, version, releaseToReplace, maturity, uploadArtifacts, replaceArtifacts); build.addAction(newReleaseTask); if (uploadAutomatically) { @@ -140,6 +142,10 @@ return uploadArtifacts; } + public boolean isReplaceArtifacts() { + return replaceArtifacts; + } + public String getMaturity() { return maturity; } Index: src/main/java/hudson/plugins/sfee/SFEEReleaseTask.java =================================================================== --- src/main/java/hudson/plugins/sfee/SFEEReleaseTask.java (revision 10573) +++ src/main/java/hudson/plugins/sfee/SFEEReleaseTask.java (working copy) @@ -1,6 +1,7 @@ package hudson.plugins.sfee; import hudson.Util; +import hudson.model.Run; import hudson.model.AbstractBuild; import hudson.model.AbstractProject; import hudson.model.BallColor; @@ -29,6 +30,7 @@ import java.util.Calendar; import java.util.GregorianCalendar; import java.util.List; +import java.util.Iterator; import java.util.concurrent.CopyOnWriteArrayList; import javax.servlet.ServletException; @@ -47,16 +49,18 @@ private List<TrackerArtifact> resolvedTrackerArtifacts; private final boolean uploadFiles; + private final boolean replaceFiles; public SFEEReleaseTask(AbstractBuild<?, ?> build, String releasePackageId, - String releaseName, String releaseToReplace, String maturity, - boolean uploadFiles) { + String releaseName, String releaseToReplace, + String maturity, boolean uploadFiles, boolean replaceFiles) { this.build = build; this.releasePackageId = releasePackageId; this.releaseName = releaseName; this.releaseToReplace = releaseToReplace; this.maturity = maturity; this.uploadFiles = uploadFiles; + this.replaceFiles = replaceFiles; } @Override @@ -99,12 +103,17 @@ public Object getDynamic(String token, StaplerRequest req, StaplerResponse rsp) { - if (token.equals("buildHistory")) { + if ("buildHistory".equals(token)) { return getHistoryWidget(); } + + if ("buildTimeTrend".equals(token)) { + return null; + } + return records.get(Integer.valueOf(token)); } - + private final class HistoryWidgetImpl extends HistoryWidget<SFEEReleaseTask<?>, Record> { private HistoryWidgetImpl() { @@ -150,6 +159,34 @@ record.result = Result.FAILURE; return; } + + if (isUploadFiles()) { + List buildArtifacts = build.getArtifacts(); + + for (Iterator iterator = buildArtifacts.iterator(); iterator + .hasNext();) { + Run.Artifact buildArtifact = (Run.Artifact) iterator + .next(); + + listener.getLogger().println( + "Uploading file " + + buildArtifact.getFileName() + + " form: " + + buildArtifact.getFile() + .toURL()); + + listener.getLogger().println( + "Existing file will " + + (isReplaceFiles() ? "" + : "not") + + " be overwitten"); + + site.uploadFileForRelease(fileReleaseId, + buildArtifact.getFileName(), + buildArtifact.getFile().toURL(), + isReplaceFiles()); + } + } } else { listener.getLogger().println( "Reusing previous release " + fileReleaseId); @@ -163,7 +200,7 @@ listener.getLogger().println( "Total time: " + Util.getTimeSpanString(duration)); - record.result = Result.UNSTABLE; + record.result = Result.SUCCESS; build.addAction(new SFEEReleaseCompletedTask( SFEEReleaseTask.this)); @@ -300,7 +337,8 @@ SystemFault, PermissionDeniedFault, RemoteException { final SourceForgeSite site = SourceForgeSite.DESCRIPTOR.getSite(); - final String releaseId; + String releaseId = null; + if (releaseToReplace != null) { listener.getLogger().printf("Update release '%s' to '%s'\n...", releaseToReplace, releaseName); @@ -319,11 +357,20 @@ maturity); } else { // create release - listener.getLogger().printf("Creating release '%s'\n", releaseName); - releaseId = site.createRelease(packageId, releaseName, "", - "active", maturity); + listener.getLogger().printf("Checking for existing release\n", + releaseName); + + releaseId = site.getReleaseId(packageId, releaseName); + + if( releaseId == null) { + listener.getLogger().printf("Creating new release '%s'\n", + releaseName); + + releaseId = site.createRelease(packageId, releaseName, "", "active", + maturity); + } } - + return releaseId; } @@ -334,13 +381,19 @@ SystemFault, PermissionDeniedFault, RemoteException { SourceForgeProject project = SourceForgeProject.getProperty(p); SourceForgeSite site = SourceForgeSite.DESCRIPTOR.getSite(); + List<ArtifactDetailSoapRow> findArtifactsResolvedInRelease = site .findArtifactsResolvedInRelease(releaseName, project .getProjectId()); + List<TrackerArtifact> trackerArtifacts = new ArrayList<TrackerArtifact>(); for (ArtifactDetailSoapRow r : findArtifactsResolvedInRelease) { + System.out.println("Adding new TrackerArtifact"); trackerArtifacts.add(new TrackerArtifact(r)); } + + System.out.println("TrackerArtifact size: " + trackerArtifacts.size()); + return trackerArtifacts; } @@ -365,6 +418,12 @@ } public List<TrackerArtifact> getResolvedTrackerArtifacts() { + try { + resolvedTrackerArtifacts = findResolvedArtifacts( + build.getProject(), releaseName); + } catch (Exception e) { + e.printStackTrace(); + } return resolvedTrackerArtifacts; } @@ -372,6 +431,10 @@ return uploadFiles; } + public boolean isReplaceFiles() { + return replaceFiles; + } + public CopyOnWriteArrayList<Record> getRecords() { return records; } Index: src/main/java/hudson/plugins/sfee/SourceForgeSite.java =================================================================== --- src/main/java/hudson/plugins/sfee/SourceForgeSite.java (revision 10573) +++ src/main/java/hudson/plugins/sfee/SourceForgeSite.java (working copy) @@ -11,6 +11,8 @@ import hudson.plugins.sfee.webservice.FileStorageAppSoap; import hudson.plugins.sfee.webservice.FrsAppSoap; import hudson.plugins.sfee.webservice.FrsFileSoapDO; +import hudson.plugins.sfee.webservice.FrsFileSoapList; +import hudson.plugins.sfee.webservice.FrsFileSoapRow; import hudson.plugins.sfee.webservice.IllegalArgumentFault; import hudson.plugins.sfee.webservice.InvalidFilterFault; import hudson.plugins.sfee.webservice.InvalidSessionFault; @@ -40,7 +42,7 @@ import java.util.List; import javax.activation.DataHandler; -import javax.activation.URLDataSource; +// import javax.activation.URLDataSource; import org.kohsuke.stapler.DataBoundConstructor; import org.kohsuke.stapler.StaplerRequest; @@ -218,16 +220,49 @@ return null; } + /** + * Updates the title of the release with the given name. + * + * @return the id of the release that was changed, or null is no such + * release + * @throws RemoteException + * @throws PermissionDeniedFault + * @throws SystemFault + * @throws InvalidSessionFault + * @throws NoSuchObjectFault + */ + public String getReleaseId(String packageId, String name ) throws NoSuchObjectFault, InvalidSessionFault, + SystemFault, PermissionDeniedFault, RemoteException { + String releaseId = null; + FrsAppSoap frsApp = getFrsApp(); + String sessionId = getSessionId(); + + ReleaseSoapList existingReleases = frsApp.getReleaseList(sessionId, + packageId); + + for (ReleaseSoapRow row : existingReleases.getDataRows()) { + if (name.equals(row.getTitle())) { + releaseId = row.getId(); + break; + } + } + + return releaseId; + } + public List<ArtifactDetailSoapRow> findArtifactsResolvedInRelease( String releaseTitle, String projectId) throws InvalidFilterFault, NoSuchObjectFault, InvalidSessionFault, SystemFault, PermissionDeniedFault, RemoteException { List<ArtifactDetailSoapRow> result = new ArrayList<ArtifactDetailSoapRow>(); String sessionId = getSessionId(); + TrackerAppSoap trackerApp = getTrackerApp(); + for (TrackerSoapRow trackerRow : getTrackers(projectId)) { ArtifactDetailSoapList artifactDetailList = trackerApp .getArtifactDetailList(sessionId, trackerRow.getId(), null); + for (ArtifactDetailSoapRow row : artifactDetailList.getDataRows()) { if (releaseTitle.equals(row.getResolvedInReleaseTitle())) { result.add(row); @@ -249,17 +284,43 @@ return release.getId(); } + public String getFrsId(String releaseId, String fileName ) throws InvalidSessionFault, SystemFault, + RemoteException { + String ret = null; + String sessionId = getSessionId(); + FrsAppSoap frsApp = getFrsApp(); + + FrsFileSoapList fileSoapList = frsApp.getFrsFileList(sessionId, releaseId); + + for (FrsFileSoapRow row : fileSoapList.getDataRows()) { + if( fileName.equals(row.getFilename()) ) { + ret = row.getId(); + break; + } + } + + return ret; + } + public String uploadFileForRelease(String releaseId, String name, - URL sourceURL) throws InvalidSessionFault, SystemFault, + URL sourceURL, boolean forceUpdate) throws InvalidSessionFault, SystemFault, RemoteException { String sessionId = getSessionId(); FileStorageAppSoap fileApp = getFileStorageApp(); - DataHandler dataHandler = new DataHandler(new URLDataSource(sourceURL)); + DataHandler dataHandler = new DataHandler(sourceURL); String fileId = fileApp.uploadFile(sessionId, dataHandler); - FrsFileSoapDO frsFile = frsApp.createFrsFile(sessionId, releaseId, + + if( forceUpdate ) { + String frsId = getFrsId( releaseId, name ); + + if( frsId != null ) { + getFrsApp().deleteFrsFile(sessionId, frsId); + } + } + + FrsFileSoapDO frsFile = getFrsApp().createFrsFile(sessionId, releaseId, name, dataHandler.getContentType(), fileId); return frsFile.getId(); - } public PackageSoapRow[] getReleasePackages(String projectId) Index: src/main/java/hudson/plugins/sfee/PluginImpl.java =================================================================== --- src/main/java/hudson/plugins/sfee/PluginImpl.java (revision 10573) +++ src/main/java/hudson/plugins/sfee/PluginImpl.java (working copy) @@ -5,6 +5,7 @@ import hudson.plugins.sfee.webservice.PackageSoapRow; import hudson.security.AuthorizationStrategy; import hudson.security.SecurityRealm; +import hudson.tasks.BuildStep; import hudson.tasks.MailAddressResolver; import hudson.tasks.UserNameResolver; import hudson.util.ListBoxModel; @@ -34,6 +35,7 @@ UserNameResolver.LIST.add(resolver.getUserNameResolver()); AuthorizationStrategy.LIST.add(SFEEProjectBasedAuthorizationStrategy.DESCRIPTOR); annotator.register(); + BuildStep.PUBLISHERS.add(SFEEReleasePublisher.DescriptorImpl.INSTANCE); } public void stop() { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: SFEE Hudson Plugin
Opps, I just noticed that in the patch I posted, svn diff did not
included modifications on jelly and html files.
Attached there are the patch for jelly files and new html (that should be exploded into the src/main/webapp directory) Sorry, Fulvio Fulvio Cavarretta wrote: Hi Tom, Index: src/main/resources/hudson/plugins/sfee/SFEEReleaseCompletedTask/summary.jelly =================================================================== --- src/main/resources/hudson/plugins/sfee/SFEEReleaseCompletedTask/summary.jelly (revision 10573) +++ src/main/resources/hudson/plugins/sfee/SFEEReleaseCompletedTask/summary.jelly (working copy) @@ -3,8 +3,8 @@ <j:set var="url" value="${h.getNearestAncestorUrl(request,it)}"/> <j:choose> - <j:when test="${it.resolvedTrackerArtifacts != null and it.resolvedTrackerArtifacts.size() gt 0}"> - <l:pane width="2" title="Artifacts resolved in <a href="${it.downloadURL}">${it.releaseName}</a>"> + <j:when test="${it.releaseTask.resolvedTrackerArtifacts != null and it.releaseTask.resolvedTrackerArtifacts.size() gt 0}"> + <l:pane width="2" title="Artifacts resolved in <a href="${it.releaseTask.fileReleaseUrl}">${it.releaseTask.releaseName}</a>"> <j:forEach var="t" items="${it.releaseTask.resolvedTrackerArtifacts}"> <tr> <td><a href="${t.getURL()}">${t.id}</a></td> Index: src/main/resources/hudson/plugins/sfee/SFEEReleasePublisher/config.jelly =================================================================== --- src/main/resources/hudson/plugins/sfee/SFEEReleasePublisher/config.jelly (revision 10573) +++ src/main/resources/hudson/plugins/sfee/SFEEReleasePublisher/config.jelly (working copy) @@ -1,20 +1,24 @@ <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"> - <f:entry title="Source Regexp"> + + <f:entry title="Release Name regexp" help="/plugin/sfee/help-releasepulisher-regexp.html"> <f:textbox name="sourceRegexp" value="${instance.sourceRegexp}"/> </f:entry> - <f:entry title="Release Name"> + <f:entry title="Release Name" help="/plugin/sfee/help-releasepulisher-releasename.html"> <f:textbox name="releaseName" value="${instance.releaseName}"/> </f:entry> - <f:entry title="Release to replace (leave empty if none)"> + <!-- f:entry title="Release to replace (leave empty if none)"> <f:textbox name="releaseToReplace" value="${instance.releaseToReplace}"/> - </f:entry> + </f:entry --> <f:entry title="Maturity"> <f:textbox name="maturity" value="${instance.maturity}"/> </f:entry> - <f:entry title="Upload files"> + <!-- f:entry title="Upload files"> <f:checkbox name="uploadArtifacts" checked="${instance.uploadArtifacts}"/> + </f:entry --> + <f:entry title="Replace existing files" help="/plugin/sfee/help-releasepulisher-replaceartifacts.html"> + <f:checkbox name="replaceArtifacts" checked="${instance.replaceArtifacts}"/> </f:entry> - <f:entry title="Upload automatically after build"> + <f:entry title="Upload automatically after build" help="/plugin/sfee/help-releasepulisher-uploadauto.html"> <f:checkbox name="uploadAutomatically" checked="${instance.uploadAutomatically}"/> </f:entry> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: SFEE Hudson PluginTom Huybrechts wrote:
> Hi Fulvio, > > what kind of changes have you made ? > > You can post a patch here, or (preferred) create an issue in the issue > tracker and attach it. Is the plugin hard-coded to your environment, Tom? It seems like there's some interest in this plugin. I'd love to see it released. > > Tom > > On Fri, Jul 4, 2008 at 1:39 PM, Fulvio Cavarretta > <fulvio.cavarretta@...> wrote: >> I've seen that draft plugin for integrating hudson with Collabnet SFEE has >> been developed yet. >> >> Starting form that source code I've made some modification in order to >> make it working a little bit more. >> Are you interested in my modifications? >> If yes, where can I post them ? >> >> Regards, >> Fulvio >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscribe@... >> For additional commands, e-mail: dev-help@... >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@... > For additional commands, e-mail: dev-help@... > > -- Kohsuke Kawaguchi Sun Microsystems kohsuke.kawaguchi@... |
|
|
Re: SFEE Hudson PluginHi all,
may be I've made some confusion about the patches for SFEE plugin, due to 'svn diff' command result. In order to give a cleaner modification set. I've attached here the patch file taken form diff -Nur . ../sfee.new > ../sfee_plugin.patch command output. It should be applied using patch -Nup1 < ../sfee_plugin.patch command, launched from the sfee plugin directory. It should contain all modification I've made, including those related to help and jelly files. It replace any previous patch file I sent. Regards, Fulvio P.S. There are still the limitations mentioned in my previous posts. Kohsuke Kawaguchi wrote: > Tom Huybrechts wrote: >> Hi Fulvio, >> >> what kind of changes have you made ? >> >> You can post a patch here, or (preferred) create an issue in the issue >> tracker and attach it. > > Is the plugin hard-coded to your environment, Tom? > > It seems like there's some interest in this plugin. I'd love to see it > released. > >> >> Tom >> >> On Fri, Jul 4, 2008 at 1:39 PM, Fulvio Cavarretta >> <fulvio.cavarretta@...> wrote: >>> I've seen that draft plugin for integrating hudson with Collabnet >>> SFEE has >>> been developed yet. >>> >>> Starting form that source code I've made some modification in order to >>> make it working a little bit more. >>> Are you interested in my modifications? >>> If yes, where can I post them ? >>> >>> Regards, >>> Fulvio >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: dev-unsubscribe@... >>> For additional commands, e-mail: dev-help@... >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscribe@... >> For additional commands, e-mail: dev-help@... >> >> > > diff -Nur ./src/main/java/hudson/plugins/sfee/PluginImpl.java ../sfee.new/src/main/java/hudson/plugins/sfee/PluginImpl.java --- ./src/main/java/hudson/plugins/sfee/PluginImpl.java 2008-07-08 09:23:54.000000000 +0200 +++ ../sfee.new/src/main/java/hudson/plugins/sfee/PluginImpl.java 2008-07-08 09:06:13.000000000 +0200 @@ -5,6 +5,7 @@ import hudson.plugins.sfee.webservice.PackageSoapRow; import hudson.security.AuthorizationStrategy; import hudson.security.SecurityRealm; +import hudson.tasks.BuildStep; import hudson.tasks.MailAddressResolver; import hudson.tasks.UserNameResolver; import hudson.util.ListBoxModel; @@ -34,6 +35,7 @@ UserNameResolver.LIST.add(resolver.getUserNameResolver()); AuthorizationStrategy.LIST.add(SFEEProjectBasedAuthorizationStrategy.DESCRIPTOR); annotator.register(); + BuildStep.PUBLISHERS.add(SFEEReleasePublisher.DescriptorImpl.INSTANCE); } public void stop() { diff -Nur ./src/main/java/hudson/plugins/sfee/SFEEReleasePublisher.java ../sfee.new/src/main/java/hudson/plugins/sfee/SFEEReleasePublisher.java --- ./src/main/java/hudson/plugins/sfee/SFEEReleasePublisher.java 2008-07-08 09:23:54.000000000 +0200 +++ ../sfee.new/src/main/java/hudson/plugins/sfee/SFEEReleasePublisher.java 2008-07-08 09:06:13.000000000 +0200 @@ -26,9 +26,10 @@ + "[^\\s]* ([^\\s]*)"; private final String releaseToReplace; - private final boolean uploadArtifacts; + private final boolean uploadArtifacts = true; private final String maturity; private final boolean uploadAutomatically; + private final boolean replaceArtifacts; private final String sourceRegexp; @@ -36,9 +37,10 @@ @DataBoundConstructor public SFEEReleasePublisher(String sourceRegexp, String releaseName, String releaseToReplace, String maturity, - boolean uploadArtifacts, boolean uploadAutomatically) { + /*boolean uploadArtifacts, */ boolean replaceArtifacts, boolean uploadAutomatically) { this.releaseToReplace = StringUtils.isBlank(releaseToReplace) ? null : releaseToReplace.trim(); - this.uploadArtifacts = uploadArtifacts; + /* this.uploadArtifacts = uploadArtifacts; */ + this.replaceArtifacts = replaceArtifacts; this.maturity = maturity; this.uploadAutomatically= uploadAutomatically; this.sourceRegexp = sourceRegexp; @@ -65,7 +67,7 @@ return false; } - SFEEReleaseTask<AbstractBuild> newReleaseTask = new SFEEReleaseTask<AbstractBuild>(build, releasePackageId, version, releaseToReplace, maturity, uploadArtifacts); + SFEEReleaseTask<AbstractBuild> newReleaseTask = new SFEEReleaseTask<AbstractBuild>(build, releasePackageId, version, releaseToReplace, maturity, uploadArtifacts, replaceArtifacts); build.addAction(newReleaseTask); if (uploadAutomatically) { @@ -140,6 +142,10 @@ return uploadArtifacts; } + public boolean isReplaceArtifacts() { + return replaceArtifacts; + } + public String getMaturity() { return maturity; } diff -Nur ./src/main/java/hudson/plugins/sfee/SFEEReleaseTask.java ../sfee.new/src/main/java/hudson/plugins/sfee/SFEEReleaseTask.java --- ./src/main/java/hudson/plugins/sfee/SFEEReleaseTask.java 2008-07-08 09:23:54.000000000 +0200 +++ ../sfee.new/src/main/java/hudson/plugins/sfee/SFEEReleaseTask.java 2008-07-08 09:06:13.000000000 +0200 @@ -1,6 +1,7 @@ package hudson.plugins.sfee; import hudson.Util; +import hudson.model.Run; import hudson.model.AbstractBuild; import hudson.model.AbstractProject; import hudson.model.BallColor; @@ -29,6 +30,7 @@ import java.util.Calendar; import java.util.GregorianCalendar; import java.util.List; +import java.util.Iterator; import java.util.concurrent.CopyOnWriteArrayList; import javax.servlet.ServletException; @@ -47,16 +49,18 @@ private List<TrackerArtifact> resolvedTrackerArtifacts; private final boolean uploadFiles; + private final boolean replaceFiles; public SFEEReleaseTask(AbstractBuild<?, ?> build, String releasePackageId, - String releaseName, String releaseToReplace, String maturity, - boolean uploadFiles) { + String releaseName, String releaseToReplace, + String maturity, boolean uploadFiles, boolean replaceFiles) { this.build = build; this.releasePackageId = releasePackageId; this.releaseName = releaseName; this.releaseToReplace = releaseToReplace; this.maturity = maturity; this.uploadFiles = uploadFiles; + this.replaceFiles = replaceFiles; } @Override @@ -99,12 +103,17 @@ public Object getDynamic(String token, StaplerRequest req, StaplerResponse rsp) { - if (token.equals("buildHistory")) { + if ("buildHistory".equals(token)) { return getHistoryWidget(); } + + if ("buildTimeTrend".equals(token)) { + return null; + } + return records.get(Integer.valueOf(token)); } - + private final class HistoryWidgetImpl extends HistoryWidget<SFEEReleaseTask<?>, Record> { private HistoryWidgetImpl() { @@ -150,6 +159,34 @@ record.result = Result.FAILURE; return; } + + if (isUploadFiles()) { + List buildArtifacts = build.getArtifacts(); + + for (Iterator iterator = buildArtifacts.iterator(); iterator + .hasNext();) { + Run.Artifact buildArtifact = (Run.Artifact) iterator + .next(); + + listener.getLogger().println( + "Uploading file " + + buildArtifact.getFileName() + + " form: " + + buildArtifact.getFile() + .toURL()); + + listener.getLogger().println( + "Existing file will " + + (isReplaceFiles() ? "" + : "not") + + " be overwitten"); + + site.uploadFileForRelease(fileReleaseId, + buildArtifact.getFileName(), + buildArtifact.getFile().toURL(), + isReplaceFiles()); + } + } } else { listener.getLogger().println( "Reusing previous release " + fileReleaseId); @@ -163,7 +200,7 @@ listener.getLogger().println( "Total time: " + Util.getTimeSpanString(duration)); - record.result = Result.UNSTABLE; + record.result = Result.SUCCESS; build.addAction(new SFEEReleaseCompletedTask( SFEEReleaseTask.this)); @@ -300,7 +337,8 @@ SystemFault, PermissionDeniedFault, RemoteException { final SourceForgeSite site = SourceForgeSite.DESCRIPTOR.getSite(); - final String releaseId; + String releaseId = null; + if (releaseToReplace != null) { listener.getLogger().printf("Update release '%s' to '%s'\n...", releaseToReplace, releaseName); @@ -319,11 +357,20 @@ maturity); } else { // create release - listener.getLogger().printf("Creating release '%s'\n", releaseName); - releaseId = site.createRelease(packageId, releaseName, "", - "active", maturity); + listener.getLogger().printf("Checking for existing release\n", + releaseName); + + releaseId = site.getReleaseId(packageId, releaseName); + + if( releaseId == null) { + listener.getLogger().printf("Creating new release '%s'\n", + releaseName); + + releaseId = site.createRelease(packageId, releaseName, "", "active", + maturity); + } } - + return releaseId; } @@ -334,13 +381,19 @@ SystemFault, PermissionDeniedFault, RemoteException { SourceForgeProject project = SourceForgeProject.getProperty(p); SourceForgeSite site = SourceForgeSite.DESCRIPTOR.getSite(); + List<ArtifactDetailSoapRow> findArtifactsResolvedInRelease = site .findArtifactsResolvedInRelease(releaseName, project .getProjectId()); + List<TrackerArtifact> trackerArtifacts = new ArrayList<TrackerArtifact>(); for (ArtifactDetailSoapRow r : findArtifactsResolvedInRelease) { + System.out.println("Adding new TrackerArtifact"); trackerArtifacts.add(new TrackerArtifact(r)); } + + System.out.println("TrackerArtifact size: " + trackerArtifacts.size()); + return trackerArtifacts; } @@ -365,6 +418,12 @@ } public List<TrackerArtifact> getResolvedTrackerArtifacts() { + try { + resolvedTrackerArtifacts = findResolvedArtifacts( + build.getProject(), releaseName); + } catch (Exception e) { + e.printStackTrace(); + } return resolvedTrackerArtifacts; } @@ -372,6 +431,10 @@ return uploadFiles; } + public boolean isReplaceFiles() { + return replaceFiles; + } + public CopyOnWriteArrayList<Record> getRecords() { return records; } diff -Nur ./src/main/java/hudson/plugins/sfee/SourceForgeSite.java ../sfee.new/src/main/java/hudson/plugins/sfee/SourceForgeSite.java --- ./src/main/java/hudson/plugins/sfee/SourceForgeSite.java 2008-07-08 09:23:54.000000000 +0200 +++ ../sfee.new/src/main/java/hudson/plugins/sfee/SourceForgeSite.java 2008-07-08 09:06:13.000000000 +0200 @@ -11,6 +11,8 @@ import hudson.plugins.sfee.webservice.FileStorageAppSoap; import hudson.plugins.sfee.webservice.FrsAppSoap; import hudson.plugins.sfee.webservice.FrsFileSoapDO; +import hudson.plugins.sfee.webservice.FrsFileSoapList; +import hudson.plugins.sfee.webservice.FrsFileSoapRow; import hudson.plugins.sfee.webservice.IllegalArgumentFault; import hudson.plugins.sfee.webservice.InvalidFilterFault; import hudson.plugins.sfee.webservice.InvalidSessionFault; @@ -40,7 +42,7 @@ import java.util.List; import javax.activation.DataHandler; -import javax.activation.URLDataSource; +// import javax.activation.URLDataSource; import org.kohsuke.stapler.DataBoundConstructor; import org.kohsuke.stapler.StaplerRequest; @@ -218,16 +220,49 @@ return null; } + /** + * Updates the title of the release with the given name. + * + * @return the id of the release that was changed, or null is no such + * release + * @throws RemoteException + * @throws PermissionDeniedFault + * @throws SystemFault + * @throws InvalidSessionFault + * @throws NoSuchObjectFault + */ + public String getReleaseId(String packageId, String name ) throws NoSuchObjectFault, InvalidSessionFault, + SystemFault, PermissionDeniedFault, RemoteException { + String releaseId = null; + FrsAppSoap frsApp = getFrsApp(); + String sessionId = getSessionId(); + + ReleaseSoapList existingReleases = frsApp.getReleaseList(sessionId, + packageId); + + for (ReleaseSoapRow row : existingReleases.getDataRows()) { + if (name.equals(row.getTitle())) { + releaseId = row.getId(); + break; + } + } + + return releaseId; + } + public List<ArtifactDetailSoapRow> findArtifactsResolvedInRelease( String releaseTitle, String projectId) throws InvalidFilterFault, NoSuchObjectFault, InvalidSessionFault, SystemFault, PermissionDeniedFault, RemoteException { List<ArtifactDetailSoapRow> result = new ArrayList<ArtifactDetailSoapRow>(); String sessionId = getSessionId(); + TrackerAppSoap trackerApp = getTrackerApp(); + for (TrackerSoapRow trackerRow : getTrackers(projectId)) { ArtifactDetailSoapList artifactDetailList = trackerApp .getArtifactDetailList(sessionId, trackerRow.getId(), null); + for (ArtifactDetailSoapRow row : artifactDetailList.getDataRows()) { if (releaseTitle.equals(row.getResolvedInReleaseTitle())) { result.add(row); @@ -249,17 +284,43 @@ return release.getId(); } + public String getFrsId(String releaseId, String fileName ) throws InvalidSessionFault, SystemFault, + RemoteException { + String ret = null; + String sessionId = getSessionId(); + FrsAppSoap frsApp = getFrsApp(); + + FrsFileSoapList fileSoapList = frsApp.getFrsFileList(sessionId, releaseId); + + for (FrsFileSoapRow row : fileSoapList.getDataRows()) { + if( fileName.equals(row.getFilename()) ) { + ret = row.getId(); + break; + } + } + + return ret; + } + public String uploadFileForRelease(String releaseId, String name, - URL sourceURL) throws InvalidSessionFault, SystemFault, + URL sourceURL, boolean forceUpdate) throws InvalidSessionFault, SystemFault, RemoteException { String sessionId = getSessionId(); FileStorageAppSoap fileApp = getFileStorageApp(); - DataHandler dataHandler = new DataHandler(new URLDataSource(sourceURL)); + DataHandler dataHandler = new DataHandler(sourceURL); String fileId = fileApp.uploadFile(sessionId, dataHandler); - FrsFileSoapDO frsFile = frsApp.createFrsFile(sessionId, releaseId, + + if( forceUpdate ) { + String frsId = getFrsId( releaseId, name ); + + if( frsId != null ) { + getFrsApp().deleteFrsFile(sessionId, frsId); + } + } + + FrsFileSoapDO frsFile = getFrsApp().createFrsFile(sessionId, releaseId, name, dataHandler.getContentType(), fileId); return frsFile.getId(); - } public PackageSoapRow[] getReleasePackages(String projectId) diff -Nur ./src/main/resources/hudson/plugins/sfee/SFEEReleaseCompletedTask/badge.jelly ../sfee.new/src/main/resources/hudson/plugins/sfee/SFEEReleaseCompletedTask/badge.jelly --- ./src/main/resources/hudson/plugins/sfee/SFEEReleaseCompletedTask/badge.jelly 1970-01-01 01:00:00.000000000 +0100 +++ ../sfee.new/src/main/resources/hudson/plugins/sfee/SFEEReleaseCompletedTask/badge.jelly 2008-07-08 09:06:14.000000000 +0200 @@ -0,0 +1,7 @@ +<j:jelly xmlns:j="jelly:core"> + <a href="${it.getFileReleaseUrl()}"> + <img width="16" height="16" + title="Uploaded to SFEE" + src="${imagesURL}/16x16/star-gold.gif"/> + </a> +</j:jelly> \ No newline at end of file diff -Nur ./src/main/resources/hudson/plugins/sfee/SFEEReleaseCompletedTask/summary.jelly ../sfee.new/src/main/resources/hudson/plugins/sfee/SFEEReleaseCompletedTask/summary.jelly --- ./src/main/resources/hudson/plugins/sfee/SFEEReleaseCompletedTask/summary.jelly 1970-01-01 01:00:00.000000000 +0100 +++ ../sfee.new/src/main/resources/hudson/plugins/sfee/SFEEReleaseCompletedTask/summary.jelly 2008-07-08 09:06:14.000000000 +0200 @@ -0,0 +1,25 @@ +<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"> + <t:summary icon="star-gold.gif"> + + <j:set var="url" value="${h.getNearestAncestorUrl(request,it)}"/> + <p> + SourceForge release: + </p> + <j:choose> + <j:when test="${it.releaseTask.resolvedTrackerArtifacts != null and it.releaseTask.resolvedTrackerArtifacts.size() gt 0}"> + <l:pane width="2" title="Artifacts resolved in <a href="${it.releaseTask.fileReleaseUrl}">${it.releaseTask.releaseName}</a>"> + <j:forEach var="t" items="${it.releaseTask.resolvedTrackerArtifacts}"> + <tr> + <td><a href="${t.getURL()}">${t.id}</a></td> + <td>${t.title}</td> + </tr> + </j:forEach> + </l:pane> + </j:when> + <j:otherwise> + <a href="${it.releaseTask.fileReleaseUrl}">${it.releaseTask.releaseName}</a> + </j:otherwise> + </j:choose> + </t:summary> +</j:jelly> + diff -Nur ./src/main/resources/hudson/plugins/sfee/SFEEReleasePublisher/config.jelly ../sfee.new/src/main/resources/hudson/plugins/sfee/SFEEReleasePublisher/config.jelly --- ./src/main/resources/hudson/plugins/sfee/SFEEReleasePublisher/config.jelly 1970-01-01 01:00:00.000000000 +0100 +++ ../sfee.new/src/main/resources/hudson/plugins/sfee/SFEEReleasePublisher/config.jelly 2008-07-08 09:06:14.000000000 +0200 @@ -0,0 +1,25 @@ +<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"> + + <f:entry title="Release Name regexp" help="/plugin/sfee/help-releasepulisher-regexp.html"> + <f:textbox name="sourceRegexp" value="${instance.sourceRegexp}"/> + </f:entry> + <f:entry title="Release Name" help="/plugin/sfee/help-releasepulisher-releasename.html"> + <f:textbox name="releaseName" value="${instance.releaseName}"/> + </f:entry> + <!-- f:entry title="Release to replace (leave empty if none)"> + <f:textbox name="releaseToReplace" value="${instance.releaseToReplace}"/> + </f:entry --> + <f:entry title="Maturity"> + <f:textbox name="maturity" value="${instance.maturity}"/> + </f:entry> + <!-- f:entry title="Upload files"> + <f:checkbox name="uploadArtifacts" checked="${instance.uploadArtifacts}"/> + </f:entry --> + <f:entry title="Replace existing files" help="/plugin/sfee/help-releasepulisher-replaceartifacts.html"> + <f:checkbox name="replaceArtifacts" checked="${instance.replaceArtifacts}"/> + </f:entry> + <f:entry title="Upload automatically after build" help="/plugin/sfee/help-releasepulisher-uploadauto.html"> + <f:checkbox name="uploadAutomatically" checked="${instance.uploadAutomatically}"/> + </f:entry> + +</j:jelly> \ No newline at end of file diff -Nur ./src/main/resources/hudson/plugins/sfee/SFEEReleaseTask/index.jelly ../sfee.new/src/main/resources/hudson/plugins/sfee/SFEEReleaseTask/index.jelly --- ./src/main/resources/hudson/plugins/sfee/SFEEReleaseTask/index.jelly 1970-01-01 01:00:00.000000000 +0100 +++ ../sfee.new/src/main/resources/hudson/plugins/sfee/SFEEReleaseTask/index.jelly 2008-07-08 09:06:14.000000000 +0200 @@ -0,0 +1,42 @@ +<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:test="/lib/test"> + <l:layout permission="${it.REDEPLOY}"> + <st:include it="${it.build}" page="sidepanel.jelly" /> + <l:side-panel> + <st:include it="${it.historyWidget}" page="index.jelly" /> + </l:side-panel> + + <l:main-panel> + <h1> + <img src="${imagesURL}/48x48/redo.gif" width="48" height="48" /> + Upload Artifacts to SourceForge + </h1> + + <j:choose> + <!-- A deployment is in progress --> + <j:when test="${it.workerThread!=null}"> + <st:include page="log.jelly" /> + </j:when> + + <!-- No deployment is in progress. Display the form. --> + <j:otherwise> + <j:choose> + <j:when test="${it.isCompleted()}"> + The <a href="${it.getFileReleaseUrl()}">upload</a> was successful. + </j:when> + <j:otherwise> + <p> + This page allows you to upload the build artifacts to SourceForge. + </p> + <f:form method="post" action="upload"> + <f:block> + <f:submit value="Upload" style="margin-top:1em;" /> + </f:block> + </f:form> + </j:otherwise> + </j:choose> + </j:otherwise> + </j:choose> + + </l:main-panel> + </l:layout> +</j:jelly> diff -Nur ./src/main/resources/hudson/plugins/sfee/SFEEReleaseTask/log.jelly ../sfee.new/src/main/resources/hudson/plugins/sfee/SFEEReleaseTask/log.jelly --- ./src/main/resources/hudson/plugins/sfee/SFEEReleaseTask/log.jelly 1970-01-01 01:00:00.000000000 +0100 +++ ../sfee.new/src/main/resources/hudson/plugins/sfee/SFEEReleaseTask/log.jelly 2008-07-08 09:06:14.000000000 +0200 @@ -0,0 +1,25 @@ +<!-- + Include this in the main page to display the log +--> +<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"> + <j:choose> + <!-- Do progressive console output --> + <j:when test="${it.workerThread.alive}"> + <pre id="out"></pre> + <div id="spinner"> + <img src="${imagesURL}/spinner.gif" /> + </div> + <t:progressiveText href="progressiveLog" idref="out" spinner="spinner" /> + </j:when> + <!-- output is completed now. --> + <j:otherwise> + <form method="get" action="clearError"> + <f:submit value="${%Clear error to retry}" /> + </form> + <j:if test="${it.workerThread != null}"> + <pre><st:copyStream reader="${it.workerThread.readAll()}" /></pre> + </j:if> + <pre><st:out value="${it.workerThread.log}"/></pre> + </j:otherwise> + </j:choose> +</j:jelly> \ No newline at end of file diff -Nur ./src/main/resources/hudson/plugins/sfeerelease/SFEEReleaseCompletedTask/badge.jelly ../sfee.new/src/main/resources/hudson/plugins/sfeerelease/SFEEReleaseCompletedTask/badge.jelly --- ./src/main/resources/hudson/plugins/sfeerelease/SFEEReleaseCompletedTask/badge.jelly 2008-07-08 09:23:54.000000000 +0200 +++ ../sfee.new/src/main/resources/hudson/plugins/sfeerelease/SFEEReleaseCompletedTask/badge.jelly 1970-01-01 01:00:00.000000000 +0100 @@ -1,7 +0,0 @@ -<j:jelly xmlns:j="jelly:core"> - <a href="${it.getFileReleaseUrl()}"> - <img width="16" height="16" - title="Uploaded to SFEE" - src="${imagesURL}/16x16/star-gold.gif"/> - </a> -</j:jelly> \ No newline at end of file diff -Nur ./src/main/resources/hudson/plugins/sfeerelease/SFEEReleaseCompletedTask/summary.jelly ../sfee.new/src/main/resources/hudson/plugins/sfeerelease/SFEEReleaseCompletedTask/summary.jelly --- ./src/main/resources/hudson/plugins/sfeerelease/SFEEReleaseCompletedTask/summary.jelly 2008-07-08 09:23:54.000000000 +0200 +++ ../sfee.new/src/main/resources/hudson/plugins/sfeerelease/SFEEReleaseCompletedTask/summary.jelly 1970-01-01 01:00:00.000000000 +0100 @@ -1,23 +0,0 @@ -<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"> - <t:summary icon="star-gold.gif"> - - <j:set var="url" value="${h.getNearestAncestorUrl(request,it)}"/> - <j:choose> - <j:when test="${it.resolvedTrackerArtifacts != null and it.resolvedTrackerArtifacts.size() gt 0}"> - <l:pane width="2" title="Artifacts resolved in <a href="${it.downloadURL}">${it.releaseName}</a>"> - <j:forEach var="t" items="${it.releaseTask.resolvedTrackerArtifacts}"> - <tr> - <td><a href="${t.getURL()}">${t.id}</a></td> - <td>${t.title}</td> - </tr> - </j:forEach> - </l:pane> - </j:when> - <j:otherwise> - <a href="${it.releaseTask.fileReleaseUrl}">Released to SourceForge</a> - </j:otherwise> - </j:choose> - - </t:summary> -</j:jelly> - diff -Nur ./src/main/resources/hudson/plugins/sfeerelease/SFEEReleasePublisher/config.jelly ../sfee.new/src/main/resources/hudson/plugins/sfeerelease/SFEEReleasePublisher/config.jelly --- ./src/main/resources/hudson/plugins/sfeerelease/SFEEReleasePublisher/config.jelly 2008-07-08 09:23:54.000000000 +0200 +++ ../sfee.new/src/main/resources/hudson/plugins/sfeerelease/SFEEReleasePublisher/config.jelly 1970-01-01 01:00:00.000000000 +0100 @@ -1,21 +0,0 @@ -<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"> - <f:entry title="Source Regexp"> - <f:textbox name="sourceRegexp" value="${instance.sourceRegexp}"/> - </f:entry> - <f:entry title="Release Name"> - <f:textbox name="releaseName" value="${instance.releaseName}"/> - </f:entry> - <f:entry title="Release to replace (leave empty if none)"> - <f:textbox name="releaseToReplace" value="${instance.releaseToReplace}"/> - </f:entry> - <f:entry title="Maturity"> - <f:textbox name="maturity" value="${instance.maturity}"/> - </f:entry> - <f:entry title="Upload files"> - <f:checkbox name="uploadArtifacts" checked="${instance.uploadArtifacts}"/> - </f:entry> - <f:entry title="Upload automatically after build"> - <f:checkbox name="uploadAutomatically" checked="${instance.uploadAutomatically}"/> - </f:entry> - -</j:jelly> \ No newline at end of file diff -Nur ./src/main/resources/hudson/plugins/sfeerelease/SFEEReleaseTask/index.jelly ../sfee.new/src/main/resources/hudson/plugins/sfeerelease/SFEEReleaseTask/index.jelly --- ./src/main/resources/hudson/plugins/sfeerelease/SFEEReleaseTask/index.jelly 2008-07-08 09:23:54.000000000 +0200 +++ ../sfee.new/src/main/resources/hudson/plugins/sfeerelease/SFEEReleaseTask/index.jelly 1970-01-01 01:00:00.000000000 +0100 @@ -1,42 +0,0 @@ -<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:test="/lib/test"> - <l:layout permission="${it.REDEPLOY}"> - <st:include it="${it.build}" page="sidepanel.jelly" /> - <l:side-panel> - <st:include it="${it.historyWidget}" page="index.jelly" /> - </l:side-panel> - - <l:main-panel> - <h1> - <img src="${imagesURL}/48x48/redo.gif" width="48" height="48" /> - Upload Artifacts to SourceForge - </h1> - - <j:choose> - <!-- A deployment is in progress --> - <j:when test="${it.workerThread!=null}"> - <st:include page="log.jelly" /> - </j:when> - - <!-- No deployment is in progress. Display the form. --> - <j:otherwise> - <j:choose> - <j:when test="${it.isCompleted()}"> - The <a href="${it.getFileReleaseUrl()}">upload</a> was successful. - </j:when> - <j:otherwise> - <p> - This page allows you to upload the build artifacts to SourceForge. - </p> - <f:form method="post" action="upload"> - <f:block> - <f:submit value="Upload" style="margin-top:1em;" /> - </f:block> - </f:form> - </j:otherwise> - </j:choose> - </j:otherwise> - </j:choose> - - </l:main-panel> - </l:layout> -</j:jelly> diff -Nur ./src/main/resources/hudson/plugins/sfeerelease/SFEEReleaseTask/log.jelly ../sfee.new/src/main/resources/hudson/plugins/sfeerelease/SFEEReleaseTask/log.jelly --- ./src/main/resources/hudson/plugins/sfeerelease/SFEEReleaseTask/log.jelly 2008-07-08 09:23:54.000000000 +0200 +++ ../sfee.new/src/main/resources/hudson/plugins/sfeerelease/SFEEReleaseTask/log.jelly 1970-01-01 01:00:00.000000000 +0100 @@ -1,25 +0,0 @@ -<!-- - Include this in the main page to display the log ---> -<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"> - <j:choose> - <!-- Do progressive console output --> - <j:when test="${it.workerThread.alive}"> - <pre id="out"></pre> - <div id="spinner"> - <img src="${imagesURL}/spinner.gif" /> - </div> - <t:progressiveText href="progressiveLog" idref="out" spinner="spinner" /> - </j:when> - <!-- output is completed now. --> - <j:otherwise> - <j:if test="${it.workerThread != null}"> - <pre><st:copyStream reader="${it.workerThread.readAll()}" /></pre> - </j:if> - <pre><st:out value="${it.workerThread.log}"/></pre> - <form method="get" action="clearError"> - <f:submit value="${%Clear error to retry}" /> - </form> - </j:otherwise> - </j:choose> -</j:jelly> \ No newline at end of file diff -Nur ./src/main/webapp/help-releasepulisher-regexp.html ../sfee.new/src/main/webapp/help-releasepulisher-regexp.html --- ./src/main/webapp/help-releasepulisher-regexp.html 1970-01-01 01:00:00.000000000 +0100 +++ ../sfee.new/src/main/webapp/help-releasepulisher-regexp.html 2008-07-08 09:06:14.000000000 +0200 @@ -0,0 +1,21 @@ +<div> + <p> + The regular expression will be applied to build log and + result will be applied to release name. + + Eg. + If in the build log there is string like + + MyProject Revision: MP-1-0.0 + + and regexp is: + .*MyProject Revision: ([^\\s]*) + + and Release Name is: + + \1 + + The resulting Release Name will be: + MP-1-0.0 +</p> +</div> \ No newline at end of file diff -Nur ./src/main/webapp/help-releasepulisher-releasename.html ../sfee.new/src/main/webapp/help-releasepulisher-releasename.html --- ./src/main/webapp/help-releasepulisher-releasename.html 1970-01-01 01:00:00.000000000 +0100 +++ ../sfee.new/src/main/webapp/help-releasepulisher-releasename.html 2008-07-08 09:06:14.000000000 +0200 @@ -0,0 +1,10 @@ +<div> + <p> + Name of the release. When used in conjuction with regex, + in can contains group matching string: + Eg. + MyProject-\1 + + Will substitute \1 with the first matching group of the predefined regex +</p> +</div> \ No newline at end of file diff -Nur ./src/main/webapp/help-releasepulisher-replaceartifacts.html ../sfee.new/src/main/webapp/help-releasepulisher-replaceartifacts.html --- ./src/main/webapp/help-releasepulisher-replaceartifacts.html 1970-01-01 01:00:00.000000000 +0100 +++ ../sfee.new/src/main/webapp/help-releasepulisher-replaceartifacts.html 2008-07-08 09:06:14.000000000 +0200 @@ -0,0 +1,6 @@ +<div> + <p> + When checked, if an artifact with the same name already exist in the release, + it will be overwritten. +</p> +</div> \ No newline at end of file diff -Nur ./src/main/webapp/help-releasepulisher-uploadauto.html ../sfee.new/src/main/webapp/help-releasepulisher-uploadauto.html --- ./src/main/webapp/help-releasepulisher-uploadauto.html 1970-01-01 01:00:00.000000000 +0100 +++ ../sfee.new/src/main/webapp/help-releasepulisher-uploadauto.html 2008-07-08 09:06:14.000000000 +0200 @@ -0,0 +1,6 @@ +<div> + <p> + When checked, Job artifact will be automatically uploaded + to SFEE at the end of the build. +</p> +</div> \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
Re: SFEE Hudson PluginSorry, missed this mail before... The reason this plugin is not
released is because of some dependencies on project-based security which were only available in the branch. I'll try to take a look at this again when I find the time. Tom On Tue, Jul 8, 2008 at 1:07 AM, Kohsuke Kawaguchi <Kohsuke.Kawaguchi@...> wrote: > Tom Huybrechts wrote: >> >> Hi Fulvio, >> >> what kind of changes have you made ? >> >> You can post a patch here, or (preferred) create an issue in the issue >> tracker and attach it. > > Is the plugin hard-coded to your environment, Tom? > > It seems like there's some interest in this plugin. I'd love to see it > released. > >> >> Tom >> >> On Fri, Jul 4, 2008 at 1:39 PM, Fulvio Cavarretta >> <fulvio.cavarretta@...> wrote: >>> >>> I've seen that draft plugin for integrating hudson with Collabnet SFEE >>> has >>> been developed yet. >>> >>> Starting form that source code I've made some modification in order to >>> make it working a little bit more. >>> Are you interested in my modifications? >>> If yes, where can I post them ? >>> >>> Regards, >>> Fulvio >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: dev-unsubscribe@... >>> For additional commands, e-mail: dev-help@... >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscribe@... >> For additional commands, e-mail: dev-help@... >> >> > > > -- > Kohsuke Kawaguchi > Sun Microsystems kohsuke.kawaguchi@... > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
| Free Forum Powered by Nabble | Forum Help |