Skip to content

Commit

Permalink
added new parameter disable_notifications in relation to setenv.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
ferencvarga committed Apr 28, 2015
1 parent e9b7de4 commit 4a0d22b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
3 changes: 2 additions & 1 deletion manifests/init.pp
Expand Up @@ -88,7 +88,8 @@
$java_opts = '',

# Misc Settings
$downloadURL = 'http://www.atlassian.com/software/jira/downloads/binary/',
$downloadURL = 'http://www.atlassian.com/software/jira/downloads/binary/',
$disable_notifications = false,

# Choose whether to use nanliu-staging, or mkrakowitzer-deploy
# Defaults to nanliu-staging as it is puppetlabs approved.
Expand Down
13 changes: 12 additions & 1 deletion spec/classes/jira_config_spec.rb
Expand Up @@ -13,7 +13,8 @@
:version => '6.3.4a',
:javahome => '/opt/java',
}}
it { should contain_file('/opt/jira/atlassian-jira-6.3.4a-standalone/bin/setenv.sh')}
it { should contain_file('/opt/jira/atlassian-jira-6.3.4a-standalone/bin/setenv.sh')
.with_content(/#DISABLE_NOTIFICATIONS=/) }
it { should contain_file('/opt/jira/atlassian-jira-6.3.4a-standalone/bin/user.sh')}
it { should contain_file('/opt/jira/atlassian-jira-6.3.4a-standalone/conf/server.xml')}
it { should contain_file('/home/jira/dbconfig.xml')
Expand Down Expand Up @@ -171,6 +172,16 @@
it { should contain_file('/opt/jira/atlassian-jira-6.3.4a-standalone/conf/context.xml')
.with_content(/<Resource name = "testdb"\n auth = "Container"\n \/>/) }
end

context 'disable notifications' do
let(:params) {{
:version => '6.3.4a',
:javahome => '/opt/java',
:disable_notifications => true,
}}
it { should contain_file('/opt/jira/atlassian-jira-6.3.4a-standalone/bin/setenv.sh')
.with_content(/^DISABLE_NOTIFICATIONS=/) }
end
end
end
end
Expand Down
5 changes: 4 additions & 1 deletion templates/setenv.sh.erb
Expand Up @@ -27,8 +27,11 @@ JVM_REQUIRED_ARGS="-Djava.awt.headless=true -Datlassian.standalone=JIRA -Dorg.ap

# Uncomment this setting if you want to import data without notifications
#
<% if @disable_notifications -%>
DISABLE_NOTIFICATIONS=" -Datlassian.mail.senddisabled=true -Datlassian.mail.fetchdisabled=true -Datlassian.mail.popdisabled=true"
<% else %>
#DISABLE_NOTIFICATIONS=" -Datlassian.mail.senddisabled=true -Datlassian.mail.fetchdisabled=true -Datlassian.mail.popdisabled=true"

<% end -%>

#-----------------------------------------------------------------------------------
#
Expand Down

0 comments on commit 4a0d22b

Please sign in to comment.