Skip to content

Commit

Permalink
[FIXED JENKINS-28405] Add support for all missing git code browsers
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Philippe BOLATRE committed May 14, 2015
1 parent f5d0603 commit 3c5f894
Show file tree
Hide file tree
Showing 3 changed files with 451 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/Job-reference.md
Expand Up @@ -1029,6 +1029,24 @@ job {
ignoreNotifyCommit(boolean value = true) // since 1.33
browser { // since 1.26
stash(String url) // URL to the Stash repository, optional
// since 1.35
assemblaweb(String repoUrl) // URL to the Assembla repository, optional
fisheye(String url) // URL to the FishEye repository, optional
kiln(String url) // URL to the Kiln repository, optional
tfs2013(String repoUrl) // URL to the Microsoft Team Foundation Server repository, optional
bitbucketweb(String url) // URL to the BitBucket repository, optional
cgit(String url) // URL to the CGit repository, optional
gitblit(String url, String projectName) // GitBlit root URL, project name in GitBlit, optional
githubweb(String url) // URL to the GitHub repository, optional
gitiles(String repoUrl) // URL to the Gitiles repository, optional
gitlab(String url, String version) // URL to the Gitlab repository, Major.Minor gitlab version (ex: 7.9), optional
gitlist(String repoUrl) // URL to the GitList repository, optional
gitoriousweb(String repoUrl) // URL to the Gitorious repository, optional
gitweb(String repoUrl) // URL to the jjjjjj repository, optional
phabricator(String repoUrl, String repo) // URL to the Phabricator repository, repository name in Phabricator, optional
redmineweb(String repoUrl) // URL to the Redmine repository, optional
rhodecode(String repoUrl) // URL to the RhodeCode repository, optional
viewgit(String repoUrl, String projectName) // URL to the ViewGit repository, optional
}
strategy { // since 1.30
inverse()
Expand Down
Expand Up @@ -10,4 +10,110 @@ class GitBrowserContext implements Context {
delegate.url(url)
}
}

void assemblaweb(String repoUrl) {
browser = NodeBuilder.newInstance().browser(class: 'hudson.plugins.git.browser.AssemblaWeb') {
delegate.repoUrl(repoUrl)
}
}

void fisheye(String url) {
browser = NodeBuilder.newInstance().browser(class: 'hudson.plugins.git.browser.FisheyeGitRepositoryBrowser') {
delegate.url(url)
}
}

void kiln(String url) {
browser = NodeBuilder.newInstance().browser(class: 'hudson.plugins.git.browser.KilnGit') {
delegate.url(url)
}
}

void tfs2013(String repoUrl) {
browser = NodeBuilder.newInstance().browser(class: 'hudson.plugins.git.browser.TFS2013GitRepositoryBrowser') {
delegate.repoUrl(repoUrl)
}
}

void bitbucketweb(String url) {
browser = NodeBuilder.newInstance().browser(class: 'hudson.plugins.git.browser.BitbucketWeb') {
delegate.url(url)
}
}

void cgit(String url) {
browser = NodeBuilder.newInstance().browser(class: 'hudson.plugins.git.browser.CGit') {
delegate.url(url)
}
}

void gitblit(String url, String projectName) {
browser = NodeBuilder.newInstance().browser(class: 'hudson.plugins.git.browser.GitBlitRepositoryBrowser') {
delegate.url(url)
delegate.projectName(projectName)
}
}

void githubweb(String url) {
browser = NodeBuilder.newInstance().browser(class: 'hudson.plugins.git.browser.GithubWeb') {
delegate.url(url)
}
}

void gitiles(String repoUrl) {
browser = NodeBuilder.newInstance().browser(class: 'hudson.plugins.git.browser.Gitiles') {
delegate.repoUrl(repoUrl)
}
}

void gitlab(String url, String version) {
browser = NodeBuilder.newInstance().browser(class: 'hudson.plugins.git.browser.GitLab') {
delegate.url(url)
delegate.version(version)
}
}

void gitlist(String repoUrl) {
browser = NodeBuilder.newInstance().browser(class: 'hudson.plugins.git.browser.GitList') {
delegate.repoUrl(repoUrl)
}
}

void gitoriousweb(String repoUrl) {
browser = NodeBuilder.newInstance().browser(class: 'hudson.plugins.git.browser.GitoriousWeb') {
delegate.repoUrl(repoUrl)
}
}

void gitweb(String repoUrl) {
browser = NodeBuilder.newInstance().browser(class: 'hudson.plugins.git.browser.GitWeb') {
delegate.repoUrl(repoUrl)
}
}

void phabricator(String repoUrl, String repo) {
browser = NodeBuilder.newInstance().browser(class: 'hudson.plugins.git.browser.Phabricator') {
delegate.repoUrl(repoUrl)
delegate.repo(repo)
}
}

void redmineweb(String repoUrl) {
browser = NodeBuilder.newInstance().browser(class: 'hudson.plugins.git.browser.RedmineWeb') {
delegate.repoUrl(repoUrl)
}
}

void rhodecode(String repoUrl) {
browser = NodeBuilder.newInstance().browser(class: 'hudson.plugins.git.browser.RhodeCode') {
delegate.repoUrl(repoUrl)
}
}

void viewgit(String repoUrl, String projectName) {
browser = NodeBuilder.newInstance().browser(class: 'hudson.plugins.git.browser.ViewGitWeb') {
delegate.repoUrl(repoUrl)
delegate.projectName(projectName)
}
}
}

0 comments on commit 3c5f894

Please sign in to comment.