Skip to content
Pete edited this page Feb 9, 2015 · 3 revisions
#!/bin/bash
#
# Author: Sameer Naik 
# Gist: https://gist.github.com/sameersbn/dd24dfdd13bc472d11a5
# Short Url (raw): http://goo.gl/iJcvCP
#
# Installs a bunch of plugins for the docker-redmine image
#
# Usage:
#   $ mkdir -p /opt/redmine/data/plugins
#   $ cd /opt/redmine/data/plugins
#   $ wget http://goo.gl/iJcvCP -O - | sh
#

set -e

#
## Install tarballs
#

# redmine tweaks plugin
# HOMEPAGE: https://github.com/alexandermeindl/redmine_tweaks
rm -rf redmine_tweaks
mkdir -p redmine_tweaks
wget -nv https://github.com/alexandermeindl/redmine_tweaks/archive/master.tar.gz -O - | tar -zvxf - --strip=1 -C redmine_tweaks

# line numbers plugin
# HOMEPAGE: https://github.com/cdwertmann/line_numbers
rm -rf line_numbers
mkdir -p line_numbers
wget -nv https://github.com/cdwertmann/line_numbers/archive/master.tar.gz -O - | tar -zvxf - --strip=1 -C line_numbers

# did you mean? plugin
# HOMEPAGE: https://github.com/abahgat/redmine_didyoumean
REDMINE_DID_YOU_MEAN_VERSION=1.2.0
rm -rf redmine_didyoumean
mkdir -p redmine_didyoumean
wget -nv https://github.com/abahgat/redmine_didyoumean/archive/${REDMINE_DID_YOU_MEAN_VERSION}.tar.gz -O - | tar -zvxf - --strip=1 -C redmine_didyoumean

# redmine embed video plugin
# HOMEPAGE: https://github.com/cforce/redmine_embedded_video
rm -rf redmine_embedded_video
mkdir -p redmine_embedded_video
wget -nv https://github.com/cforce/redmine_embedded_video/archive/master.tar.gz -O - | tar -zvxf - --strip=1 -C redmine_embedded_video

# redmine gist plugin
# HOMEPAGE: https://github.com/dergachev/redmine_gist
rm -rf redmine_gist
mkdir -p redmine_gist
wget -nv https://github.com/dergachev/redmine_gist/archive/master.tar.gz -O - | tar -zvxf - --strip=1 -C redmine_gist

# redmine tags plugin
# HOMEPAGE: https://github.com/ixti/redmine_tags
REDMINE_TAGS_VERSION=2.1.0
rm -rf redmine_tags
mkdir -p redmine_tags
wget -nv https://github.com/ixti/redmine_tags/archive/${REDMINE_TAGS_VERSION}.tar.gz -O - | tar -zvxf - --strip=1 -C redmine_tags

# issuefy plugin
# HOMEPAGE: https://github.com/tchx84/issuefy
rm -rf issuefy
mkdir -p issuefy
wget -nv https://github.com/tchx84/issuefy/archive/master.tar.gz -O - | tar -zvxf - --strip=1 -C issuefy

# open flash charts plugin (required by redmine_charts2)
# HOMEPAGE: https://github.com/pullmonkey/open_flash_chart
rm -rf open_flash_chart
mkdir -p open_flash_chart
wget -nv https://github.com/pullmonkey/open_flash_chart/archive/master.tar.gz -O - | tar -zvxf - --strip=1 -C open_flash_chart

cat >> init <> init </dev/null >/tmp/cron.redmine

# add new job for recurring tasks if it does not exist
if ! grep -q redmine:recur_tasks /tmp/cron.redmine; then
  echo '@hourly cd /home/redmine/redmine && bundle exec rake redmine:recur_tasks RAILS_ENV=production >> log/cron_rake.log 2>&1' >>/tmp/cron.redmine
  crontab -u redmine /tmp/cron.redmine 2>/dev/null
fi

# remove the temporary file
rm -rf /tmp/cron.redmine
EOF

# redmine dashboard tasks
# HOMEPAGE: https://github.com/jgraichen/redmine_dashboard
REDMINE_DASHBOARD_VERSION=master
rm -rf redmine_dashboard
mkdir -p redmine_dashboard
wget -nv https://github.com/jgraichen/redmine_dashboard/archive/${REDMINE_DASHBOARD_VERSION}.tar.gz -O - | tar -zvxf - --strip=1 -C redmine_dashboard

# redmine code review plugin
# HOMEPAGE: https://bitbucket.org/haru_iida/redmine_code_review
REDMINE_CODE_REVIEW_VERSION=0.6.3
rm -rf redmine_code_review
mkdir -p redmine_code_review
wget -nv https://bitbucket.org/haru_iida/redmine_code_review/get/${REDMINE_CODE_REVIEW_VERSION}.tar.gz -O - | tar -zvxf - --strip=1 -C redmine_code_review

#
## Install zipped archives
#

# checklists plugin
# HOMEPAGE: http://redminecrm.com/projects/checklist/pages/1
REDMINE_CHECKLISTS_VERSION=3_0_1
rm -rf redmine_checklists
wget http://redminecrm.com/license_manager/14218/redmine_checklists-${REDMINE_CHECKLISTS_VERSION}-light.zip -P /tmp/
unzip /tmp/redmine_checklists-${REDMINE_CHECKLISTS_VERSION}-light.zip
rm -rf /tmp/redmine_checklists-${REDMINE_CHECKLISTS_VERSION}-light.zip

# redmine people plugin
# HOMEPAGE: http://redminecrm.com/projects/people/pages/1
REDMINE_PEOPLE_VERSION=0_1_8
rm -rf redmine_people
wget http://redminecrm.com/license_manager/11368/redmine_people-${REDMINE_PEOPLE_VERSION}.zip -P /tmp/
unzip /tmp/redmine_people-${REDMINE_PEOPLE_VERSION}.zip
rm -rf /tmp/redmine_people-${REDMINE_PEOPLE_VERSION}.zip

# redmine agile plugin
# HOMEPAGE: http://redminecrm.com/projects/agile/pages/1
REDMINE_AGILE_VERSION=1_3_2
rm -rf redmine_agile
wget http://redminecrm.com/license_manager/13082/redmine_agile-${REDMINE_AGILE_VERSION}-light.zip -P /tmp/
unzip /tmp/redmine_agile-${REDMINE_AGILE_VERSION}-light.zip
rm -rf /tmp/redmine_agile-${REDMINE_AGILE_VERSION}-light.zip

# redmine contacts plugin
# HOMEPAGE: http://redminecrm.com/projects/crm/pages/1
REDMINE_CONTACTS_VERSION=3.4.4
rm -rf redmine_contacts
wget http://redminecrm.com/license_manager/15889/redmine_contacts-${REDMINE_CONTACTS_VERSION}-light.zip -P /tmp/
unzip /tmp/redmine_contacts-${REDMINE_CONTACTS_VERSION}-light.zip
rm -rf /tmp/redmine_contacts-${REDMINE_CONTACTS_VERSION}-light.zip
sed 's/gem "spreadsheet/# gem "spreadsheet/' -i redmine_contacts/Gemfile


Clone this wiki locally