Skip to content

Commit

Permalink
Explain with comments to make maintenance easier
Browse files Browse the repository at this point in the history
  • Loading branch information
hidakatsuya committed Aug 13, 2024
1 parent f2c52ba commit 9d71642
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions test/integration/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,53 @@ COPY test/integration/docker/*.sh .
RUN git config --global user.email "[email protected]" && \
git config --global user.name "dev"

#
# Directory to place the source code of remer.
# Used to build and install the gem file of remer.
#
RUN mkdir /remer-src && \
git config --global safe.directory /remer-src

WORKDIR /git-repos
#
# Pseudo remote repositories for test plugins and themes
#
WORKDIR /git-server-repos
RUN git init --bare plugin_a.git
RUN git init --bare theme_a.git

WORKDIR /tmp
#
# Local repositories to maintain test plugins and themes
#
WORKDIR /git-local-repos
COPY test/integration/docker/plugin_a plugin_a
COPY test/integration/docker/theme_a theme_a

WORKDIR /tmp/plugin_a
# Plugin A
WORKDIR /git-local-repos/plugin_a
RUN git init && \
git remote add origin /git-repos/plugin_a.git && \
git remote add origin /git-server-repos/plugin_a.git && \
git add . && git commit -m "commit" && git push origin master && \
git tag -a v0.1.0 -m "v0.1.0" && git push origin v0.1.0 && \
git switch -c stable && git push origin stable

WORKDIR /tmp/theme_a
# Theme A
WORKDIR /git-local-repos/theme_a
RUN git init && \
git remote add origin /git-repos/theme_a.git && \
git remote add origin /git-server-repos/theme_a.git && \
git add . && git commit -m "commit" && git push origin master

#
# Redmine
#
WORKDIR /redmine
RUN git clone --depth 1 https://github.com/redmine/redmine.git .

COPY test/integration/docker/database.yml config/database.yml

# Directory for the bundle cache
RUN mkdir /redmine-bundle
VOLUME /redmine-bundle
ENV BUNDLE_PATH=/redmine-bundle

# Definition file
COPY test/integration/docker/extensions.rb .extensions.rb

RUN bundle install && bin/rails db:prepare
Expand Down

0 comments on commit 9d71642

Please sign in to comment.