Skip to content

Commit

Permalink
customer/uk-upgrade-7.6.1 (#460)
Browse files Browse the repository at this point in the history
* by default only deploy to INSTANCE=5

* give more time for postgres init

* add even more time

* Update action.yml (#405)

Run import from main branch

* ufal/fe-update-json-messages

Added missing tranlates and updated messages after running the script

* ufal/fe-initiated-login-not-redirecting-from-collection

Redirect to login with `redirectUrl` param because it is lost after click on `local` login button. (#404)

* [devOps] add dspace commands after import

* ufal/fe-add-default-static-pages (#406)

* Added static pages from the lindat git

* Fixed redirection and created safeHtml pipe.

* Could redirect out of namespace url, small refactoring.

* Updated tests.

* Added images into the static pages.

* ufal/fe-shibboleth-validate-emails

* Encoded query params (#407)

* placeholder configs to be mounted into docker

* change entrypoint so that containers has less logs and restarts (#412)

* ufal/fe-get-user-ip-address (#420)

* The clients IP address is fetched from the BE API.

* Replace LegacyBitstreamUrlResolver by BitstreamBreadcrumbResolver because the first one throws errors to the console.

* ufal/fe-fix-static-page-redirect (#421)

* Fixed static page redirects.

* Refactored processing links.

* ufal/fe-download-bitstream-back-to-item (#423)

* Separated toggling of DiscoJuice popup from the workign with redirect URL

* The downloading page is loaded before downloading.

* Login redirect works.

* Removed storing cookies in the aai.js

* ufal/fe-oversized-file-upload-message (#424)

* If the file exceeds the upload max file size the uploading will be stopped before starting and the user will see proper error message.

* Fixed unit tests - added configurationDataService

* ufal/fe-item-view-license-box (#427)

* Do not show licenses if the Item doesn't have any file.

* ufal/fe-email-restricted-download (#430)

* ClarinAuthorization passed, but vanilla not because of vanilla check - I added dtoken into vanilla authorization url and because of that the vanilla authorization will be passed.

* Added message for the expiration token message - it was hardcoded.

* ufal/fe-not-show-shib-welcome-page

* Loaded property from the cfg and check if the page with idp attributes could be showed up. If not redirect the user to the home page. (#431)

* ufal/fe-s3-customization (#428)

* The admin could see in the bitstream admin UI if the bitstream is stored in both storages (S3, local).

* Fixed failing unit test - updated columnSizes object

* ufal/curate-translation-missing

Added curate collection edit translation and curation task name. (#434)

* ufal/upload-on-first-attempt-fix (#435)

* Moved file size limit into FileUploader options and handled Upload cancelation.

* Check that uploading is successful

* ufal/fe-show-checksum-result (#432)

* BitstreamChecksum values are fetched and parsed from the BE

* Checksum info is showed up.

* Added messages and translations.

* Added docs and refactored code

* Fixed failing tests

* Fixed wrong czech translations.

* ufal/shibboleth-redirect-from-login (#433)

* Send redirectUrl param to the IdP in the target url

* The code is updated to be more readable.

* internal/increase-server-memory-limit (#411)

* Update docker-compose-rest.yml

Increase memory limit to 4GB

* Load JAVA_OPTS from the .env file.

* ufal/shibboleth-encode-redirecturl (#438)

* Compose redirectURL if the redirection is initiated from the login page and encode that URL because server cannot process decoded URL.

* Removed unused getCookie method.

* Updated if condition - it was made more readable

* Avoid accessing an out-of-bounds index in the split question marks array.

* internal/fix-failing-it (#437)

* Fixed integration tests - updated login via form - closed discojuice login. Updated licenses path to `licenses/manage-table`

* Cancel discojuice if it is popped up in the tombstone test

* internal/docker-remove-orphans (#439)

* Removed --remove-orphans flag because it doesn't have any effect.

* internal/update-config

* Copied missing parts from TUL:config/config.yml (#441)

* internal/fe-upgrade-clarin-dspace-7.6 (#450)

* 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

# Conflicts:
#	src/app/shared/log-in/log-in.component.html
#	src/app/shared/log-in/log-in.component.ts

* 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]>

* Update docker.yml (#452)

It was run only for `dspace` repository

* The BE was started without instance (#453)

* Copying of solr configs were missing from the docker-compose-rest (#454)

* configured path (#455)

try to append server/ to test gh action

* Internal/run container in production mode (#456)

* Added NODE_ENV=production because the container is trying to run in development mode

* Use Vanilla dspace-ui.json instead of ours from root.

* Updated path for running `dspace-ui.json`

* Use ENV - production in the dspace-ui.json (#457)

* The docker-compose-rest has defined network which is not the same like in the cli.yml - it throws an error (#458)

* Update deploy.yml (#459)

Allowed S3

---------

Co-authored-by: MajoBerger <[email protected]>
Co-authored-by: Jozef Misutka <[email protected]>
Co-authored-by: jm <jm@maz>
Co-authored-by: MajoBerger <[email protected]>
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
Show file tree
Hide file tree
Showing 1,223 changed files with 83,649 additions and 49,160 deletions.
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

0 comments on commit 36214ec

Please sign in to comment.