Skip to content

Commit c52cd9e

Browse files
authored
Merge pull request #310 from TAMULib/tamu-rdc-dspace-7_x-sprint5-staging
Data@TAMU: Sprint 5
2 parents a4a1587 + 582b78e commit c52cd9e

File tree

252 files changed

+6200
-2638
lines changed

Some content is hidden

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

252 files changed

+6200
-2638
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949

5050
# https://github.com/actions/setup-java
5151
- name: Install JDK ${{ matrix.java }}
52-
uses: actions/setup-java@v3
52+
uses: actions/setup-java@v4
5353
with:
5454
java-version: ${{ matrix.java }}
5555
distribution: 'temurin'
@@ -65,14 +65,14 @@ jobs:
6565
# (This artifact is downloadable at the bottom of any job's summary page)
6666
- name: Upload Results of ${{ matrix.type }} to Artifact
6767
if: ${{ failure() }}
68-
uses: actions/upload-artifact@v3
68+
uses: actions/upload-artifact@v4
6969
with:
7070
name: ${{ matrix.type }} results
7171
path: ${{ matrix.resultsdir }}
7272

7373
# Upload code coverage report to artifact, so that it can be shared with the 'codecov' job (see below)
7474
- name: Upload code coverage report to Artifact
75-
uses: actions/upload-artifact@v3
75+
uses: actions/upload-artifact@v4
7676
with:
7777
name: ${{ matrix.type }} coverage report
7878
path: 'dspace/target/site/jacoco-aggregate/jacoco.xml'
@@ -91,7 +91,7 @@ jobs:
9191

9292
# Download artifacts from previous 'tests' job
9393
- name: Download coverage artifacts
94-
uses: actions/download-artifact@v3
94+
uses: actions/download-artifact@v4
9595

9696
# Now attempt upload to Codecov using its action.
9797
# NOTE: We use a retry action to retry the Codecov upload if it fails the first time.
@@ -101,10 +101,11 @@ jobs:
101101
- name: Upload coverage to Codecov.io
102102
uses: Wandalen/wretry.action@v1.3.0
103103
with:
104-
action: codecov/codecov-action@v3
104+
action: codecov/codecov-action@v4
105105
# Ensure codecov-action throws an error when it fails to upload
106106
with: |
107107
fail_ci_if_error: true
108+
token: ${{ secrets.CODECOV_TOKEN }}
108109
# Try re-running action 5 times max
109110
attempt_limit: 5
110111
# Run again in 30 seconds

.github/workflows/codescan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
# https://github.com/actions/setup-java
4141
- name: Install JDK
42-
uses: actions/setup-java@v3
42+
uses: actions/setup-java@v4
4343
with:
4444
java-version: 11
4545
distribution: 'temurin'

.github/workflows/docker.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
needs: dspace-dependencies
4444
uses: ./.github/workflows/reusable-docker-build.yml
4545
with:
46-
build_id: dspace
46+
build_id: dspace-prod
4747
image_name: dspace/dspace
4848
dockerfile_path: ./Dockerfile
4949
secrets:
@@ -102,6 +102,8 @@ jobs:
102102
build_id: dspace-solr
103103
image_name: dspace/dspace-solr
104104
dockerfile_path: ./dspace/src/main/docker/dspace-solr/Dockerfile
105+
# Must pass solrconfigs to the Dockerfile so that it can find the required Solr config files
106+
dockerfile_additional_contexts: 'solrconfigs=./dspace/solr/'
105107
secrets:
106108
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
107109
DOCKER_ACCESS_TOKEN: ${{ secrets.DOCKER_ACCESS_TOKEN }}
@@ -118,7 +120,7 @@ jobs:
118120
if: github.repository == 'dspace/dspace'
119121
uses: ./.github/workflows/reusable-docker-build.yml
120122
with:
121-
build_id: dspace-postgres-pgcrypto
123+
build_id: dspace-postgres-pgcrypto-prod
122124
image_name: dspace/dspace-postgres-pgcrypto
123125
# Must build out of subdirectory to have access to install script for pgcrypto.
124126
# NOTE: this context will build the image based on the Dockerfile in the specified directory

.github/workflows/issue_opened.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
# Only add to project board if issue is flagged as "needs triage" or has no labels
1717
# NOTE: By default we flag new issues as "needs triage" in our issue template
1818
if: (contains(github.event.issue.labels.*.name, 'needs triage') || join(github.event.issue.labels.*.name) == '')
19-
uses: actions/add-to-project@v0.5.0
19+
uses: actions/add-to-project@v1.0.0
2020
# Note, the authentication token below is an ORG level Secret.
2121
# It must be created/recreated manually via a personal access token with admin:org, project, public_repo permissions
2222
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#permissions-for-the-github_token

.github/workflows/pull_request_opened.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ jobs:
2121
# Assign the PR to whomever created it. This is useful for visualizing assignments on project boards
2222
# See https://github.com/toshimaru/auto-author-assign
2323
- name: Assign PR to creator
24-
uses: toshimaru/auto-author-assign@v2.0.1
24+
uses: toshimaru/auto-author-assign@v2.1.0

.github/workflows/reusable-docker-build.yml

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ on:
2424
dockerfile_context:
2525
required: false
2626
type: string
27+
default: '.'
28+
# Optionally a list of "additional_contexts" to pass to Dockerfile. Defaults to empty
29+
dockerfile_additional_contexts:
30+
required: false
31+
type: string
32+
default: ''
2733
# If Docker image should have additional tag flavor details (e.g. a suffix), it may be passed in.
2834
tags_flavor:
2935
required: false
@@ -64,7 +70,7 @@ env:
6470
REDEPLOY_DEMO_URL: ${{ secrets.REDEPLOY_DEMO_URL }}
6571
# Current DSpace maintenance branch (and architecture) which is deployed to demo.dspace.org / sandbox.dspace.org
6672
# (NOTE: No deployment branch specified for sandbox.dspace.org as it uses the default_branch)
67-
DEPLOY_DEMO_BRANCH: 'dspace-7_x'
73+
DEPLOY_DEMO_BRANCH: 'dspace-8_x'
6874
DEPLOY_ARCH: 'linux/amd64'
6975

7076
jobs:
@@ -87,6 +93,14 @@ jobs:
8793
runs-on: ${{ matrix.os }}
8894

8995
steps:
96+
# This step converts the slashes in the "arch" matrix values above into dashes & saves to env.ARCH_NAME
97+
# E.g. "linux/amd64" becomes "linux-amd64"
98+
# This is necessary because all upload artifacts CANNOT have special chars (like slashes)
99+
- name: Prepare
100+
run: |
101+
platform=${{ matrix.arch }}
102+
echo "ARCH_NAME=${platform//\//-}" >> $GITHUB_ENV
103+
90104
# https://github.com/actions/checkout
91105
- name: Checkout codebase
92106
uses: actions/checkout@v4
@@ -123,7 +137,9 @@ jobs:
123137
id: docker_build
124138
uses: docker/build-push-action@v5
125139
with:
126-
context: ${{ inputs.dockerfile_context || '.' }}
140+
build-contexts: |
141+
${{ inputs.dockerfile_additional_contexts }}
142+
context: ${{ inputs.dockerfile_context }}
127143
file: ${{ inputs.dockerfile_path }}
128144
platforms: ${{ matrix.arch }}
129145
# For pull requests, we run the Docker build (to ensure no PR changes break the build),
@@ -144,9 +160,9 @@ jobs:
144160
# Upload digest to an artifact, so that it can be used in manifest below
145161
- name: Upload Docker build digest to artifact
146162
if: ${{ ! matrix.isPr }}
147-
uses: actions/upload-artifact@v3
163+
uses: actions/upload-artifact@v4
148164
with:
149-
name: digests-${{ inputs.build_id }}
165+
name: digests-${{ inputs.build_id }}-${{ env.ARCH_NAME }}
150166
path: /tmp/digests/*
151167
if-no-files-found: error
152168
retention-days: 1
@@ -164,7 +180,7 @@ jobs:
164180
165181
# If this build is NOT a PR and passed in a REDEPLOY_DEMO_URL secret,
166182
# Then redeploy https://demo.dspace.org if this build is for our deployment architecture and demo branch.
167-
- name: Redeploy demo.dspace.org (based on maintenace branch)
183+
- name: Redeploy demo.dspace.org (based on maintenance branch)
168184
if: |
169185
!matrix.isPR &&
170186
env.REDEPLOY_DEMO_URL != '' &&
@@ -184,10 +200,12 @@ jobs:
184200
- docker-build
185201
steps:
186202
- name: Download Docker build digests
187-
uses: actions/download-artifact@v3
203+
uses: actions/download-artifact@v4
188204
with:
189-
name: digests-${{ inputs.build_id }}
190205
path: /tmp/digests
206+
# Download digests for both AMD64 and ARM64 into same directory
207+
pattern: digests-${{ inputs.build_id }}-*
208+
merge-multiple: true
191209

192210
- name: Set up Docker Buildx
193211
uses: docker/setup-buildx-action@v3

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ RUN mvn --no-transfer-progress package ${MAVEN_FLAGS} && \
2828
mvn clean
2929

3030
# Step 2 - Run Ant Deploy
31-
FROM openjdk:${JDK_VERSION}-slim as ant_build
31+
FROM eclipse-temurin:${JDK_VERSION} as ant_build
3232
ARG TARGET_DIR=dspace-installer
3333
# COPY the /install directory from 'build' container to /dspace-src in this container
3434
COPY --from=build /install /dspace-src

Dockerfile.cli

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ RUN mvn --no-transfer-progress package && \
2424
mvn clean
2525

2626
# Step 2 - Run Ant Deploy
27-
FROM openjdk:${JDK_VERSION}-slim as ant_build
27+
FROM eclipse-temurin:${JDK_VERSION} as ant_build
2828
ARG TARGET_DIR=dspace-installer
2929
# COPY the /install directory from 'build' container to /dspace-src in this container
3030
COPY --from=build /install /dspace-src
@@ -33,9 +33,9 @@ WORKDIR /dspace-src
3333
ENV ANT_VERSION 1.10.13
3434
ENV ANT_HOME /tmp/ant-$ANT_VERSION
3535
ENV PATH $ANT_HOME/bin:$PATH
36-
# Need wget to install ant, and unzip for managing AIPs
36+
# Need wget to install ant
3737
RUN apt-get update \
38-
&& apt-get install -y --no-install-recommends wget unzip \
38+
&& apt-get install -y --no-install-recommends wget \
3939
&& apt-get purge -y --auto-remove \
4040
&& rm -rf /var/lib/apt/lists/*
4141
# Download and install 'ant'
@@ -45,10 +45,15 @@ RUN mkdir $ANT_HOME && \
4545
RUN ant init_installation update_configs update_code
4646

4747
# Step 3 - Run jdk
48-
FROM openjdk:${JDK_VERSION}
48+
FROM eclipse-temurin:${JDK_VERSION}
4949
# NOTE: DSPACE_INSTALL must align with the "dspace.dir" default configuration.
5050
ENV DSPACE_INSTALL=/dspace
5151
# Copy the /dspace directory from 'ant_build' container to /dspace in this container
5252
COPY --from=ant_build /dspace $DSPACE_INSTALL
5353
# Give java extra memory (1GB)
5454
ENV JAVA_OPTS=-Xmx1000m
55+
# Install unzip for AIPs
56+
RUN apt-get update \
57+
&& apt-get install -y --no-install-recommends unzip \
58+
&& apt-get purge -y --auto-remove \
59+
&& rm -rf /var/lib/apt/lists/*

Dockerfile.dependencies

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
ARG JDK_VERSION=11
88

99
# Step 1 - Run Maven Build
10-
FROM maven:3-openjdk-${JDK_VERSION}-slim as build
10+
FROM maven:3-eclipse-temurin-${JDK_VERSION} as build
1111
ARG TARGET_DIR=dspace-installer
1212
WORKDIR /app
1313
# Create the 'dspace' user account & home directory

Dockerfile.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ RUN mvn --no-transfer-progress package -Pdspace-rest && \
2727
mvn clean
2828

2929
# Step 2 - Run Ant Deploy
30-
FROM openjdk:${JDK_VERSION}-slim as ant_build
30+
FROM eclipse-temurin:${JDK_VERSION} as ant_build
3131
ARG TARGET_DIR=dspace-installer
3232
# COPY the /install directory from 'build' container to /dspace-src in this container
3333
COPY --from=build /install /dspace-src

0 commit comments

Comments
 (0)