Skip to content

Commit

Permalink
internal/fe-upgrade-clarin-dspace-7.6 (#450)
Browse files Browse the repository at this point in the history
* Fix accessibility of date sliders by adding aria-labels

(cherry picked from commit 2a88179)

* Minor fixes to cypress tests

(cherry picked from commit 70a7bbe)

* Fix heading order accessibility issue in search filters/facets

(cherry picked from commit 276d808)

* Spanish translation updated to 7.6

(cherry picked from commit 4cc4192)

* Some lint errors fixed

(cherry picked from commit 1885638)

* 🐛 fix when navbar expands on firefox

(cherry picked from commit 6070672)

* 🐛 Fix Value of dropdown changes automatically on item submission page

(cherry picked from commit 6513059)

* ✅change test event, click by mousedown on dynamic-scrollable-dropdown.component.spec.ts

(cherry picked from commit 25479e1)

* config/config.example.yml: fix example syntax

As of DSpace Angular 7.2 the syntax has changed from TypeScript to
YAML.

(cherry picked from commit 9e46b53)

* Fix VocabularyTreeview not updating + i18n for nsi

(cherry picked from commit b5a70e8)

* 104189: Allow CSV export on related entity search

(cherry picked from commit cac1407)

* 104189: CSV export add fixedFilter

(cherry picked from commit 45ad5f7)

* Minor pt-PT translation fixes

(cherry picked from commit a6c1120)

* remove redundant cache default values from server.ts

(cherry picked from commit e53abcb)

* 🚸remove thumbnail from file-upload section and show bitstream format and checksum

(cherry picked from commit 4c8ec8a)

* 🎨revert unnecessary format

(cherry picked from commit 13e4052)

* Update workspaceitem-section-upload-file.model.ts

Fix code comment

(cherry picked from commit 01c8a4d)

* ♻️ refactor chain of observables to avoid async issues

(cherry picked from commit 2dc9fd4)

* 🐛 fix bug of caching when add new schema

(cherry picked from commit 9fb9e58)

* 🎨 revert format

(cherry picked from commit 3e5524d)

* Fix innerText still being undefined in ssr mode

* Correct text of help info on edit group page

(cherry picked from commit 4924743)

* Graceful shutdown on SIGINT (e.g. from 'pm2 stop').

(cherry picked from commit 6709c3b)

* Properly await termination.

(cherry picked from commit 4449737)

* Document a modified method as required by PR guidelines.

(cherry picked from commit bf9b2b8)

* 106974: Angular SSR menu issues

* src/app/shared/search: don't capitalize metadata values

Don't capitalize metadata values for display purposes.

* fix issue where more than one api call was made on every route change

* fix issue where invalidateRootCache didn't happen when the page first loaded

* remove obsolete label element in metadata-schema.component.html

(cherry picked from commit 6847c30)

* removed trailing whitespaces as suggested by reviewer

(cherry picked from commit 43f19e7)

* [Port dspace-7_x] Update fi.json5 (DSpace#2516)

* Update fi.json5

Two last translations to the Finnish file.

(cherry picked from commit c3a908b)

* Fix routes not working with baseHref

(cherry picked from commit 18febff)

* [Port dspace-7_x] Serbian (Latin) translation (DSpace#2520)

* Serbian (latin) translation added.

---------

Co-authored-by: imilos <[email protected]>

* [Port dspace-7_x] Fix missing or wrong Italian translations (DSpace#2522)

[DURACOM-184] fix missing or wrong Italian translations

---------

Co-authored-by: Andrea Barbasso <´[email protected]´>

* fix dev mode issue where retrieving the login options fails

* roll back unintended change to the responseMsToLive for RootDataservice

* [DURACOM-185] Fix pointer on language dropdown menu

(cherry picked from commit 6b5708c)

* Move subscription button to DSO edit menu

(cherry picked from commit c955816)

* Update DSO edit menu resolver tests

- Abstract away the different "subsections" ~ DSO type (the tests should not care about this)
  Instead, retrieve sections of interest by ID & assert whether they're there & how they should look
- Test separately for Communities, Collections & Items
- Test newly added menu section

(cherry picked from commit 18b7a9c)

* Issue#2535: Hide add more button in submission if no disabled sections

* translate community as 'Bereich' in de.json5

(cherry picked from commit 0139670)

* Fix browse by visual bug

(cherry picked from commit d0b4e15)

* Bump postcss from 8.4.23 to 8.4.31

Bumps [postcss](https://github.com/postcss/postcss) from 8.4.23 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](postcss/postcss@8.4.23...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
(cherry picked from commit 3c5079e)

* check cssRules existence before css variables are get from stylesheet

(cherry picked from commit 367cda2)

* checkstyle remove unused extra lines

(cherry picked from commit 5f8a9de)

* 107664: Normalized ePerson & group edit url and moved error message to translation file

* Bump @babel/traverse from 7.21.4 to 7.23.2

Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.21.4 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
(cherry picked from commit 97f7a5e)

* Revert "Check cssRules before css variables are read from stylesheet (DSpace#2454)"

This reverts commit fa79c35.

(cherry picked from commit 6f73b65)

* Update email-request-copy.component.html

Message is optional: remove req in [disabled]

(cherry picked from commit 94c756d)

* Fix RequestService test failing because of different lastUpdated time

(cherry picked from commit fb31533)

* Use gap instead of individual paddings for header icons

(cherry picked from commit 9f2a1d0)

* Themed LangSwitchComponent

(cherry picked from commit f9b4460)

* Applied same gap between header icons in the dspace theme and made the search field non-focusable when collapsed

(cherry picked from commit 58d31dd)

* Fixed invalid html structure the ExpandableNavbarSectionComponent had an ul tag containing non-li tags

(cherry picked from commit fa56d5d)

* Added Serbian cyrilic translation and corrected Serbian latin translation.

(cherry picked from commit ad12e5a)

* Added Serbian cyrilic translation and corrected Serbian latin translation.

(cherry picked from commit aa9e12d)

* Merge branch 'fix-display-order-authentication-methods_contribute-7.4' into fix-display-order-authentication-methods_contribute-7.6

* Added themed-user-menu component.

* Corrected missing semicolon.

* Replaced tags for ds-user-menu.

* Included user-menu component in custom theme.

* Removed default value from inExpandableNavbar.

* [DURACOM-190] Fix i18n labels in vocabulary-treeview

(cherry picked from commit b321d6f)

* [DURACOM-190] Fix alignment in vocabulary-treeview

(cherry picked from commit feb2b2b)

* allow to insert multi-line scope notes in MD field registry

(cherry picked from commit 5bc5dd8)

* Added support for changing the color of the navbar

(cherry picked from commit f6649e1)

* Fixed header bg color not being set in default (no) theme

(cherry picked from commit 14b1ce5)

* Fixed breadcrumb padding using incorrect syntax

(cherry picked from commit 6c48238)

* Added new variables for the expandable navbar section

(cherry picked from commit 2ca2a38)

* New themed components & minor CSS fixes (DSpace#2442)

* 100839: Created themeable BrowseByComponent

* 100839: Added themed BrowseByComponent to custom theme

* 100839: Added themed BrowseEntryListElementComponent to custom theme

* Added PersonComponent to custom theme

* Themed LogInComponent

* Fix focus on navbar using different color

* Fix ccLicense checkbox margin

* Fix long search facets name not displaying correctly

* Removed RecentItemListComponent's unnecessary float causing alignment issues when adding components underneath it

* Themed RegisterEmailFormComponent

* more error-prone check of cssRules existence before css variables are get from stylesheet

check the existence off cssRules property before the variables are readed from this stylesheet
DSpace#2450

(cherry picked from commit 4dd334f)

* fix(pt-BR.json5): fix and update the language file

Fix and update the pt-BR language file

* fix(pt-BR.json5): fix and update the language file and previous errors

Fix and update the pt-BR language file and the previous errors

* Merged in DSC-106 (pull request #643)

[DSC-106] Date input usable via keyboard using tab

Approved-by: Vincenzo Mecca
(cherry picked from commit 543b4ad)

* [DURACOM-194] fixed year input value on input type date

(cherry picked from commit c412c1f)

* Ensure e2e tests run in production mode

(cherry picked from commit 7dcaae8)

* Specify user agent to avoid being detected as a "bot" by backend

(cherry picked from commit 72cda41)

* [DURACOM-177] gap-* classes

(cherry picked from commit 930a381)

* [DURACOM-177] Use gap-* classes on navbar buttons

(cherry picked from commit a356295)

* [DURACOM-197] Fix cache issue when depositing a submission

(cherry picked from commit f992ff6)

* Add UI nameSpace context path to Mirador viewer path

(cherry picked from commit 3228c45)

* 108055: fix issue 8686: unable to enter freetext values in the submission form for vocabulary

(cherry picked from commit 0dcf6cb)

* 108055: add user input to tag list

(cherry picked from commit aac58e6)

* Support type-bind of elements based on repeatable list type-bound element (CHECKBOX_GROUP)

(cherry picked from commit 09aaa46)

* [DURACOM-195] Simplify vertical spacing in header and breadcrumbs

(cherry picked from commit a3e6d9b)

* [DURACOM-180] Prevent header from covering media viewer controls (dspace theme)

(cherry picked from commit 0208a78)

* [DURACOM-180] Prevent header from covering media viewer controls (base theme)

(cherry picked from commit c042cd8)

* Update condition to render show more node

`loadingNode` ends up being the current `node` after clicking it preventing it from rendering when more pages available.

Update community list component spec

Make the show more flat node id unique

The nodes with same id are conflicting when added to the tree. Clicking on the second with same id places the show more button under the wrong branch and expands the wrong page.

(cherry picked from commit 11d3771)

* Filter expanded nodes by id

Co-Authored-By: Art Lowel <[email protected]>
(cherry picked from commit dc2ef98)

* Added skip to main content button

* Limit getMembers() and getSubgroups() to only fetching one object. These lists are only used to find the size of each

(cherry picked from commit 0da7c15)

* Remove isSubgroupOfGroup() functionality as it loads every subgroup at once. Bad peformance for large groups

(cherry picked from commit 97479a2)

* Fix bug where linked Community/Collection info was sometimes listed many times in a row

(cherry picked from commit 2292366)

* Remove "isMemberOfGroup()" from members-list component.

(cherry picked from commit 43d3719)

* Remove unnecessary EpersonDtoModel. Rework code and tests to use EPerson instead.

(cherry picked from commit bffae54)

* Also remove unnecessary EpersonDtoModel from extending ReviewersListComponent. Remove "memberOfGroup" from EpersonDtoModel as it is no longer used

(cherry picked from commit b598f1b)

* Fix subgroups-list specs so they align with new members-list specs

(cherry picked from commit 64f968b)

* Refactor members-list and subgroups-list components to use new isNotMemberOf endpoints (via services)

(cherry picked from commit 8a10888)

* Refactor subgroups-list component's "search()" to act same as member-list component's "search()". Avoids reloading the page as frequently.

(cherry picked from commit 2eb1a17)

* Remove seemingly unnecessary page reload after new search.

(cherry picked from commit d163db1)

* Address feedback. Run empty search on init. Reorder sections to list current members before add members (for both eperson and groups)

(cherry picked from commit 9117ac0)

* Bump axios from 0.27.2 to 1.6.0

Bumps [axios](https://github.com/axios/axios) from 0.27.2 to 1.6.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](axios/axios@v0.27.2...v1.6.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
(cherry picked from commit ef9f31d)

* 108045: Fix for repeatable date field labels

* Fixed test

* Fix handle redirect not working with custom nameSpace

(cherry picked from commit b894dce)

* adding new access-status-list-element-badge css classes

(cherry picked from commit e847e4e)

* Create new access-status-badge.component.scss

(cherry picked from commit 3bf2eb1)

* new accessStatusClass atribute

(cherry picked from commit 6378dbe)

* remove replaceAll and use an object property

(cherry picked from commit c7eae92)

* adding ngOnDestroy for dealing with unsubscribe

(cherry picked from commit 75b788d)

* 107671: Fix handle theme not working with canonical prefix https://hdl.handle.net/

(cherry picked from commit a7faf7d)

* 107671: Split Theme model & ThemeConfig classes in separate files to prevent circular dependencies

(cherry picked from commit da8880e)

* 107671: Fixed bug where config property would still sometimes be undefined whey calling the ngOnDestroy in the ThemedComponent

(cherry picked from commit 4e54cca)

* 107671: Fixed theme matching by handle not working in production mode

(cherry picked from commit 7529ed8)

* [DURACOM-202] feature: item edit pages are accessible by administrator

(cherry picked from commit ccf1cc4)

* [DURACOM-202] refactor: code

(cherry picked from commit b6d515f)

* [DURACOM-202] refactor: code

(cherry picked from commit 6f64db1)

* fix: random order of buttons in status tab

(cherry picked from commit 35f8b55)

* refactor: code

(cherry picked from commit fbbbc18)

* 107685: menu-component re-render section on store update

* 107902: Created test case for 2f26e68

* Update version tag for release

* Fixed lint errors

* Fixed compilation errors which were created by mistakes from upgrade

* Fixed wrong resolved conlicts for test files and copied yarn.lock from the dspace761 image

* Update charts, toggle dependencies in the package.json

* updated yarn.lock - from 7.6.1 and run yarn install

* Revert "updated yarn.lock - from 7.6.1 and run yarn install"

This reverts commit 2dabb71.

* updated yarn.lock - from 7.6.1 and run yarn install

* Fixed lint errors

* Fixed semicolon lint error.

* update clarin item statistics

* After deleting `.browserlistrc` the errors are gone.. that file is totally empty, it isn't into Vanilla 7.6. and makes me so many problems..
ReactiveX/rxjs#5976

* Fixed clarin-zip-download-page.component.spec.ts tests - if payload was null it throws an error

* Fixed section-form.component.spec.ts tests - delay was missing in tests and some duplicate of the code has occurred.

* Checkout vocabulary-treeview.component.html file because it was removed during resolving conflicts.

* Updated router.mock.ts - one method was missing from clarin routerstub

* Fixed log-in-password.component.spec.ts - authService was used in the wrong way

* Removed set timeout in tests `section-form.component.spec.ts`

* Removed duplicate cypress config file

* Updated complex input field test

* spy on reinitializeForm method

* Fixed warn in the `bypassSecurityTrustResourceUrl` when the url contains `undefined`

* Removed `id` - it doesn't help in the failing tests.

* Commented out failing tests.

* Renamed integration test names following a new cypress version.

* WorkspaceitemsEditPage resolver was missing.

* Removed green line from the navbar.

* Fixed crossing home page into nav and footer.

* Fixed home page to the navbar and footer

* Added missing messages into en.json

* `my-cs` main content must be used, I updated margin of home page

* Updated padding between language flags

* Show license type in the default grey color in the item view box

* Updated license selector padding and colors

* Do not show empty item type box in the item view box

* The sponsor values are showed in the Item View.

* Added unit tests for testing showing of the Acknowledgement

* Added messages for the acknowledgement component.

* Fixed lint errors from the `cs.json5`

* Added translate module into clarin-sponsor-item-field.component.spec.ts because it was missing

* Updated IT database dump - a DB was updated by Vanilla

* Fixed `collection-statistics.cy.ts` test, it wanted to see `menu` option which was removed in the CLARIN-DSpace update.

* Call index-discovery in the docker-compose-ci.yml instead of `cli.assetstore.yml` because it is not run from the `cli.assetstore.yml`

* Commented out the `login-modal.cy.ts` because the CLARIN-DSpace has different login

* Commented out the accessibility violations in the `my-dspace.cy.ts`

* Fixed calling indexing of the solr

* Commented community statistics menu from the `community-statistics.cy` integration test

* Commented out the search navbar tests

* Login and language flags was covered by the menu navbar - I updated z-index

* Commented out item-page accessibility tests

* Updated submission.cy.ts process - license granting

* Commented out the item statistics menu test

* Commented out the accessibility tests

* Added missing .env properties into `cypress`

* Fixed failing IT

---------

Co-authored-by: Tim Donohue <[email protected]>
Co-authored-by: Sergio Fernández Celorio <[email protected]>
Co-authored-by: Hugo Dominguez <[email protected]>
Co-authored-by: Alan Orth <[email protected]>
Co-authored-by: Nona Luypaert <[email protected]>
Co-authored-by: Kristof De Langhe <[email protected]>
Co-authored-by: José Carvalho <[email protected]>
Co-authored-by: Sascha Szott <[email protected]>
Co-authored-by: Alexandre Vryghem <[email protected]>
Co-authored-by: Mark H. Wood <[email protected]>
Co-authored-by: Yana De Pauw <[email protected]>
Co-authored-by: Art Lowel <[email protected]>
Co-authored-by: DSpace Bot <[email protected]>
Co-authored-by: Hrafn Malmquist <[email protected]>
Co-authored-by: imilos <[email protected]>
Co-authored-by: Andrea Barbasso <´[email protected]´>
Co-authored-by: Davide Negretti <[email protected]>
Co-authored-by: Yury Bondarenko <[email protected]>
Co-authored-by: Marie Verdonck <[email protected]>
Co-authored-by: Janne Jensen <[email protected]>
Co-authored-by: Pascal-Nicolas Becker <[email protected]>
Co-authored-by: Jens Vannerum <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gantner, Florian Klaus <[email protected]>
Co-authored-by: Agustina Martinez <[email protected]>
Co-authored-by: Eike Martin Löhden <[email protected]>
Co-authored-by: Marco Aurelio Cardoso <[email protected]>
Co-authored-by: Alisa Ismailati <[email protected]>
Co-authored-by: Alisa Ismailati <[email protected]>
Co-authored-by: Giuseppe Digilio <[email protected]>
Co-authored-by: William Welling <[email protected]>
Co-authored-by: Andreas Mahnke <[email protected]>
Co-authored-by: lotte <[email protected]>
Co-authored-by: Paulo Graça <[email protected]>
Co-authored-by: Vlad Nouski <[email protected]>
  • Loading branch information
1 parent 8eb4334 commit 8fc0f08
Show file tree
Hide file tree
Showing 538 changed files with 30,195 additions and 29,607 deletions.
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
20 changes: 14 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,14 @@ 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"
Expand Down Expand Up @@ -97,11 +103,13 @@ jobs:
# 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 @@ -115,7 +123,7 @@ 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 (default)
browser: chrome
Expand Down
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
67 changes: 60 additions & 7 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ permissions:

jobs:
docker:
# Ensure this job never runs on forked repos. It's only executed for our repo
if: github.repository == 'dataquest-dev/dspace-angular'
# Ensure this job never runs on forked repos. It's only executed for 'dspace/dspace-angular'
if: github.repository == 'dspace/dspace-angular'
runs-on: ubuntu-latest
env:
# Define tags to use for Docker images based on Git tags/branches (for docker/metadata-action)
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 Down Expand Up @@ -65,7 +61,7 @@ jobs:
id: meta_build
uses: docker/metadata-action@v4
with:
images: dataquest/dspace-angular
images: dspace/dspace-angular
tags: ${{ env.IMAGE_TAGS }}
flavor: ${{ env.TAGS_FLAVOR }}

Expand All @@ -84,6 +80,63 @@ jobs:
tags: ${{ steps.meta_build.outputs.tags }}
labels: ${{ steps.meta_build.outputs.labels }}

#############################################################
# Build/Push the 'dspace/dspace-angular' image ('-dist' tag)
#############################################################
dspace-angular-dist:
# Ensure this job never runs on forked repos. It's only executed for 'dspace/dspace-angular'
if: github.repository == 'dspace/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: dspace/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@dtq-dev
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/label_merge_conflicts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow checks open PRs for merge conflicts and labels them when conflicts are found
name: Check for merge conflicts

# Run this for all pushes (i.e. merges) to 'main' or maintenance branches
on:
push:
branches:
- main
- 'dspace-**'
# So that the `conflict_label_name` is removed if conflicts are resolved,
# we allow this to run for `pull_request_target` so that github secrets are available.
pull_request_target:
types: [ synchronize ]

permissions: {}

jobs:
triage:
# Ensure this job never runs on forked repos. It's only executed for 'dspace/dspace-angular'
if: github.repository == 'dspace/dspace-angular'
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
# See: https://github.com/prince-chrismc/label-merge-conflicts-action
- name: Auto-label PRs with merge conflicts
uses: prince-chrismc/label-merge-conflicts-action@v3
# Ignore any failures -- may occur (randomly?) for older, outdated PRs.
continue-on-error: true
# Add "merge conflict" label if a merge conflict is detected. Remove it when resolved.
# Note, the authentication token is created automatically
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token
with:
conflict_label_name: 'merge conflict'
github_token: ${{ secrets.GITHUB_TOKEN }}
conflict_comment: |
Hi @${author},
Conflicts have been detected against the base branch.
Please [resolve these conflicts](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/about-merge-conflicts) as soon as you can. Thanks!
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ package-lock.json
.env
/nbproject/

junit.xml

/src/mirador-viewer/config.local.js

# import data python module
python_data_import/debug.log.txt
python_data_import/logs.txt
python_data_import/date.txt
*/__pycache__/

junit.xml
11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,20 @@ EXPOSE 4000

# We run yarn install with an increased network timeout (5min) to avoid "ESOCKETTIMEDOUT" errors from hub.docker.com
# See, for example https://github.com/yarnpkg/yarn/issues/5540
RUN yarn install --network-timeout 2000000
RUN yarn install --network-timeout 300000

# When running in dev mode, 4GB of memory is required to build & launch the app.
# This default setting can be overridden as needed in your shell, via an env file or in docker-compose.
# See Docker environment var precedence: https://docs.docker.com/compose/environment-variables/envvars-precedence/
ENV NODE_OPTIONS="--max_old_space_size=4096"

# On startup, run in DEVELOPMENT mode (this defaults to live reloading enabled, etc).
# Listen / accept connections from all IP addresses.
# NOTE: At this time it is only possible to run Docker container in Production mode
# if you have a public IP. See https://github.com/DSpace/dspace-angular/issues/1485
# if you have a public URL. See https://github.com/DSpace/dspace-angular/issues/1485
ENV NODE_ENV development
RUN apk add tzdata
RUN yarn build:prod
RUN npm install pm2 -g
CMD /bin/sh -c "pm2-runtime start dspace-ui.json > /dev/null 2> /dev/null"

9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ DSPACE_UI_SSL => DSPACE_SSL

The same settings can also be overwritten by setting system environment variables instead, E.g.:
```bash
export DSPACE_HOST=api7.dspace.org
export DSPACE_UI_PORT=4200
export DSPACE_HOST=demo.dspace.org
export DSPACE_UI_PORT=4000
```

The priority works as follows: **environment variable** overrides **variable in `.env` file** overrides external config set by `DSPACE_APP_CONFIG_PATH` overrides **`config.(prod or dev).yml`**
Expand Down Expand Up @@ -288,7 +288,7 @@ E2E tests (aka integration tests) use [Cypress.io](https://www.cypress.io/). Con
The test files can be found in the `./cypress/integration/` folder.

Before you can run e2e tests, two things are REQUIRED:
1. You MUST be running the DSpace backend (i.e. REST API) locally. The e2e tests will *NOT* succeed if run against our demo REST API (https://api7.dspace.org/server/), as that server is uncontrolled and may have content added/removed at any time.
1. You MUST be running the DSpace backend (i.e. REST API) locally. The e2e tests will *NOT* succeed if run against our demo/sandbox REST API (https://demo.dspace.org/server/ or https://sandbox.dspace.org/server/), as those sites may have content added/removed at any time.
* After starting up your backend on localhost, make sure either your `config.prod.yml` or `config.dev.yml` has its `rest` settings defined to use that localhost backend.
* If you'd prefer, you may instead use environment variables as described at [Configuring](#configuring). For example:
```
Expand Down Expand Up @@ -413,8 +413,7 @@ dspace-angular
│ ├── merge-i18n-files.ts *
│ ├── serve.ts *
│ ├── sync-i18n-files.ts *
│ ├── test-rest.ts *
│ └── webpack.js *
│ └── test-rest.ts *
├── src * The source of the application
│ ├── app * The source code of the application, subdivided by module/page.
│ ├── assets * Folder for static resources
Expand Down
15 changes: 13 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@
"options": {
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
"src/**/*.html",
"src/**/*.json5"
]
}
}
Expand All @@ -281,6 +282,16 @@
},
"cli": {
"analytics": false,
"defaultCollection": "@angular-eslint/schematics"
"schematicCollections": [
"@angular-eslint/schematics"
]
},
"schematics": {
"@angular-eslint/schematics:application": {
"setParserOptionsProject": true
},
"@angular-eslint/schematics:library": {
"setParserOptionsProject": true
}
}
}
Loading

0 comments on commit 8fc0f08

Please sign in to comment.