Skip to content
This repository has been archived by the owner on Jan 23, 2021. It is now read-only.

Commit

Permalink
Merge pull request #206 from akiko-pusu/develop
Browse files Browse the repository at this point in the history
Ready for Release v0.3.0 / Support Redmine 4.0
  • Loading branch information
akiko-pusu authored Jan 15, 2019
2 parents 2238500 + a4f9e0d commit 49f6a05
Show file tree
Hide file tree
Showing 81 changed files with 1,028 additions and 948 deletions.
63 changes: 58 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@ jobs:
build:
docker:
# specify the version you desire here (ruby 2.4.x)
- image: circleci/ruby:2.4-node-browsers
- image: circleci/ruby:2.5-browsers-legacy
steps:
- checkout

test:
docker:
# specify the version you desire here
- image: circleci/ruby:2.4-node-browsers
- image: circleci/ruby:2.5-browsers-legacy
environment:
RAILS_ENV: test
DB_HOST: 127.0.0.1
Expand All @@ -39,6 +38,7 @@ jobs:
command: |
REDMINE_BRANCH=3.4-stable sh script/circleci-setup.sh
- run: bundle install --path vendor/bundle --without postgresql rmagick && bundle update
- run: bundle exec rails g rspec:install
- run: bundle exec rake db:create RAILS_ENV=test
- run: bundle exec rake db:migrate RAILS_ENV=test
- run: bundle exec rake redmine:plugins:migrate RAILS_ENV=test
Expand All @@ -47,9 +47,52 @@ jobs:
bundle exec rake ${CIRCLE_PROJECT_REPONAME}:test RAILS_ENV=test
- run:
command: |
bundle exec rspec -I plugins/${CIRCLE_PROJECT_REPONAME}/spec --format documentation \
plugins/redmine_issue_templates/spec/
bundle exec rake ${CIRCLE_PROJECT_REPONAME}:spec RAILS_ENV=test
- run:
command: |
bundle exec rake redmine:plugins:migrate NAME=${CIRCLE_PROJECT_REPONAME} \
VERSION=0 RAILS_ENV=test
- run:
command: |
mkdir -p /tmp/coverage
cp -r coverage/${CIRCLE_PROJECT_REPONAME}_test /tmp/coverage/
cp -r coverage/${CIRCLE_PROJECT_REPONAME}_spec /tmp/coverage/
- store_artifacts:
path: /tmp/coverage

trunk_test:
docker:
# specify the version you desire here
- image: circleci/ruby:2.5-browsers-legacy
environment:
RAILS_ENV: test
DB_HOST: 127.0.0.1
DRIVER: headless
TZ: /usr/share/zoneinfo/Asia/Tokyo
- image: mysql:5.7
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --innodb-large-prefix=true --innodb-file-format=Barracuda --sql-mode=""
environment:
MYSQL_USER: root
MYSQL_ALLOW_EMPTY_PASSWORD: yes

working_directory: ~/repo
steps:
- checkout
- run:
name: ready for redmine
command: |
REDMINE_BRANCH=master sh script/circleci-setup.sh
- run: bundle install --path vendor/bundle --without postgresql rmagick && bundle update
- run: bundle exec rails g rspec:install
- run: bundle exec rake db:create RAILS_ENV=test
- run: bundle exec rake db:migrate RAILS_ENV=test
- run: bundle exec rake redmine:plugins:migrate RAILS_ENV=test
- run:
command: |
bundle exec rake ${CIRCLE_PROJECT_REPONAME}:test RAILS_ENV=test
- run:
command: |
bundle exec rake ${CIRCLE_PROJECT_REPONAME}:spec RAILS_ENV=test
- run:
command: |
bundle exec rake redmine:plugins:migrate NAME=${CIRCLE_PROJECT_REPONAME} \
Expand All @@ -75,3 +118,13 @@ workflows:
ignore:
- support-rails5
- /trunk-.*/
- develop
- trunk_test:
requires:
- build
filters:
branches:
only:
- support-rails5
- /trunk-.*/
- develop
5 changes: 4 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ spec/ export-ignore
wercker.yml export-ignore
script/ export-ignore
.rubocop* export-ignore
Gemfile.local export-ignore
Gemfile.local export-ignore
.circleci/ export-ignore
docker-compose.yml export-ignore
Dockerfile export-ignore
3 changes: 1 addition & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
inherit_from: .rubocop_todo.yml
AllCops:
# TODO: Change TargetRubyVersion to 2.0 or higher, when Redmine cloded to support ruby 1.9x.
TargetRubyVersion: 1.9
TargetRubyVersion: 2.2
40 changes: 40 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
FROM ruby:2.5
LABEL maintainer="AKIKO TAKANO / (Twitter: @akiko_pusu)" \
description="Image to run Redmine simply with sqlite to try/review plugin."

### get Redmine source
### Replace shell with bash so we can source files ###
RUN rm /bin/sh && ln -s /bin/bash /bin/sh

### install default sys packeges ###

RUN apt-get update
RUN apt-get install -qq -y \
git vim mercurial \
sqlite3 default-libmysqlclient-dev
RUN apt-get install -qq -y build-essential libc6-dev

RUN cd /tmp && hg clone https://bitbucket.org/redmine/redmine-all redmine
WORKDIR /tmp/redmine


# add database.yml (for development, development with mysql, test)
RUN echo $'test:\n\
adapter: sqlite3\n\
database: /tmp/data/redmine_test.sqlite3\n\
encoding: utf8mb4\n\
development:\n\
adapter: sqlite3\n\
database: /tmp/data/redmine_development.sqlite3\n\
encoding: utf8mb4\n\
development_mysql:\n\
adapter: mysql2\n\
host: mysql\n\
password: pasword\n\
database: redemine_development\n\
username: root\n'\
>> config/database.yml

RUN gem update bundler
RUN bundle install --without postgresql rmagick
RUN bundle exec rake db:migrate
Loading

0 comments on commit 49f6a05

Please sign in to comment.