GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - brnhrdt/stash-pullrequest-builder-plugin: A Jenkins plugin for Building Stash Pull Request

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

59 Commits
59 Commits

Folders and files

NameName
Last commit message
Last commit date
src
src
 
 
.gitignore
.gitignore
 
 
COPYING
COPYING
 
 
README.md
README.md
 
 
pom.xml
pom.xml
 
 

Repository files navigation

Stash Pull Request Builder Plugin

Join the chat at https://gitter.im/nemccarthy/stash-pullrequest-builder-plugin

This Jenkins plugin builds pull requests from a Atlassian Stash server and will report the test results as a comment. This plugin was inspired by the GitHub & BitBucket pull request builder plugins.

  • Official Jenkins Plugin Page; https://wiki.jenkins-ci.org/display/JENKINS/Stash+pullrequest+builder+plugin
  • See this blogpost for more details; http://blog.nemccarthy.me/?p=387

##Prerequisites

  • Jenkins 1.532 or higher.
  • Git Plugin - https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin

##Creating a Job

  • Create a new job
  • Select Git SCM
  • Add Repository URL as bellow
    • [email protected]:${projectCode}/${repositoryName}.git
  • In Branch Specifier, type as bellow
    • */${sourceBranch}
  • Under Build Triggers, check Stash Pull Request Builder
  • In Cron, enter crontab for this job.
    • e.g. every minute: * * * * *
  • In Stash BasicAuth Username - Stash username like jenkins-buildbot
  • In Stash BasicAuth Password - Jenkins Build Bot password
  • Supply project code (this is the abbreviated project code, e.g. PRJ)
  • Supply Repository Name (e.g. myRepo)
  • Save to preserve your changes

##Merge the Pull Request's Source Branch into the Target Branch Before Building

You may want Jenkins to attempt to merge your PR before doing the build -- this way it will find conflicts for you automatically.

  • Follow the steps above in "Creating a Job"
  • In the "Source Code Management" > "Git" > "Additional Behaviors" section, click "Add" > "Merge Before Building"
  • In "Name of Repository" put "origin" (or, if not using default name, use your remote repository's name. Note: unlike in the main part of the Git Repository config, you cannot leave this item blank for "default".)
  • In "Branch to merge to" put "${targetBranch}"
  • Note that as long as you don't push these changes to your remote repository, the merge only happens in your local repository.

If you are merging into your target branch, you might want Jenkins to do a new build of the Pull Request when the target branch changes.

  • There is a checkbox that says, "Rebuild if destination branch changes?" which enables this check.

##Rerun test builds

If you want to rerun pull request test, write “test this please” comment to your pull request.

Post Build Comment

It is possible to add a post build action that gives the option to post additional information to Stash when a build has been either successful or failed. These comments can contain environment variables that will be translated when posted to Stash.

This feature can be used to post for instance a url to the deployed application or code coverage at a successful build and why the build failed like what tests that did not pass.

##Copyright

Copyright © 2015 Nathan McCarthy.

##License

  • BSD License

About

A Jenkins plugin for Building Stash Pull Request

Resources

Readme
License
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.