-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #178 from mlibrary/ci
continuous integration
- Loading branch information
Showing
190 changed files
with
67,823 additions
and
1,846 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Ignore everything | ||
* | ||
|
||
# Except | ||
!/app | ||
!/bin | ||
!/config | ||
!/data | ||
!/indexer | ||
!/lib | ||
!/log/.keep | ||
!/public | ||
!/solr/dromedary | ||
!/spec | ||
!/test | ||
!/tmp/.keep | ||
!/vendor | ||
config.ru | ||
Gemfile | ||
Gemfile.lock | ||
package.json | ||
Rakefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,8 +8,8 @@ on: | |
|
||
env: | ||
RAILS_ENV: "test" | ||
DATABASE_URL: "postgresql://postgres:[email protected]:5432/umich-arclight-test" | ||
SOLR_URL: "http://127.0.0.1:8983/solr/umich-arclight-test" | ||
DATABASE_URL: "postgresql://postgres:[email protected]:5432/dromedary-test" | ||
SOLR_URL: "http://127.0.0.1:9639/solr/dromedary-test" | ||
|
||
jobs: | ||
ci: | ||
|
@@ -41,11 +41,13 @@ jobs: | |
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
env: | ||
BUNDLE_RUBYGEMS__PKG__GITHUB__COM: ${{secrets.GH_PACKAGE_READ_TOKEN}} | ||
- name: Run Solr (and create core) | ||
run: docker run -d -p 8983:8983 -v $(pwd)/solr/arclight:/umich-arclight:ro solr:8 solr-precreate umich-arclight-test /umich-arclight | ||
run: docker run -d -p 9639:8983 -v $(pwd)/solr/dromedary:/dromedary:ro ghcr.io/mlibrary/dromedary/dromedary-solr:latest solr-precreate dromedary-test /dromedary | ||
- name: Yarn Install | ||
run: yarn install | ||
- name: Setup Database (db:setup) | ||
run: bundle exec rake db:setup | ||
- name: Continuous Integration (standard rb, rubocop, test, spec) | ||
- name: Continuous Integration (standard, spec) | ||
run: bundle exec rake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,9 @@ | ||
# See https://help.github.com/articles/ignoring-files for more about ignoring files. | ||
# | ||
# If you find yourself ignoring temporary files generated by your text editor | ||
# or operating system, you probably want to add a global ignore instead: | ||
# git config --global core.excludesfile '~/.gitignore_global' | ||
|
||
# Skip IntelliJ stuff | ||
/.idea/* | ||
*.iml | ||
|
||
# Don't do the solr data or core.properties | ||
/solr/med/data | ||
/solr/med/conf/data | ||
/solr/med/core.properties | ||
/.solr | ||
|
||
# Or local data | ||
/data | ||
|
||
# Ignore bundler config. | ||
/.bundle | ||
|
||
# We don't use a database. | ||
/db | ||
|
||
# Ignore all logfiles and tempfiles. | ||
/log/* | ||
/tmp/* | ||
!/log/.keep | ||
!/tmp/.keep | ||
|
||
/.cache | ||
/data | ||
/db/*.sqlite3 | ||
/log | ||
/node_modules | ||
/yarn-error.log | ||
|
||
**/tmp | ||
!**/.keep | ||
.byebug_history |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
# yarn lockfile v1 | ||
|
||
|
||
lastUpdateCheck 1679078185494 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,36 @@ | ||
FROM ruby:2.6 | ||
FROM ruby:2.7 | ||
|
||
ARG UNAME=app | ||
ARG UID=1000 | ||
ARG GID=1000 | ||
ARG ARCH=amd64 | ||
|
||
ENV BUNDLE_PATH /var/opt/app/gems | ||
ENV RAILS_LOG_TO_STDOUT true | ||
|
||
RUN curl https://deb.nodesource.com/setup_12.x | bash | ||
RUN curl https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - | ||
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list | ||
|
||
RUN apt-get update -yqq && \ | ||
apt-get install -yqq --no-install-recommends \ | ||
apt-transport-https | ||
RUN gem install 'bundler:~>1.17.3' 'bundler:~>2.0.2' | ||
vim nodejs yarn apt-transport-https | ||
|
||
RUN groupadd -g $GID -o $UNAME | ||
RUN useradd -m -d /usr/src/app -u $UID -g $GID -o -s /bin/bash $UNAME | ||
RUN mkdir -p /gems && chown $UID:$GID /gems | ||
RUN useradd -m -d /opt/app -u $UID -g $GID -o -s /bin/bash $UNAME | ||
RUN mkdir /var/opt/app | ||
RUN mkdir /var/opt/app/data | ||
RUN mkdir /var/opt/app/gems | ||
RUN chown $UID:$GID /var/opt/app | ||
RUN chown $UID:$GID /var/opt/app/data | ||
RUN touch $UID:$GID /var/opt/app/data/.keep | ||
RUN chown $UID:$GID /var/opt/app/gems | ||
RUN touch $UID:$GID /var/opt/app/gems/.keep | ||
COPY --chown=$UID:$GID . /opt/app | ||
|
||
USER $UNAME | ||
COPY --chown=$UID:$GID Gemfile* /usr/src/app/ | ||
|
||
ENV RAILS_LOG_TO_STDOUT true | ||
ENV BUNDLE_PATH /gems | ||
|
||
WORKDIR /usr/src/app | ||
RUN bundle install | ||
|
||
COPY --chown=$UID:$GID . /usr/src/app | ||
WORKDIR /opt/app | ||
RUN gem install 'bundler:~>2.2.21' | ||
RUN bundle config --local build.sassc --disable-march-tune-native | ||
|
||
ENTRYPOINT ["./docker-entrypoint.sh"] | ||
CMD ["bin/rails", "s", "-b", "0.0.0.0"] | ||
CMD ["sleep", "infinity"] |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.