Last active
August 29, 2015 14:18
-
-
Save christiangalsterer/5d84c5b7d0c1167167fe to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/sh | |
# Copyright 2015 Christian Galsterer | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
# Dispatcher script to trigger Jenkins jobs using the Jenkins Git Plugin (https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin) notify commit feature together with Atlassian Stash using the Pull Request Notifier for Stash add-on (https://marketplace.atlassian.com/plugins/se.bjurr.prnfs.pull-request-notifier-for-stash). | |
# https://gist.github.com/christiangalsterer/5d84c5b7d0c1167167fe | |
# Modify to point to your stash instance | |
STASH_SSH_URL_PREFIX='ssh://git@stash' | |
curl -k "$JENKINS_URL/git/notifyCommit?url=$STASH_SSH_URL_PREFIX/$PULL_REQUEST_TO_REPO_PROJECT_KEY/$PULL_REQUEST_TO_REPO_NAME&branches=$PULL_REQUEST_TO_BRANCH&sha1=$PULL_REQUEST_FROM_HASH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment