From 4e94ff44da4cfcbcdb417cede5a4906ae51b3bcc Mon Sep 17 00:00:00 2001 From: caguilar187 Date: Wed, 16 May 2018 10:20:05 -0400 Subject: [PATCH 1/2] updating version and readme instructions --- README.md | 7 ++++--- jenkins-gitlab-hook.pluginspec | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d8a305b..fe6a5b8 100644 --- a/README.md +++ b/README.md @@ -248,7 +248,8 @@ No special options are required to execute the test on recent JRuby versions (su ## Development Locally building: -- Download latest stable jruby tar +- Download latest stable jruby tar, recommended to be in 1.9 mode +-- `rvm install jruby-1.7.27 --1.9` - Extract and add bin/ directory to your $PATH - To install run: -- `export GEM_HOME=~/.ruby/gems` @@ -258,7 +259,7 @@ Locally building: To test locally in Jenkins - Download latest Jenkins distribution - Extract and run `java -jar jenkins.war` -- Upload `pkg/gitlab-hook-nojenkinscommits.hpi` into Jenkins manual install interface +- Upload `pkg/gitlab-hook.hpi` into Jenkins manual install interface -Example post bodies are available on the [gitlab webhook page](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/web_hooks/web_hooks.md) +Example post bodies are available on the [gitlab webhook page](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/project/integrations/webhooks.md) diff --git a/jenkins-gitlab-hook.pluginspec b/jenkins-gitlab-hook.pluginspec index 8b81204..a833456 100644 --- a/jenkins-gitlab-hook.pluginspec +++ b/jenkins-gitlab-hook.pluginspec @@ -1,7 +1,7 @@ Jenkins::Plugin::Specification.new do |plugin| plugin.name = "gitlab-hook" plugin.display_name = "Gitlab Hook Plugin" - plugin.version = '1.4.2' + plugin.version = '1.4.3' plugin.description = 'Enables Gitlab web hooks to be used to trigger SMC polling on Gitlab projects' plugin.url = 'https://wiki.jenkins-ci.org/display/JENKINS/Gitlab+Hook+Plugin' From f61e2c3a5d94e9351ffef1ae9cef0c878532155c Mon Sep 17 00:00:00 2001 From: caguilar187 Date: Wed, 16 May 2018 10:31:16 -0400 Subject: [PATCH 2/2] fix null pointer issue when secret token was empty --- models/gitlab_notifier.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/gitlab_notifier.rb b/models/gitlab_notifier.rb index f3c5ae5..161e69e 100644 --- a/models/gitlab_notifier.rb +++ b/models/gitlab_notifier.rb @@ -72,7 +72,7 @@ class GitlabNotifierDescriptor < Jenkins::Model::DefaultDescriptor attr_reader :gitlab_url def token - @token.get_plain_text + Secret.toString @token end def commit_status?