Skip to content

Commit

Permalink
Merge pull request #27 from hathitrust/GS-8481-missing-indicators
Browse files Browse the repository at this point in the history
GS-8481/TTO-178: Fix missing indicators in MARC records in OAI; update dependencies & actions
  • Loading branch information
aelkiss authored Feb 7, 2024
2 parents 39d5aa0 + 645c760 commit be40441
Show file tree
Hide file tree
Showing 17 changed files with 201 additions and 365 deletions.
39 changes: 0 additions & 39 deletions .github/workflows/build-main.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/build-manual.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build A Branch

on:
workflow_run:
workflows: ['Run Tests']
branches: ['main']
types: [completed]
workflow_dispatch:
inputs:
tag:
description: Release or Tag
required: true
push_latest:
description: Set True if the build is for the latest version
type: boolean
required: false
default: false

jobs:
build-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Set Inputs
id: set_inputs
run: |
if [ "${{ github.event_name }}" == "workflow_run" ]; then
echo "tag=${{ github.sha }}" >> $GITHUB_ENV
echo "push_latest=true" >> $GITHUB_ENV
else
# workflow_dispatch or other trigger
echo "tag=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
echo "push_latest=${{ github.event.inputs.push_latest }}" >> $GITHUB_ENV
fi
- name: Build Image
uses: hathitrust/github_actions/build@v1
with:
image: ghcr.io/${{ github.repository }}-unstable
tag: ${{ env.tag }}
push_latest: ${{ env.push_latest}}
registry_token: ${{ github.token }}
24 changes: 0 additions & 24 deletions .github/workflows/deploy-production.yaml

This file was deleted.

50 changes: 0 additions & 50 deletions .github/workflows/manual-deploy-testing.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ jobs:

- name: Set up tests
run: |
docker-compose build
docker-compose run web bundle install
docker compose build
docker compose run web bundle install
- name: Run standardrb
run: docker-compose run web bundle exec standardrb
run: docker compose run web bundle exec standardrb

- name: Run tests
run: docker-compose run test
run: docker compose run test

- name: Report to Coveralls
uses: coverallsapp/[email protected]
Expand Down
29 changes: 23 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,37 @@
FROM ruby:3.1
FROM ruby:3.3 AS base

ARG UNAME=app
ARG UID=1000
ARG GID=1000

RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends \
libxerces-c-samples \
netcat

# COPY Gemfile* /usr/src/app/
WORKDIR /usr/src/app
#
ENV BUNDLE_PATH /gems
#
RUN gem install bundler

COPY --from=ghcr.io/hathitrust/feed /usr/local/feed/bin/validateCache /usr/local/bin/validateCache
FROM base AS development

RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends \
libxerces-c-samples

COPY --from=ghcr.io/hathitrust/feed /usr/local/bin/validate-cache /usr/local/bin/validate-cache
#
# COPY . /usr/src/app

FROM base AS production

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
USER $UNAME
COPY --chown=$UID:$GID Gemfile* /usr/src/app/
WORKDIR /usr/src/app
ENV BUNDLE_PATH /gems
RUN bundle install
COPY --chown=$UID:$GID . /usr/src/app

CMD ["bundle","exec","ruby","oai_solr.rb","-o","0.0.0.0"]

LABEL org.opencontainers.image.source="https://github.com/hathitrust/oai_solr"
19 changes: 0 additions & 19 deletions Dockerfile.prod

This file was deleted.

3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ source "https://rubygems.org"

# gem "rails"

gem "sinatra", "~> 2.2"
gem "rackup"
gem "sinatra", "~> 4.0"
gem "puma"
gem "oai"
gem "marc", "~> 1.2"
Expand Down
Loading

0 comments on commit be40441

Please sign in to comment.