forked from clkkishore/teamconcert-git-plugin
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
kkishore
committed
Oct 8, 2014
1 parent
28e7f44
commit f9818ab
Showing
63 changed files
with
5,316 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/.settings | ||
/build | ||
/launches | ||
/loadrules | ||
/META-INF | ||
/target | ||
/work | ||
/.classpath | ||
/.jazzIgnore | ||
/.project | ||
/build.properties |
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 |
---|---|---|
@@ -0,0 +1,166 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2014 IBM Corporation and others. | ||
All rights reserved. This program and the accompanying materials | ||
are made available under the terms of the Eclipse Public License v1.0 | ||
which accompanies this distribution, and is available at | ||
http://www.eclipse.org/legal/epl-v10.html | ||
Contributors: | ||
IBM Corporation - initial API and implementation | ||
--> | ||
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>plugin</artifactId> | ||
<version>1.480.3</version> | ||
</parent> | ||
|
||
<groupId>com.ibm.team.git.build.hjplugin</groupId> | ||
<artifactId>teamconcert.git</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
<packaging>hpi</packaging> | ||
|
||
<name>Team Concert Git Plugin</name> | ||
<description>Integrates Jenkins with Rational Team Concert for Jenkins Builds which use Git as source control. This plugin will create tracebility links from a Jenkins build to RTC work items and build result.</description> | ||
<url>https://wiki.jenkins-ci.org/display/JENKINS/Team+Concert+Git+Plugin</url> | ||
|
||
<licenses> | ||
<license> | ||
<name>Eclipse Public License v1.0</name> | ||
<comments> | ||
/******************************************************************************* | ||
* Copyright (c) 2014 IBM Corporation and others. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* IBM Corporation - initial API and implementation | ||
*******************************************************************************/ | ||
</comments> | ||
</license> | ||
</licenses> | ||
|
||
<developers> | ||
<developer> | ||
<id>clkkishore</id> | ||
<name>Krishna Kishore</name> | ||
</developer> | ||
</developers> | ||
|
||
|
||
<properties> | ||
<tycho-version>0.19.0</tycho-version> | ||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
<project.build.outputEncoding>UTF-8</project.build.outputEncoding> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<!-- get every artifact through maven.glassfish.org, which proxies all the artifacts that we need --> | ||
<repositories> | ||
<!-- | ||
<repository> | ||
<id>m.g.o-public</id> | ||
<url>http://maven.glassfish.org/content/groups/public/</url> | ||
</repository> | ||
--> | ||
<repository> | ||
<id>repo.jenkins-ci.org</id> | ||
<url>http://repo.jenkins-ci.org/public/</url> | ||
</repository> | ||
</repositories> | ||
|
||
<pluginRepositories> | ||
<!-- | ||
<pluginRepository> | ||
<id>m.g.o-public</id> | ||
<url>http://maven.glassfish.org/content/groups/public/</url> | ||
</pluginRepository> | ||
--> | ||
<pluginRepository> | ||
<id>repo.jenkins-ci.org</id> | ||
<url>http://repo.jenkins-ci.org/public/</url> | ||
</pluginRepository> | ||
</pluginRepositories> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.11</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-all</artifactId> | ||
<version>1.8.5</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>credentials</artifactId> | ||
<version>1.16.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.httpcomponents</groupId> | ||
<artifactId>httpclient</artifactId> | ||
<version>4.3.3</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
<version>1.7.5</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>ssh-credentials</artifactId> | ||
<version>1.9</version> | ||
<type>hpi</type> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<!-- enable tycho build extension --> | ||
<groupId>org.eclipse.tycho</groupId> | ||
<artifactId>tycho-maven-plugin</artifactId> | ||
<version>${tycho-version}</version> | ||
<extensions>true</extensions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<configuration> | ||
<skipTests>false</skipTests> | ||
<includes> | ||
<include>**/*Tests.java</include> | ||
</includes> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>test-jar</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
|
||
</build> | ||
|
||
<scm> | ||
<url>https://github.com/jenkinsci/teamconcert-git-plugin</url> | ||
<connection>scm:git:https://github.com/jenkinsci/teamconcert-git-plugin.git</connection> | ||
<developerConnection>scm:git:https://github.com/jenkinsci/teamconcert-git-plugin.git</developerConnection> | ||
<tag>HEAD</tag> | ||
</scm> | ||
</project> |
74 changes: 74 additions & 0 deletions
74
...it.build.hjplugin/src/main/java/com/ibm/team/git/build/hjplugin/BuildParameterAction.java
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 |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2014 IBM Corporation and others. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* IBM Corporation - initial API and implementation | ||
*******************************************************************************/ | ||
package com.ibm.team.git.build.hjplugin; | ||
|
||
import hudson.model.InvisibleAction; | ||
|
||
public class BuildParameterAction extends InvisibleAction { | ||
|
||
private final String rtcURL; | ||
private final String rtcBuildUUID; | ||
private final boolean shouldAnnotate; | ||
private final boolean ownsBuildCycle; | ||
private String credentialsId; | ||
private String trackbuildwi; | ||
private final int timeout; | ||
private String[] workitems; | ||
|
||
public BuildParameterAction(String credentialsId, int timeout, | ||
String rtcURL, String rtcBuildUUID, boolean ownsBuildCycle, | ||
String trackbuildwi, | ||
boolean shouldAnnotate) { | ||
this.credentialsId = credentialsId; | ||
this.rtcURL = rtcURL; | ||
this.rtcBuildUUID = rtcBuildUUID; | ||
this.shouldAnnotate = shouldAnnotate; | ||
this.ownsBuildCycle = ownsBuildCycle; | ||
this.trackbuildwi = trackbuildwi; | ||
this.timeout = timeout; | ||
} | ||
|
||
public String getTrackbuildWi() { | ||
return trackbuildwi; | ||
} | ||
|
||
public int getTimeout() { | ||
return timeout; | ||
} | ||
|
||
public String getCredentialsId() { | ||
return credentialsId; | ||
} | ||
|
||
public String getRtcURL() { | ||
return rtcURL; | ||
} | ||
|
||
public String getRtcBuildUUID() { | ||
return rtcBuildUUID; | ||
} | ||
|
||
public boolean shouldAnnotate() { | ||
return shouldAnnotate; | ||
} | ||
|
||
public boolean iOwnBuildCycle() { | ||
return ownsBuildCycle; | ||
} | ||
|
||
public String[] getWorkitems() { | ||
return workitems; | ||
} | ||
|
||
public void setWorkitems(String[] workitems) { | ||
this.workitems = workitems; | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...d.hjplugin/src/main/java/com/ibm/team/git/build/hjplugin/InvalidCredentialsException.java
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2014 IBM Corporation and others. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* IBM Corporation - initial API and implementation | ||
*******************************************************************************/ | ||
package com.ibm.team.git.build.hjplugin; | ||
|
||
@SuppressWarnings("serial") | ||
public class InvalidCredentialsException extends Exception { | ||
|
||
public InvalidCredentialsException(String errorMessage) { | ||
super(errorMessage); | ||
} | ||
|
||
public InvalidCredentialsException(String errorMessage, Throwable e) { | ||
super(errorMessage, e); | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
...it.build.hjplugin/src/main/java/com/ibm/team/git/build/hjplugin/RTCBuildResultAction.java
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2014 IBM Corporation and others. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* IBM Corporation - initial API and implementation | ||
*******************************************************************************/ | ||
package com.ibm.team.git.build.hjplugin; | ||
|
||
import com.ibm.team.git.build.hjplugin.util.RTCHttpConstants; | ||
|
||
import hudson.model.Action; | ||
|
||
public class RTCBuildResultAction implements Action{ | ||
|
||
private String buildResultUUID; | ||
private String serverURI; | ||
|
||
public RTCBuildResultAction(String serverURI, String buildResultUUID) { | ||
this.buildResultUUID = buildResultUUID; | ||
this.serverURI = serverURI; | ||
} | ||
|
||
public String getIconFileName() { | ||
// TODO Use a Jenkins one for now | ||
if (!RTCUtils.IsNullOrEmpty(serverURI) && !RTCUtils.IsNullOrEmpty(buildResultUUID)) { | ||
return "star-gold.gif"; //$NON-NLS-1$ | ||
} | ||
// show nothing in task list | ||
return null; | ||
} | ||
|
||
public String getDisplayName() { | ||
if (!RTCUtils.IsNullOrEmpty(serverURI) && !RTCUtils.IsNullOrEmpty(buildResultUUID)) { | ||
return Messages.RTCBuildResultAction_display_name(); | ||
} | ||
return null; | ||
} | ||
|
||
public String getUrlName() { | ||
if (!RTCUtils.IsNullOrEmpty(serverURI) && !RTCUtils.IsNullOrEmpty(buildResultUUID)) { | ||
return RTCUtils.makeFullURL(serverURI, RTCHttpConstants.BUILD_RESULT_ITEM_OID + buildResultUUID); | ||
} | ||
return null; | ||
} | ||
|
||
} |
Oops, something went wrong.