Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/_update_terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
GIT_TAG: ${{ inputs.image_tag }}
steps:
- name: Checkout terraform config repo
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
# public repo with terraform configuration
repository: 'datacite/mastino'
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
git add test/services/mds/_poodle.auto.tfvars
git commit -m "Adding poodle git variables for tag ${{ steps.extract_variables.outputs.GIT_TAG }}"
- name: Push changes
uses: ad-m/github-push-action@v0.8.0
uses: ad-m/github-push-action@v1
with:
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
repository: 'datacite/mastino'
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,36 +20,38 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4
- name: Cache Docker layers
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to DockerHub
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push
uses: docker/build-push-action@v5
uses: docker/build-push-action@v7
with:
context: .
file: ./Dockerfile
push: true
tags: |
${{ inputs.image_name }}:${{ inputs.image_tag }}
ghcr.io/${{ inputs.image_name }}:${{ inputs.image_tag }}
build-args: |
GIT_TAG=${{ inputs.image_tag }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
# no-cache: true
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
MDS_USERNAME: ${{ secrets.MDS_USERNAME }}
MDS_PASSWORD: ${{ secrets.MDS_PASSWORD }}
steps:
- uses: actions/checkout@v4
- name: Set up Ruby 3.2.10
- uses: actions/checkout@v6
- name: Set up Ruby 4.0.1
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.10'
- uses: actions/cache@v4
ruby-version: '4.0.1'
- uses: actions/cache@v5
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
Expand All @@ -34,7 +34,7 @@ jobs:
env:
MYSQL_PORT: ${{ job.services.mysql.ports[3306] }}
run: |
gem install bundler:2.5.6
gem install bundler:2.5.23
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: (Lint and) Test
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.10
ruby-4.0.1
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
FROM phusion/passenger-full:3.1.6
FROM phusion/passenger-ruby40:3.1.6
LABEL maintainer="support@datacite.org"

# Set correct environment variables.
ENV HOME /home/app
ENV DOCKERIZE_VERSION v0.6.0
ENV HOME=/home/app
ENV DOCKERIZE_VERSION=v0.6.0

# Allow app user to read /etc/container_environment
RUN usermod -a -G docker_env app

# Use baseimage-docker's init process.
CMD ["/sbin/my_init"]

# Use Ruby 3.1.4
RUN bash -lc 'rvm install ruby-3.2.10' && \
bash -lc 'rvm --default use ruby-3.2.10'
# Use Ruby 4.0.1
RUN bash -lc 'rvm install ruby-4.0.1' && \
bash -lc 'rvm --default use ruby-4.0.1'

# Update installed APT packages
RUN apt-get update && apt-get upgrade -y -o Dpkg::Options::="--force-confold" && \
Expand Down Expand Up @@ -46,7 +46,7 @@ RUN mkdir -p /home/app/webapp/vendor/bundle && \
# Install Ruby gems
WORKDIR /home/app/webapp
RUN gem install rubygems-update -v 3.5.6 && \
gem install bundler:2.5.6 && \
gem install bundler:2.5.23 && \
su - app -c "bundle config set path 'vendor/bundle'" && \
su - app -c 'cd /home/app/webapp && bundle install'

Expand Down
73 changes: 31 additions & 42 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,43 @@

source "https://rubygems.org"

gem "rails", "~> 7.1", ">= 7.1.3"
gem "dotenv"
gem "oj", ">= 2.8.3"
gem "oj_mimic_json", "~> 1.0", ">= 1.0.1"
gem "equivalent-xml", "~> 0.6.0"
gem "nokogiri", ">= 1.10.4"
gem "iso8601", "~> 0.9.0"
gem "bolognese", "~> 2.5.1"
gem "maremma", ">= 4.9.8"
gem "faraday", ">= 2.0", "< 3.0.0"
gem "base32-url", "~> 0.5"
gem "dalli", "~> 3.2", ">= 3.2.8"
gem "lograge", "~> 0.11.2"
gem "logstash-event", "~> 1.2", ">= 1.2.02"
gem "logstash-logger", "~> 0.26.1"
gem "sentry-raven", "~> 3.1", ">= 3.1.2"
gem "jwt", "~> 1.5", ">= 1.5.4"
gem "cancancan", "~> 2.0"
gem "tzinfo-data", "~> 1.2017", ">= 1.2017.3"
gem "bootsnap", ">= 1.1.0", require: false
gem "rack-cors", "~> 1.0", require: "rack/cors"
gem "rack-utf8_sanitizer", "~> 1.6"
gem "git", "~> 1.5"
gem "sprockets", "~> 3.7", ">= 3.7.2"
gem 'next_rails'
gem 'base64', '~> 0.2.0'
gem "rails", "~> 8.1", ">= 8.1.2.1"
gem "dotenv", "~> 3.2"
gem "oj", "~> 3.17"
gem "nokogiri", "~> 1.19", ">= 1.19.3"
gem "bolognese", "~> 2.7"
gem "maremma", ">= 5.0.0"
gem "base32-url", "~> 0.7.0" # TODO: remove soon, it is only used in one place
gem "dalli", "~> 5.0", ">= 5.0.2"
gem "lograge", "~> 0.14.0"
gem "logstash-logger", "~> 1.0"
gem "sentry-ruby", "~> 6.5"
gem "sentry-rails", "~> 6.5"
gem "jwt", "~> 3.2"
gem "cancancan", "~> 3.6", ">= 3.6.1"
gem "rack-cors", "~> 3.0"
gem "rack-utf8_sanitizer", "~> 1.11", ">= 1.11.1"
gem "next_rails", "~> 1.6"
gem 'base64', '~> 0.3.0'

group :development, :test do
gem "better_errors"
gem "binding_of_caller"
gem "byebug", platform: :mri
gem "rubocop", "~> 0.77.0"
gem "rubocop-performance", "~> 1.5", ">= 1.5.1"
gem "rubocop-rails", "~> 2.4"
gem "binding_of_caller", "~> 2.0"
gem "byebug", "~> 13.0", platforms: [:mri, :windows]
gem "rubocop", "~> 1.86", ">= 1.86.2"
gem "rubocop-performance", "~> 1.26", ">= 1.26.1"
gem "rubocop-rails", "~> 2.35", ">= 2.35.1"
end

group :development do
gem "listen", "~> 3.7.1"
gem "spring"
gem "spring-watcher-listen", "~> 2.0.0"
# gem "httplog", "~> 1.0"
gem "listen", "~> 3.10"
gem "spring", "~> 4.5"
gem "spring-watcher-listen", "~> 2.1"
end

group :test do
gem "rspec-rails", "~> 3.5", ">= 3.5.2"
gem "capybara"
gem "webmock", "~> 1.20.0"
gem "vcr", "~> 3.0.3"
gem "codeclimate-test-reporter", "~> 1.0.0"
gem "simplecov"
gem "rspec-rails", "~> 8.0", ">= 8.0.4"
gem "capybara", "~> 3.40"
gem "webmock", "~> 3.26", ">= 3.26.2"
gem "vcr", "~> 6.4"
gem "simplecov", "~> 0.22.0"
end
Loading