Skip to content

Commit eb51ca5

Browse files
authored
Merge pull request #5683 from avalonmediasystem/staging
Release 7.7! 🎉
2 parents d37bc17 + a72bc72 commit eb51ca5

File tree

750 files changed

+12113
-23708
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

750 files changed

+12113
-23708
lines changed

.circleci/config.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
build:
66
docker:
77
# Primary container image where all steps run.
8-
- image: avalonmediasystem/avalon:7.5.0-dev-ruby3
8+
- image: avalonmediasystem/avalon:develop
99
environment:
1010
- DATABASE_URL=postgresql://postgres@localhost:5432/postgres
1111
- FEDORA_URL=http://localhost:8080/fcrepo/rest
@@ -21,7 +21,7 @@ jobs:
2121
environment:
2222
CATALINA_OPTS: '-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms512m -Xmx1024m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC'
2323
- image: zookeeper:3.4
24-
- image: solr:8-slim
24+
- image: solr:9
2525
environment:
2626
VERBOSE: yes
2727
SECURITY_JSON: '{"authentication":{"blockUnknown": false, "class":"solr.BasicAuthPlugin", "credentials":{"solr":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0= Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}, "realm":"My Solr users", "forwardCredentials": false}, "authorization":{ "class":"solr.RuleBasedAuthorizationPlugin", "permissions":[{"name":"security-edit", "role":"admin"}], "user-role":{"solr":"admin"}}}'
@@ -100,7 +100,7 @@ jobs:
100100
fi
101101
zip -1 -r solr_conf.zip ./*
102102
curl -H "Content-type:application/octet-stream" --data-binary @solr_conf.zip "http://solr:[email protected]:<< parameters.solr_port >>/solr/admin/configs?action=UPLOAD&name=solrconfig"
103-
curl -H 'Content-type: application/json' http://solr:[email protected]:<< parameters.solr_port >>/api/collections/ -d '{create: {name: << parameters.core_name >>, config: solrconfig, numShards: 1}}'
103+
curl "http://solr:[email protected]:<< parameters.solr_port >>/solr/admin/collections?action=CREATE&name=hydra-test&numShards=1&collection.configName=solrconfig"
104104
105105
- run:
106106
command: |
@@ -113,11 +113,11 @@ jobs:
113113

114114
# Pull in the parallel_rspec step and modify it to ensure that test results get stored
115115
# - samvera/parallel_rspec
116+
- run: mkdir /tmp/test-results
116117
- run:
117118
name: Run rspec in parallel
118119
command: |
119-
mkdir /tmp/test-results
120-
bundle exec rspec --format progress --format RspecJunitFormatter -o /tmp/test-results/rspec.xml $(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)
120+
circleci tests glob "spec/**/*_spec.rb" | circleci tests run --command="xargs bundle exec rspec --format progress --format RspecJunitFormatter -o /tmp/test-results/rspec.xml" --verbose --split-by=timings
121121
# collect reports
122122
- store_test_results:
123123
path: /tmp/test-results

.github/workflows/podman-image.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Builds image and stores in ghcr.io then sends webhook to deploy new image
2+
name: Podman Image CI
3+
4+
on:
5+
push:
6+
branches: [ "main", "staging", "develop", "sandbox" ]
7+
8+
env:
9+
GHCR_USER: ${{ github.actor }}
10+
GHCR_PASSWORD: ${{ github.token }}
11+
GHCR_IMAGE_REGISTRY: ghcr.io/avalonmediasystem
12+
DOCKERHUB_IMAGE_REGISTRY: docker.io/avalonmediasystem
13+
DOCKERHUB_USER: ${{ secrets.dockerhub_user }}
14+
DOCKERHUB_PASSWORD: ${{ secrets.dockerhub_password }}
15+
IMAGE_TAG: ${{ fromJSON('{"refs/heads/main":"production","refs/heads/develop":"develop","refs/heads/staging":"staging","refs/heads/sandbox":"sandbox"}')[github.ref] }}
16+
BRANCH: ${{ fromJSON('{"refs/heads/main":"main","refs/heads/develop":"develop","refs/heads/staging":"staging","refs/heads/sandbox":"sandbox"}')[github.ref] }}
17+
BUILD_TARGET: ${{ fromJSON('{"refs/heads/main":"prod","refs/heads/develop":"dev","refs/heads/staging":"prod","refs/heads/sandbox":"prod"}')[github.ref] }}
18+
19+
jobs:
20+
21+
build:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Free Disk Space (Ubuntu)
26+
uses: jlumbroso/free-disk-space@main
27+
with:
28+
# this might remove tools that are actually needed,
29+
# if set to "true" but frees about 6 GB
30+
tool-cache: false
31+
32+
# all of these default to true, but feel free to set to
33+
# "false" if necessary for your workflow
34+
android: true
35+
dotnet: true
36+
haskell: true
37+
large-packages: false
38+
docker-images: false
39+
swap-storage: false
40+
- uses: actions/checkout@v3
41+
- name: Determine DockerHub image tags
42+
id: determine_dockerhub_tags
43+
run: |
44+
AVALON_VERSION=`script/avalon_image_tags.rb -t`
45+
echo "AVALON_VERSION=${AVALON_VERSION}" >> "$GITHUB_OUTPUT"
46+
if [ $IMAGE_TAG = 'develop' ]; then
47+
AVALON_TAGS=`script/avalon_image_tags.rb --branch ${BRANCH} -a ${AVALON_VERSION}-dev | awk 'gsub(","," ")'`
48+
elif [ $IMAGE_TAG = 'production' ]; then
49+
AVALON_TAGS=`script/avalon_image_tags.rb -s -t -a latest | awk 'gsub(","," ")'`
50+
else
51+
AVALON_TAGS=""
52+
fi
53+
echo "tags=${AVALON_TAGS}" >> "$GITHUB_OUTPUT"
54+
echo "Will pushing to DockerHub with tags: ${AVALON_TAGS}"
55+
- name: Build Image
56+
id: build_image
57+
uses: redhat-actions/buildah-build@v2
58+
with:
59+
image: avalon
60+
tags: ${{ env.IMAGE_TAG }} ${{ github.sha }} ${{ steps.determine_dockerhub_tags.outputs.tags }}
61+
containerfiles: ./Dockerfile
62+
oci: true
63+
extra-args: --target ${{ env.BUILD_TARGET }}
64+
- name: Push To GHCR
65+
uses: redhat-actions/push-to-registry@v2
66+
with:
67+
image: ${{ steps.build_image.outputs.image }}
68+
tags: ${{ env.IMAGE_TAG }} ${{ github.sha }}
69+
registry: ${{ env.GHCR_IMAGE_REGISTRY }}
70+
username: ${{ env.GHCR_USER }}
71+
password: ${{ env.GHCR_PASSWORD }}
72+
extra-args: |
73+
--disable-content-trust
74+
- name: Push To Dockerhub
75+
if: ${{ steps.determine_dockerhub_tags.outputs.tags != '' }}
76+
uses: redhat-actions/push-to-registry@v2
77+
with:
78+
image: ${{ steps.build_image.outputs.image }}
79+
tags: ${{ steps.determine_dockerhub_tags.outputs.tags }}
80+
registry: ${{ env.DOCKERHUB_IMAGE_REGISTRY }}
81+
username: ${{ env.DOCKERHUB_USER }}
82+
password: ${{ env.DOCKERHUB_PASSWORD }}
83+
extra-args: |
84+
--disable-content-trust

Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@ LABEL project=avalon
5252
RUN echo "deb http://ftp.us.debian.org/debian/ bullseye main contrib non-free" > /etc/apt/sources.list.d/bullseye.list \
5353
&& echo "deb-src http://ftp.us.debian.org/debian/ bullseye main contrib non-free" >> /etc/apt/sources.list.d/bullseye.list \
5454
&& cat /etc/apt/sources.list.d/bullseye.list \
55-
&& apt-get update && apt-get install -y --no-install-recommends curl gnupg2 ffmpeg \
56-
&& curl -sL http://deb.nodesource.com/setup_14.x | bash - \
55+
&& mkdir -p /etc/apt/keyrings \
56+
&& apt-get update && apt-get install -y --no-install-recommends curl ca-certificates gnupg2 ffmpeg \
57+
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
58+
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" > /etc/apt/sources.list.d/nodesource.list \
5759
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
5860
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
5961
&& cat /etc/apt/sources.list.d/nodesource.list \
@@ -111,7 +113,7 @@ RUN bundle config set --local without 'development test' \
111113

112114

113115
# Install node modules
114-
FROM node:12-bullseye-slim as node-modules
116+
FROM node:20-bullseye-slim as node-modules
115117
LABEL stage=build
116118
LABEL project=avalon
117119
RUN apt-get update && apt-get install -y --no-install-recommends git ca-certificates
@@ -131,7 +133,6 @@ COPY --from=node-modules --chown=app:app /node_modules ./node_modules
131133
USER app
132134
ENV RAILS_ENV=production
133135

134-
RUN SECRET_KEY_BASE=$(ruby -r 'securerandom' -e 'puts SecureRandom.hex(64)') bundle exec rake webpacker:compile
135136
RUN SECRET_KEY_BASE=$(ruby -r 'securerandom' -e 'puts SecureRandom.hex(64)') bundle exec rake assets:precompile
136137
RUN cp config/controlled_vocabulary.yml.example config/controlled_vocabulary.yml
137138

Gemfile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ gem 'react-rails'
2525
gem 'sass', '3.4.22'
2626
gem 'sprockets-es6'
2727
gem 'twitter-typeahead-rails', '0.11.1.pre.corejavascript'
28-
gem 'uglifier', '>= 1.3.0'
29-
gem 'webpacker'
28+
gem 'terser'
29+
gem 'shakapacker'
3030

3131
# Core Samvera
3232
gem 'active-fedora', '~> 14.0', '>= 14.0.1'
@@ -49,11 +49,11 @@ gem 'active_annotations', '~> 0.4'
4949
gem 'activerecord-session_store', '>= 2.0.0'
5050
gem 'acts_as_list'
5151
gem 'api-pagination'
52-
gem 'avalon-about', git: 'https://github.com/avalonmediasystem/avalon-about.git', tag: 'avalon-r6.4'
52+
gem 'avalon-about', git: 'https://github.com/avalonmediasystem/avalon-about.git', tag: 'avalon-r7.7'
5353
#gem 'bootstrap-sass', '< 3.4.1' # Pin to less than 3.4.1 due to change in behavior with popovers
5454
gem 'bootstrap-toggle-rails'
5555
gem 'bootstrap_form'
56-
gem 'iiif_manifest', '~> 1.3'
56+
gem 'iiif_manifest', '>= 1.4.0'
5757
gem 'rack-cors', require: 'rack/cors'
5858
gem 'rails_same_site_cookie'
5959
gem 'recaptcha', require: 'recaptcha/rails'
@@ -74,11 +74,10 @@ gem 'omniauth-lti', git: "https://github.com/avalonmediasystem/omniauth-lti.git"
7474
gem "omniauth-saml", "~> 2.0"
7575

7676
# Media Access & Transcoding
77-
gem 'active_encode', '~> 1.0', '>= 1.1.3'
77+
gem 'active_encode', '>= 1.2.2'
7878
gem 'audio_waveform-ruby', '~> 1.0.7', require: 'audio_waveform'
7979
gem 'browse-everything', git: "https://github.com/avalonmediasystem/browse-everything.git", branch: 'v1.2-avalon'
8080
gem 'fastimage'
81-
gem 'media_element_add_to_playlist', git: 'https://github.com/avalonmediasystem/media-element-add-to-playlist.git', tag: 'avalon-r6.5'
8281
gem 'mediainfo', git: "https://github.com/avalonmediasystem/mediainfo.git", tag: 'v0.7.1-avalon'
8382
gem 'rest-client', '~> 2.0'
8483
gem 'roo'
@@ -103,6 +102,10 @@ gem 'jbuilder', '~> 2.0'
103102
gem 'parallel'
104103
gem 'with_locking'
105104

105+
# Reindexing script
106+
gem 'sequel'
107+
gem 'httpx'
108+
106109
group :development do
107110
gem 'capistrano', '~>3.6'
108111
gem 'capistrano-passenger', require: false

0 commit comments

Comments
 (0)