Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

customer/uk-upgrade-7.6.1 #460

Merged
merged 38 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
c03a530
by default only deploy to INSTANCE=5
MajoBerger Nov 16, 2023
51bb185
give more time for postgres init
vidiecan Nov 16, 2023
75923d3
add even more time
Nov 16, 2023
4e44231
Update action.yml (#405)
milanmajchrak Nov 30, 2023
5965637
ufal/fe-update-json-messages
milanmajchrak Dec 1, 2023
560aada
ufal/fe-initiated-login-not-redirecting-from-collection
milanmajchrak Dec 1, 2023
a5c9d5d
[devOps] add dspace commands after import
Dec 1, 2023
5e3c540
ufal/fe-add-default-static-pages (#406)
milanmajchrak Dec 5, 2023
c4e8387
ufal/fe-shibboleth-validate-emails
milanmajchrak Dec 6, 2023
285a115
placeholder configs to be mounted into docker
MajoBerger Dec 6, 2023
b6e7c7d
change entrypoint so that containers has less logs and restarts (#412)
MajoBerger Dec 11, 2023
8637755
ufal/fe-get-user-ip-address (#420)
milanmajchrak Dec 14, 2023
40e3e85
ufal/fe-fix-static-page-redirect (#421)
milanmajchrak Dec 14, 2023
1d4c3a5
ufal/fe-download-bitstream-back-to-item (#423)
milanmajchrak Dec 14, 2023
ee0e746
ufal/fe-oversized-file-upload-message (#424)
milanmajchrak Dec 15, 2023
bb8ed5f
ufal/fe-item-view-license-box (#427)
milanmajchrak Dec 19, 2023
ddee862
ufal/fe-email-restricted-download (#430)
milanmajchrak Dec 21, 2023
2d073dd
ufal/fe-not-show-shib-welcome-page
milanmajchrak Dec 21, 2023
dd80fde
ufal/fe-s3-customization (#428)
milanmajchrak Dec 21, 2023
11de325
ufal/curate-translation-missing
milanmajchrak Jan 3, 2024
0484c9d
ufal/upload-on-first-attempt-fix (#435)
milanmajchrak Jan 3, 2024
6be9911
ufal/fe-show-checksum-result (#432)
milanmajchrak Jan 3, 2024
4e6c290
ufal/shibboleth-redirect-from-login (#433)
milanmajchrak Jan 3, 2024
051adab
internal/increase-server-memory-limit (#411)
milanmajchrak Jan 4, 2024
28425d4
ufal/shibboleth-encode-redirecturl (#438)
milanmajchrak Jan 5, 2024
d663b56
internal/fix-failing-it (#437)
milanmajchrak Jan 5, 2024
602e5d9
internal/docker-remove-orphans (#439)
milanmajchrak Jan 5, 2024
b45168e
internal/update-config
milanmajchrak Jan 8, 2024
58b97f6
internal/fe-upgrade-clarin-dspace-7.6 (#450)
milanmajchrak Jan 30, 2024
3ee5151
Update docker.yml (#452)
milanmajchrak Jan 31, 2024
a38dca1
The BE was started without instance (#453)
milanmajchrak Jan 31, 2024
8453dc5
Copying of solr configs were missing from the docker-compose-rest (#454)
milanmajchrak Jan 31, 2024
431ea2b
configured path (#455)
milanmajchrak Jan 31, 2024
97b25bb
Internal/run container in production mode (#456)
milanmajchrak Feb 1, 2024
34cf136
Use ENV - production in the dspace-ui.json (#457)
milanmajchrak Feb 1, 2024
85a2224
The docker-compose-rest has defined network which is not the same lik…
milanmajchrak Feb 1, 2024
980c97a
Update deploy.yml (#459)
milanmajchrak Feb 2, 2024
5266970
Merged changes from dtq-dev
milanmajchrak Feb 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 0 additions & 17 deletions .browserslistrc

This file was deleted.

3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ trim_trailing_whitespace = false

[*.ts]
quote_type = single

[*.json5]
ij_json_keep_blank_lines_in_code = 3
39 changes: 38 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"eslint-plugin-jsdoc",
"eslint-plugin-deprecation",
"unused-imports",
"eslint-plugin-lodash"
"eslint-plugin-lodash",
"eslint-plugin-jsonc"
],
"overrides": [
{
Expand Down Expand Up @@ -224,6 +225,42 @@
"@angular-eslint/template/no-negated-async": "off",
"@angular-eslint/template/eqeqeq": "off"
}
},
{
"files": [
"*.json5"
],
"extends": [
"plugin:jsonc/recommended-with-jsonc"
],
"rules": {
"no-irregular-whitespace": "error",
"no-trailing-spaces": "error",
"jsonc/comma-dangle": [
"error",
"always-multiline"
],
"jsonc/indent": [
"error",
2
],
"jsonc/key-spacing": [
"error",
{
"beforeColon": false,
"afterColon": true,
"mode": "strict"
}
],
"jsonc/no-dupe-keys": "off",
"jsonc/quotes": [
"error",
"double",
{
"avoidEscape": false
}
]
}
}
]
}
6 changes: 3 additions & 3 deletions .github/disabled-workflows/issue_opened.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow runs whenever a new issue is created
name: Issue opened

on:
on:
issues:
types: [opened]

Expand All @@ -16,8 +16,8 @@ jobs:
# Only add to project board if issue is flagged as "needs triage" or has no labels
# NOTE: By default we flag new issues as "needs triage" in our issue template
if: (contains(github.event.issue.labels.*.name, 'needs triage') || join(github.event.issue.labels.*.name) == '')
uses: actions/add-to-project@v0.3.0
# Note, the authentication token below is an ORG level Secret.
uses: actions/add-to-project@v0.5.0
# Note, the authentication token below is an ORG level Secret.
# It must be created/recreated manually via a personal access token with admin:org, project, public_repo permissions
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#permissions-for-the-github_token
# This is necessary because the "DSpace Backlog" project is an org level project (i.e. not repo specific)
Expand Down
26 changes: 0 additions & 26 deletions .github/disabled-workflows/pull_request_opened.yml

This file was deleted.

58 changes: 49 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,19 @@ jobs:
DSPACE_REST_PORT: 8080
DSPACE_REST_NAMESPACE: '/server'
DSPACE_REST_SSL: false
# Spin up UI on 127.0.0.1 to avoid host resolution issues in e2e tests with Node 18+
DSPACE_UI_HOST: 127.0.0.1
DSPACE_UI_PORT: 4000
# Ensure all SSR caching is disabled in test environment
DSPACE_CACHE_SERVERSIDE_BOTCACHE_MAX: 0
DSPACE_CACHE_SERVERSIDE_ANONYMOUSCACHE_MAX: 0
# Tell Cypress to run e2e tests using the same UI URL
CYPRESS_BASE_URL: http://127.0.0.1:4000
# When Chrome version is specified, we pin to a specific version of Chrome
# Comment this out to use the latest release
#CHROME_VERSION: "90.0.4430.212-1"
# Bump Node heap size (OOM in CI after upgrading to Angular 15)
NODE_OPTIONS: '--max-old-space-size=4096'
strategy:
# Create a matrix of Node versions to test against (in parallel)
matrix:
Expand Down Expand Up @@ -67,7 +75,7 @@ jobs:
# https://github.com/actions/cache/blob/main/examples.md#node---yarn
- name: Get Yarn cache directory
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Cache Yarn dependencies
uses: actions/cache@v3
with:
Expand All @@ -92,12 +100,16 @@ jobs:
- name: Run specs (unit tests)
run: yarn run test:headless

# Upload code coverage report to artifact (for one version of Node only),
# so that it can be shared with the 'codecov' job (see below)
# NOTE: Angular CLI only supports code coverage for specs. See https://github.com/angular/angular-cli/issues/6286
# Upload coverage reports to Codecov (for one version of Node only)
# https://github.com/codecov/codecov-action
- name: Upload coverage to Codecov.io
uses: codecov/codecov-action@v3
if: matrix.node-version == '16.x'
- name: Upload code coverage report to Artifact
uses: actions/upload-artifact@v3
if: matrix.node-version == '18.x'
with:
name: dspace-angular coverage report
path: 'coverage/dspace-angular/lcov.info'
retention-days: 14

# Using docker-compose start backend using CI configuration
# and load assetstore from a cached copy
Expand All @@ -111,11 +123,10 @@ jobs:
# https://github.com/cypress-io/github-action
# (NOTE: to run these e2e tests locally, just use 'ng e2e')
- name: Run e2e tests (integration tests)
uses: cypress-io/github-action@v4
uses: cypress-io/github-action@v5
with:
# Run tests in Chrome, headless mode
# Run tests in Chrome, headless mode (default)
browser: chrome
headless: true
# Start app before running tests (will be stopped automatically after tests finish)
start: yarn run serve:ssr
# Wait for backend & frontend to be available
Expand Down Expand Up @@ -175,3 +186,32 @@ jobs:

- name: Shutdown Docker containers
run: docker-compose -f ./docker/docker-compose-ci.yml down

# Codecov upload is a separate job in order to allow us to restart this separate from the entire build/test
# job above. This is necessary because Codecov uploads seem to randomly fail at times.
# See https://community.codecov.com/t/upload-issues-unable-to-locate-build-via-github-actions-api/3954
codecov:
# Must run after 'tests' job above
needs: tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

# Download artifacts from previous 'tests' job
- name: Download coverage artifacts
uses: actions/download-artifact@v3

# Now attempt upload to Codecov using its action.
# NOTE: We use a retry action to retry the Codecov upload if it fails the first time.
#
# Retry action: https://github.com/marketplace/actions/retry-action
# Codecov action: https://github.com/codecov/codecov-action
- name: Upload coverage to Codecov.io
uses: Wandalen/[email protected]
with:
action: codecov/codecov-action@v3
# Try upload 5 times max
attempt_limit: 5
# Run again in 30 seconds
attempt_delay: 30000
12 changes: 8 additions & 4 deletions .github/workflows/codescan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@
# because CodeQL requires a fresh build with all tests *disabled*.
name: "Code Scanning"

# Run this code scan for all pushes / PRs to main branch. Also run once a week.
# Run this code scan for all pushes / PRs to main or maintenance branches. Also run once a week.
on:
push:
branches: [ main ]
branches:
- main
- 'dspace-**'
pull_request:
branches: [ main ]
branches:
- main
- 'dspace-**'
# Don't run if PR is only updating static documentation
paths-ignore:
- '**/*.md'
Expand Down Expand Up @@ -46,4 +50,4 @@ jobs:

# Perform GitHub Code Scanning.
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v2
17 changes: 17 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,20 @@ jobs:
with:
INSTANCE: ${{ env.INSTANCE }}
DATADIR: /opt/dspace-data/clarin-dspace/

- name: dspace command
run: |
export DNAME=dspace$INSTANCE
docker logs -n 50 $DNAME

echo "dspace version:"
docker exec $DNAME /bin/bash -c "cd /dspace/bin && ./dspace version"

echo "dspace cleanup:"
docker exec $DNAME /bin/bash -c "cd /dspace/bin && ./dspace cleanup -v"

echo "dspace checker:"
docker exec $DNAME /bin/bash -c "cd /dspace/bin && ./dspace checker -v -l"

echo "dspace healthcheck:"
docker exec $DNAME /bin/bash -c "cd /dspace/bin && ./dspace healthcheck -v"
66 changes: 58 additions & 8 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ permissions:

jobs:
docker:
# Ensure this job never runs on forked repos. It's only executed for our repo
# Ensure this job never runs on forked repos. It's only executed for 'dspace/dspace-angular'
if: github.repository == 'dataquest-dev/dspace-angular'
runs-on: ubuntu-latest
env:
Expand All @@ -32,10 +32,6 @@ jobs:
# We turn off 'latest' tag by default.
TAGS_FLAVOR: |
latest=false
# Architectures / Platforms for which we will build Docker images
# If this is a PR, we ONLY build for AMD64. For PRs we only do a sanity check test to ensure Docker builds work.
# If this is NOT a PR (e.g. a tag or merge commit), also build for ARM64.
PLATFORMS: linux/amd64${{ github.event_name != 'pull_request' && ', linux/arm64' || '' }}

steps:
# https://github.com/actions/checkout
Expand All @@ -59,9 +55,6 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}

###############################################
# Build/Push the 'dspace/dspace-angular' image
###############################################
# https://github.com/docker/metadata-action
# Get Metadata for docker_build step below
- name: Sync metadata (tags, labels) from GitHub to Docker for 'dspace-angular' image
Expand All @@ -87,6 +80,63 @@ jobs:
tags: ${{ steps.meta_build.outputs.tags }}
labels: ${{ steps.meta_build.outputs.labels }}

#############################################################
# Build/Push the 'dataquest/dspace-angular' image ('-dist' tag)
#############################################################
dspace-angular-dist:
# Ensure this job never runs on forked repos. It's only executed for 'dataquest/dspace-angular'
if: github.repository == 'dataquest/dspace-angular'
runs-on: ubuntu-latest

steps:
# https://github.com/actions/checkout
- name: Checkout codebase
uses: actions/checkout@v3

# https://github.com/docker/setup-buildx-action
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2

# https://github.com/docker/setup-qemu-action
- name: Set up QEMU emulation to build for multiple architectures
uses: docker/setup-qemu-action@v2

# https://github.com/docker/login-action
- name: Login to DockerHub
# Only login if not a PR, as PRs only trigger a Docker build and not a push
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}

# https://github.com/docker/metadata-action
# Get Metadata for docker_build_dist step below
- name: Sync metadata (tags, labels) from GitHub to Docker for 'dspace-angular-dist' image
id: meta_build_dist
uses: docker/metadata-action@v4
with:
images: dataquest/dspace-angular
tags: ${{ env.IMAGE_TAGS }}
# As this is a "dist" image, its tags are all suffixed with "-dist". Otherwise, it uses the same
# tagging logic as the primary 'dspace/dspace-angular' image above.
flavor: ${{ env.TAGS_FLAVOR }}
suffix=-dist

- name: Build and push 'dspace-angular-dist' image
id: docker_build_dist
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile.dist
platforms: ${{ env.PLATFORMS }}
# For pull requests, we run the Docker build (to ensure no PR changes break the build),
# but we ONLY do an image push to DockerHub if it's NOT a PR
push: ${{ github.event_name != 'pull_request' }}
# Use tags / labels provided by 'docker/metadata-action' above
tags: ${{ steps.meta_build_dist.outputs.tags }}
labels: ${{ steps.meta_build_dist.outputs.labels }}

deploy:
needs: docker
uses: dataquest-dev/dspace-angular/.github/workflows/deploy.yml@customer/uk
Expand Down
Loading
Loading