-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get working with Mercurial plugin (and Subversion too). #6
Conversation
duck typing re different methods provided by git and mercurial plugins.
This will also make CI Skip compatible with the subversion plugin, as looking at the code for that plugin, SubversionChangeLogSet has a getMsg() method rather than a getComment() one. |
I'm so sorry that it takes time to merge 🙇 🙇 |
Thank you for merging my changes in anyway - all good things take time ;-) |
Dependencies are pretty old, I've tried to update it now. Just a moment... |
Uh-oh... Can't upload... It seems exactly same with jenkinsci/jenkins.rb#100
I'll try it later as well. 🙇 |
DEV banyan ☁ diff -u /Users/banyan/.gem/jruby/2.3.1/gems/jpi-0.4.1/lib/jenkins/plugin/tools/release.rb.bak /Users/banyan/.gem/jruby/2.3.1/gems/jpi-0.4.1/lib/jenkins/plugin/tools/release.rb
--- /Users/banyan/.gem/jruby/2.3.1/gems/jpi-0.4.1/lib/jenkins/plugin/tools/release.rb.bak 2017-04-14 21:12:58.000000000 +0900
+++ /Users/banyan/.gem/jruby/2.3.1/gems/jpi-0.4.1/lib/jenkins/plugin/tools/release.rb 2017-04-14 21:13:05.000000000 +0900
@@ -56,6 +56,7 @@
version = @snapshot ? @spec.version+"-SNAPSHOT" : @spec.version
pom = ERB.new(File.read(File.dirname(__FILE__)+"/templates/release-pom.xml.erb")).result(binding)
path = "/#{@snapshot?'snapshots':'releases'}/org/jenkins-ci/ruby-plugins/#{@spec.name}/#{version}/#{@spec.name}-#{version}"
+ p path
req = Net::HTTP::Put.new("#{path}.pom")
req.body = pom
req.basic_auth(cred.user_name,cred.password)
It looks path is correct, I wonder if the server permission is really changed? hmm |
I've uploaded hpi file for now: https://github.com/banyan/jenkins-ci-skip-plugin/releases/tag/v0.1.0 As you may know, you can use |
I've mentioned this on Twitter just now - https://twitter.com/kenguest/status/852869281272475649 - somebody might be able to advise :-) Thanks for all your work! |
Added duck typing re different methods provided by git and mercurial plugins, so that the CI Skip plugin can skip commits coming from Mercurial, dependant on content in the commit message.
The git plugin provides the commit message via getComment, and getCommitId for the id of that commit.
The Mercurial plugin provides the same information via getMsg and getNode respectively.
Compare https://github.com/jenkinsci/git-plugin/blob/master/src/main/java/hudson/plugins/git/GitChangeSet.java and https://github.com/jenkinsci/mercurial-plugin/blob/master/src/main/java/hudson/plugins/mercurial/MercurialChangeSet.java