Skip to content

Commit

Permalink
Merge branch 'release/0.7.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
haru committed Nov 15, 2024
2 parents da97516 + 5871324 commit ad139dc
Show file tree
Hide file tree
Showing 23 changed files with 221 additions and 256 deletions.
46 changes: 3 additions & 43 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,46 +1,6 @@
# [Choice] Ruby version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.0, 2, 2.7, 2.6, 3-bullseye, 3.0-bullseye, 2-bullseye, 2.7-bullseye, 2.6-bullseye, 3-buster, 3.0-buster, 2-buster, 2.7-buster, 2.6-buster
ARG VARIANT=2-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/ruby:0-${VARIANT}

# Install Rails
RUN gem install rails webdrivers

# Default value to allow debug server to serve content over GitHub Codespace's port forwarding service
# The value is a comma-separated list of allowed domains
ENV RAILS_DEVELOPMENT_HOSTS=".githubpreview.dev"

# [Choice] Node.js version: lts/*, 16, 14, 12, 10
ARG NODE_VERSION="lts/*"
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

# [Optional] Uncomment this line to install additional gems.
# RUN gem install <your-gem-names-here>

# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1

RUN apt-get update
RUN apt-get install -y imagemagick git-flow

WORKDIR /usr/local
ARG RUBY_VERSION=3.2
ARG REDMINE_VERSION=master
RUN git clone https://github.com/redmine/redmine.git -b ${REDMINE_VERSION}
WORKDIR /usr/local/redmine
COPY .devcontainer/database.yml /usr/local/redmine/config/database.yml
FROM haru/redmine_devcontainer:${REDMINE_VERSION}-ruby${RUBY_VERSION}
COPY .devcontainer/post-create.sh /post-create.sh

RUN rm -rf .git
# RUN echo "gem 'ruby-debug-ide'" >> Gemfile
RUN echo "gem 'debug'" >> Gemfile
RUN echo "gem 'rufo'" >> Gemfile
ENV DB=sqlite3
RUN bundle install
RUN bundle exec rake db:migrate
RUN bundle exec rake db:migrate RAILS_ENV=test
COPY .devcontainer/launch.json /usr/local/redmine/.vscode/launch.json
RUN chown -R vscode .

COPY .devcontainer/post-create.sh /post-create.sh
2 changes: 0 additions & 2 deletions .devcontainer/create-db-user.sql

This file was deleted.

57 changes: 0 additions & 57 deletions .devcontainer/database.yml

This file was deleted.

27 changes: 16 additions & 11 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
"dockerComposeFile": "docker-compose.yml",
"service": "app",

"workspaceFolder": "/usr/local/redmine",
"mounts": [
"source=${localWorkspaceFolder},target=/workspaces/${localWorkspaceFolderBasename},type=bind"
],
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
// "workspaceFolder": "/workspaces/dev.code-workspace",

// Set *default* container specific settings.json values on container create.
"settings": {
Expand Down Expand Up @@ -38,17 +42,14 @@

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"rebornix.Ruby",
"mtxr.sqltools",
"mtxr.sqltools-driver-pg",
"craigmaslowski.erb",
"hridoy.rails-snippets",
"misogi.ruby-rubocop",
"jnbt.vscode-rufo",
"donjayamanne.git-extension-pack",
"ms-azuretools.vscode-docker",
"Serhioromano.vscode-gitflow",
"github.vscode-github-actions",
"Shopify.ruby-lsp",
"KoichiSasada.vscode-rdbg",
"Serhioromano.vscode-gitflow"
"bung87.rails",
"mbessey.vscode-rufo"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
Expand All @@ -61,7 +62,11 @@
"remoteUser": "vscode",
"features": {
// "git": "latest"
}
},


"containerEnv": {
"PLUGIN_NAME": "${localWorkspaceFolderBasename}"
},

"forwardPorts": [3000]
}
7 changes: 2 additions & 5 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@ services:
# Update 'VARIANT' to pick a version of Ruby: 3, 3.0, 2, 2.7, 2.6
# Append -bullseye or -buster to pin to an OS version.
# Use -bullseye variants on local arm64/Apple Silicon.
VARIANT: "3.1"
RUBY_VERSION: "3.2"
# Optional Node.js version to install
NODE_VERSION: "lts/*"
REDMINE_VERSION: "5.0-stable"

volumes:
- ..:/usr/local/redmine/plugins/redmine_theme_changer:cached
REDMINE_VERSION: "6.0-stable"

# Overrides default command so things don't shut down after the process ends.
command: sleep infinity
Expand Down
85 changes: 0 additions & 85 deletions .devcontainer/launch.json

This file was deleted.

24 changes: 20 additions & 4 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
#!/bin/sh
cd /usr/local/redmine

cp plugins/redmine_theme_changer/Gemfile_for_test plugins/redmine_theme_changer/Gemfile
cp plugins/redmine_theme_changer/test/fixtures/theme_changer_user_settings.yml test/fixtures
ln -s /workspaces/${PLUGIN_NAME} plugins/${PLUGIN_NAME}
if [ -f plugins/${PLUGIN_NAME}/Gemfile_for_test ]
then
cp plugins/${PLUGIN_NAME}/Gemfile_for_test plugins/${PLUGIN_NAME}/Gemfile
fi
cp plugins/${PLUGIN_NAME}/test/fixtures/*.yml test/fixtures
ln -s /workspaces/${PLUGIN_NAME}/.devcontainer/launch.json .vscode/launch.json

bundle install
bundle exec rake redmine:plugins:migrate
bundle exec rake redmine:plugins:migrate RAILS_ENV=test
Expand All @@ -20,10 +26,20 @@ initdb() {

initdb

export DB=postgres
export DB=mysql2
export DB_NAME=redmine
export DB_USERNAME=root
export DB_PASSWORD=root
export DB_HOST=mysql
export DB_PORT=3306

initdb

export DB=mysql
export DB=postgresql
export DB_NAME=redmine
export DB_USERNAME=postgres
export DB_PASSWORD=postgres
export DB_HOST=postgres
export DB_PORT=5432

initdb
13 changes: 0 additions & 13 deletions .devcontainer/redmine.code-workspace

This file was deleted.

30 changes: 13 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,19 @@ jobs:
strategy:
matrix:
db: [sqlite3, mysql, postgres]
ruby_version: [2.4, 2.5, 2.6, 2.7, 3.0, 3.1]
redmine_version: [4.1-stable, 4.2-stable, 5.0-stable, master]
ruby_version: ["3.0", "3.1", "3.2", "3.3"]
redmine_version: [5.0-stable, 5.1-stable, 6.0-stable, master]
exclude:
- ruby_version: 2.4
redmine_version: master
- ruby_version: 2.4
- ruby_version: "3.2"
redmine_version: 5.0-stable
- ruby_version: "3.3"
redmine_version: 5.0-stable
- ruby_version: 2.7
redmine_version: 4.1-stable
- ruby_version: 3.0
redmine_version: 4.1-stable
- ruby_version: 3.0
redmine_version: 4.2-stable
- ruby_version: 3.1
redmine_version: 4.1-stable
- ruby_version: 3.1
redmine_version: 4.2-stable
- ruby_version: "3.3"
redmine_version: 5.1-stable
- ruby_version: "3.0"
redmine_version: 6.0-stable
- ruby_version: "3.0"
redmine_version: master
services:
mysql:
image: mysql:5.7
Expand All @@ -50,14 +46,14 @@ jobs:
DB_HOST: ${{ matrix.db }}
REDMINE_VER: ${{ matrix.redmine_version }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install
run: bash -x ./build-scripts/install.sh
- name: Build
run: bash -x ./build-scripts/build.sh
- name: Clean
run: bash -x ./build-scripts/cleanup.sh
- uses: codecov/codecov-action@v2
- uses: codecov/codecov-action@v3
- name: Slack Notification on Failure
uses: rtCamp/action-slack-notify@v2.0.2
if: failure()
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Gemfile
coverage
.DS_Store
.DS_Store
Gemfile.lock
Loading

0 comments on commit ad139dc

Please sign in to comment.