Skip to content

Commit

Permalink
Upgrade CLARIN-DSpace to 7.5 (#344)
Browse files Browse the repository at this point in the history
* 98433: Refactoring SingleUserReviewAction & general refactoring in Actions
- Fix in AutoAssignAction that selected reviewer didn't get registered as new InProgressSubmissionUser

* 98433: IT fixes now that access rights are now moved to selected reviewers in AutoAssignAction

* [CST-7756] removed unused param

* 98462: Use discovery configurations in browse

* [DURACOM-113] add jfif extension on bitstream formats

* 98462: Refactor change and add admin tests

* 97538: The search rest method should be public

* 97538: Alter IT for public vocabulary search method

* 97183 Tests for findItemsWithEdit and countItemsWithEdit methods of ItemServiceImpl

* 97080: DSpace#8613 - Doc for the prefix solr field

* Implemented community feedbacks

* 97425: Fix issue with sessions null value

* 97061: type request param name change to avoid confusion with rest object type &
error codes endpoint changes + IT:
- missing/wrong query param accountRequestType => 400 bad request
- email not valid domain => 422 unprocessable entity

* [CST-7756] refactoring & added missing JavaDoc

* [CST-7756] removed unused service bean

* [CST-7756] minor refactoring  according to the rest contract

* PR DSpace#8619: Removed dependency spring-context-support, not needed in main

* [CST-7756] fixed failed tests

* [CST-7756] refactoring

* [CST-7756] added tests to valid subscription parameters

* [CST-7756] added validation logic of params

* [CST-7756] renamed some methods & class

* [CST-7756] minor fix

* [CST-7756] refactored CanSubscribeFeatureIT

* 97425: Implement feedback

* [CST-7756] minor update

* [CST-7756] added missing index field

* [CST-7756] added template for subscription content email

* [CST-7754] removed old code of supervision orders
added a new migration script sql
tested that supervisors can edit only workspace items

* [CST-7756] refactoring

* Remove statusFilter added to Solr browse indexes queries to solve an issue with the local administrators navigation

* [CST-7756] monor fix

* [CST-7756] added unit tests covering methods with business logic

* [CST-7756] sub-daily command and its referred class removed, as subscriptions are sent by subscription-send command

* [CST-7756] updated license header

* 97425: Fix minor issues

* [CST-7756] added instructions to migrate subscriptions from previous versions

* [CST-7756] after merge checkstyle fix

* [CST-7756] extended abstract test

* [CST-7756] updated script

* 99053: Add return_to_pool option to all ProcessingAction except SingleUserReviewAction

* Reinstate config accidentally deleted, added in 30f923a (DSpace#8064) - enables RSS/Atom feeds

* [CST-7756] removed subscriptions for items

* [CST-7756] minor fix

* [CST-7756] extended SubscribeServiceTest in order to use service instance with real (h2) database instead of mocks, so that tests actually store, query and remove subscriptions interacting with database

* [CST-7756] added missing JavaDoc

* [CST-7756] code refactoring

* [CST-7756] renamed test class in order to reflect its actual behavior

* [CST-7756] removed mail template used by previous script

* [CST-7756] code refactoring

* [CST-7756] removed Items section

* [CST-7756] added missing IT

* [CST-7754] updated javadoc

* [CST-7754] updated comment

* [CST-7754] withdrawn item should not allow supervision order

* [CST-7754] moved supervision orders test on workflow items to SupervisionOrderRestRepositoryIT, added test covering the scenario when an admin tries to set a supervision order on a withdrawn item, and when an admin sets a supervision order on a workflow item before sending it back to workspace: supervisor can edit the item only when it goes to workspace status.

* [TLC-380] Browse links and "by regex" links in item display

* [TLC-380] Fix checkstyle and duplicate code

* [TLC-380] Further checkstyle fixes

* [TLC-380] Further checkstyle fixes

* [TLC-380] Refactor browses endpoint for browse link usage

* [TLC-249] Improve 'findByFields' browse refactor

* [TLC-380] Fix browse resource byFields IT

* [TLC-380] Remove unused methods, add ITs

* DSpace#8629: Make sure temporary worfklow groups of reviewers get deleted

* DSpace#8629: PR feedback refactor

* [CST-7756] implemented community feedbacks

* [CST-7756] added test that proves what happens if an object is access restricted after you have a subscription to it.

* [CST-7756] renamed a method

* [CST-7756] updated subscriptions migration scripts

* [CST-7756] removed 'lastModified_dt' index field

* [CST-7756] minor refactoring

* [CST-7756] added email subject

* [CST-7756] added dissemination for generic DSpace Item

* [CST-7756] If no crosswalk is defined for the Item's entity type, default generic Item one is applied

* IT fix: ReviewManagers repository wide group, not collection workflow group

* Test IT without drop constraint

* [CST-7756] restores security check as was originaly

* [CST-7756] described beans

* DSpace#8628: Remove GET shortlivedtokens endpoint & related IT

* [TLC-249] Show Identifier Step, pre-register identifiers

* [TLC-249] Remove unused import in WorkspaceItemServiceImpl

* [TLC-249] Update section count test in SubmissionDefinitionsControllerIT

* [TLC-249] Refactor to support better filter usage, PENDING and MINTED status

* [TLC-249] Add and expose config for enabling register DOI

* [TLC-249] REST backend for identifier config

* [TLC-249] Better status return for new DOIs, write new integration tests

* [TLC-249] Integration tests, keep GET handling in controller

* [TLC-249] Move GET handling back to ItemIdentifierController

* [TLC-249] Checkstyle fixes

* [TLC-249] Licence header fixes

* [TLC-249] Further checkstyle fixes

* [TLC-249] Fix tests, Refactor things to use a LinkRestRepository for GET, Controller for POST

* [TLC-249] Further IT fix for identifiers

* [TLC-249] Licence header fix

* [TLC-249] Address review feedback

Controller updated to be less DOI-specific in its
registration implementation
item-status.register renamed to registerDOI
display types included in section data, for UI hints
comments / javadoc added
DOI status text sent instead of number in status data

As per tdonohue's revew on 2022-01-18

* [TLC-249] Lint fixes

* [TLC-249] Improve model for identifier step data

* [TLC-249] Update configuration identifiers.cfg

* [TLC-249] Remove unused subclass DataIdentifier

* [TLC-249] Update identifier section IT

* [TLC-249] Update integration tests for identifier controller

* [TLC-249] Fix submission controller IT

* [TLC-249] Update canRegisterDOIFeature to check for cfg enabled

* [TLC-249] Refactor identifiers create endpoint

* [TLC-249] Refactor, include controller 'find DSO' operation

* [TLC-249] Throw not implemented for findOne and findAll

* [TLC-249] Fixes and improvements as per review feedback

* [TLC-249] Checkstyle fix

* [TLC-249] return value  as id for IdentifierRest

* [TLC-249] Fix category type in IdentifierRest

* [TLC-249] Update integration tests for IdentifierRestRepository

* [TLC-249] Refactor TrueFilter to get instantiated as singleton

* [TLC-249] Construct canonical handle URL in identifier item link

* [TL-249] Remove example-doi_filter from config, add singleton attr to TrueFilter

* [TL-249] Add always_true_filter to test REST identifier-service.xml config

* [TL-249] Add identifiers.cfg and item-filters.xml config to test data

* [TL-249] Fix imports

* [TL-249] Revert accidental commit to RestResourceController

* [TL-249] Javadoc and other small fixes, DOI unit tests

* [TL-249] Javadoc and other small fixes

Including stripping $Revision$ from filter javadoc.

* [TL-249] Checkstyle fix

* 99200: Delete items after copies have been requested fix

* [CST-7756] added security check into 'subscription-send' script

* Alternate way to restart workflow in case of decline

* Fix for decline when the delete doesn't persist in context before wfi is created again from same item

* [CST-7754] supervising user can perform operations on Workspace item only if they have proper permissions

* [DURACOM-116] process sorted alphabetically

* [TLC-249] Test abandoning of a pending DOI and minting afterwards

* [TLC-249] Ensure property identifiers.item-status.register-doi is set

* Added missing commit in cleanup method

* Update BitstreamStorageServiceImpl.java

Amend commit log message

* [CST-7756] Non-Discoverable and withdrawn items must be excluded from the notification list

* [DURACOM-116] moved sorting to service

* removed the log info

* CST-8936 fix permission for bitstream generated by media-filter

* Updates to LICENSES_THIRD_PARTY for 7.5

* [maven-release-plugin] prepare release dspace-7.5

* Fixed some compile errors

* Fixed some compile errors

* Fixed some compile errors

* Fixed errors which causes tomcat starting errors

* Ignored failing test

* Fixed MetadataExportSearchIT - the dateIssued search filter was commented out.

* Added a new action which push test image for FE integration tests.

* Updated creating of the docker

* changed to proper dependency

* Updated cfg, fixed error because rest.properties.exposed was defined in two configuration files.

* fixed cfg for tests

* Copied fixes for the PRs: 277, 279, 281, 273, 284, 286, 296, 300, 308

* Push docker only to migrate-to-7.5 and not to dtq-dev-7.5

* Update migrate-docker.yml

Updated docker action name

* Updated IT test for Shibboleth auth

* Copied ClarinLicenseImportRestController from another branch

* Shibboleth autologin error solved - new header must be added into Allowed Headers in the Application.java

* Fixed checkstyle issues.

* Internal/fix integration tests 75 (#311)

* trying action with different ref

* fixed checkstyle

* updated config, fixed several integration tests

* removed old zip file

* assurance

* dspace.ui.url was changed to http://localhost:4000

* internal/fix-another-integration-tests (#312)

* Set Default charset to UTF-8 in Integration tests

* Fixed test in the ExternalHandleRestRepositoryIT - problem was with encoding

* Fixed WorkspaceItemRestRepositoryIT#patchRejectLicenseTest - the configuration property that disable LicenseValidation was set to false.

* Fixed ClarinDiscoveryRestControllerIT.java#discoverFacetsDateTestWithLabels
FacetEntryMatcher.dateIssuedFacet(false), was missing

* Fixed ClarinDiscoveryRestControllerIT.java#discoverSearchObjectsTestWithBasicQuery missing FacetEntryMatcher.dateIssuedFacet(false),

* Fixed ClarinDiscoveryRestControllerIT tests by updating the discovery.xml

* Fixed MetadataExportSearchIT.exportMetadataSearchFilterDate - commented out the test for Date Issued date search filter which was removed from the discovery.xml

* test  (#317)

* Initial commit

* Fixed SystemWideAlertRestRepositoryIT - wrong Date comparing, the fix was copied from the upstream

* Copied fix from the upstream

* Enabled distribution license validation.

* Update build.yml

Added -fae to integration tests

* Removed unnecessary check

* Revert to DEFAULT_AMOUNT_FORMATS=81

* Fixed lookupPubmed test

---------

Co-authored-by: milanmajchrak <milan.majchrak@dataquest.sk>
Co-authored-by: milanmajchrak <90026355+milanmajchrak@users.noreply.github.com>

* enable different endpoint to S3 bitstorage (#338)

* enable different endpoint to S3 bitstorage

* modified tests

* Migrate to 7.5 (#274)

* 97298: Self-register - test fixes

* 97298: Self-register - test fixes

* [CST-7756] Rename type property to subscriptionType in the subscriptionType object

* [CST-7756] Fix checkstyle

* [CST-7756] fixed database scripts version number

* [CST-7754] otherworkspace discovery configuration shows only supervised workspace items, when a supervision order is deleted grants given to supervision groups on an item are revoked.

* [CST-7754] test supervision order is deleted if workspaceItem or group is deleted.

* 97183 Processing PR review feedback

* 97538: Unauthorized tests should now be anonymous

* 97538: Remove readability change

* 97538: Remove readability change in IT

* 97414 Advanced workflow actions: implemented feedback on SelectReviewerAction + WorkflowActionRestRepositoryIT

* 97414 Advanced workflow actions: fixed SelectReviewerAction NullPointerException

* [CST-7604] Configuration updated to highlight Orgunit and Person

* 97735: Add a accept range cors header

* Fix license issues

* 98345 Advanced workflow actions - Parse select reviewers step

* 98345 SelectReviewerAction, TaskRestRepositoriesIT and h2 migration

* 98433 Reject button mostly works - still triggers a 404 in console though

* 98434: Advanced workflow - refactor scoreReview workflow

* 98434: IT fix

* 98433: Refactoring SingleUserReviewAction & general refactoring in Actions
- Fix in AutoAssignAction that selected reviewer didn't get registered as new InProgressSubmissionUser

* 98433: IT fixes now that access rights are now moved to selected reviewers in AutoAssignAction

* [CST-7756] removed unused param

* 98462: Use discovery configurations in browse

* [DURACOM-113] add jfif extension on bitstream formats

* 98462: Refactor change and add admin tests

* 97538: The search rest method should be public

* 97538: Alter IT for public vocabulary search method

* 97183 Tests for findItemsWithEdit and countItemsWithEdit methods of ItemServiceImpl

* 97080: DSpace#8613 - Doc for the prefix solr field

* Implemented community feedbacks

* 97425: Fix issue with sessions null value

* 97061: type request param name change to avoid confusion with rest object type &
error codes endpoint changes + IT:
- missing/wrong query param accountRequestType => 400 bad request
- email not valid domain => 422 unprocessable entity

* [CST-7756] refactoring & added missing JavaDoc

* [CST-7756] removed unused service bean

* [CST-7756] minor refactoring  according to the rest contract

* PR DSpace#8619: Removed dependency spring-context-support, not needed in main

* [CST-7756] fixed failed tests

* [CST-7756] refactoring

* [CST-7756] added tests to valid subscription parameters

* [CST-7756] added validation logic of params

* [CST-7756] renamed some methods & class

* [CST-7756] minor fix

* [CST-7756] refactored CanSubscribeFeatureIT

* 97425: Implement feedback

* [CST-7756] minor update

* [CST-7756] added missing index field

* [CST-7756] added template for subscription content email

* [CST-7754] removed old code of supervision orders
added a new migration script sql
tested that supervisors can edit only workspace items

* [CST-7756] refactoring

* Remove statusFilter added to Solr browse indexes queries to solve an issue with the local administrators navigation

* [CST-7756] monor fix

* [CST-7756] added unit tests covering methods with business logic

* [CST-7756] sub-daily command and its referred class removed, as subscriptions are sent by subscription-send command

* [CST-7756] updated license header

* 97425: Fix minor issues

* [CST-7756] added instructions to migrate subscriptions from previous versions

* [CST-7756] after merge checkstyle fix

* [CST-7756] extended abstract test

* [CST-7756] updated script

* 99053: Add return_to_pool option to all ProcessingAction except SingleUserReviewAction

* Reinstate config accidentally deleted, added in 30f923a (DSpace#8064) - enables RSS/Atom feeds

* [CST-7756] removed subscriptions for items

* [CST-7756] minor fix

* [CST-7756] extended SubscribeServiceTest in order to use service instance with real (h2) database instead of mocks, so that tests actually store, query and remove subscriptions interacting with database

* [CST-7756] added missing JavaDoc

* [CST-7756] code refactoring

* [CST-7756] renamed test class in order to reflect its actual behavior

* [CST-7756] removed mail template used by previous script

* [CST-7756] code refactoring

* [CST-7756] removed Items section

* [CST-7756] added missing IT

* [CST-7754] updated javadoc

* [CST-7754] updated comment

* [CST-7754] withdrawn item should not allow supervision order

* [CST-7754] moved supervision orders test on workflow items to SupervisionOrderRestRepositoryIT, added test covering the scenario when an admin tries to set a supervision order on a withdrawn item, and when an admin sets a supervision order on a workflow item before sending it back to workspace: supervisor can edit the item only when it goes to workspace status.

* [TLC-380] Browse links and "by regex" links in item display

* [TLC-380] Fix checkstyle and duplicate code

* [TLC-380] Further checkstyle fixes

* [TLC-380] Further checkstyle fixes

* [TLC-380] Refactor browses endpoint for browse link usage

* [TLC-249] Improve 'findByFields' browse refactor

* [TLC-380] Fix browse resource byFields IT

* [TLC-380] Remove unused methods, add ITs

* DSpace#8629: Make sure temporary worfklow groups of reviewers get deleted

* DSpace#8629: PR feedback refactor

* [CST-7756] implemented community feedbacks

* [CST-7756] added test that proves what happens if an object is access restricted after you have a subscription to it.

* [CST-7756] renamed a method

* [CST-7756] updated subscriptions migration scripts

* [CST-7756] removed 'lastModified_dt' index field

* [CST-7756] minor refactoring

* [CST-7756] added email subject

* [CST-7756] added dissemination for generic DSpace Item

* [CST-7756] If no crosswalk is defined for the Item's entity type, default generic Item one is applied

* IT fix: ReviewManagers repository wide group, not collection workflow group

* Test IT without drop constraint

* [CST-7756] restores security check as was originaly

* [CST-7756] described beans

* DSpace#8628: Remove GET shortlivedtokens endpoint & related IT

* [TLC-249] Show Identifier Step, pre-register identifiers

* [TLC-249] Remove unused import in WorkspaceItemServiceImpl

* [TLC-249] Update section count test in SubmissionDefinitionsControllerIT

* [TLC-249] Refactor to support better filter usage, PENDING and MINTED status

* [TLC-249] Add and expose config for enabling register DOI

* [TLC-249] REST backend for identifier config

* [TLC-249] Better status return for new DOIs, write new integration tests

* [TLC-249] Integration tests, keep GET handling in controller

* [TLC-249] Move GET handling back to ItemIdentifierController

* [TLC-249] Checkstyle fixes

* [TLC-249] Licence header fixes

* [TLC-249] Further checkstyle fixes

* [TLC-249] Fix tests, Refactor things to use a LinkRestRepository for GET, Controller for POST

* [TLC-249] Further IT fix for identifiers

* [TLC-249] Licence header fix

* [TLC-249] Address review feedback

Controller updated to be less DOI-specific in its
registration implementation
item-status.register renamed to registerDOI
display types included in section data, for UI hints
comments / javadoc added
DOI status text sent instead of number in status data

As per tdonohue's revew on 2022-01-18

* [TLC-249] Lint fixes

* [TLC-249] Improve model for identifier step data

* [TLC-249] Update configuration identifiers.cfg

* [TLC-249] Remove unused subclass DataIdentifier

* [TLC-249] Update identifier section IT

* [TLC-249] Update integration tests for identifier controller

* [TLC-249] Fix submission controller IT

* [TLC-249] Update canRegisterDOIFeature to check for cfg enabled

* [TLC-249] Refactor identifiers create endpoint

* [TLC-249] Refactor, include controller 'find DSO' operation

* [TLC-249] Throw not implemented for findOne and findAll

* [TLC-249] Fixes and improvements as per review feedback

* [TLC-249] Checkstyle fix

* [TLC-249] return value  as id for IdentifierRest

* [TLC-249] Fix category type in IdentifierRest

* [TLC-249] Update integration tests for IdentifierRestRepository

* [TLC-249] Refactor TrueFilter to get instantiated as singleton

* [TLC-249] Construct canonical handle URL in identifier item link

* [TL-249] Remove example-doi_filter from config, add singleton attr to TrueFilter

* [TL-249] Add always_true_filter to test REST identifier-service.xml config

* [TL-249] Add identifiers.cfg and item-filters.xml config to test data

* [TL-249] Fix imports

* [TL-249] Revert accidental commit to RestResourceController

* [TL-249] Javadoc and other small fixes, DOI unit tests

* [TL-249] Javadoc and other small fixes

Including stripping $Revision$ from filter javadoc.

* [TL-249] Checkstyle fix

* 99200: Delete items after copies have been requested fix

* [CST-7756] added security check into 'subscription-send' script

* Alternate way to restart workflow in case of decline

* Fix for decline when the delete doesn't persist in context before wfi is created again from same item

* [CST-7754] supervising user can perform operations on Workspace item only if they have proper permissions

* [DURACOM-116] process sorted alphabetically

* [TLC-249] Test abandoning of a pending DOI and minting afterwards

* [TLC-249] Ensure property identifiers.item-status.register-doi is set

* Added missing commit in cleanup method

* Update BitstreamStorageServiceImpl.java

Amend commit log message

* [CST-7756] Non-Discoverable and withdrawn items must be excluded from the notification list

* [DURACOM-116] moved sorting to service

* removed the log info

* CST-8936 fix permission for bitstream generated by media-filter

* Updates to LICENSES_THIRD_PARTY for 7.5

* [maven-release-plugin] prepare release dspace-7.5

* Fixed some compile errors

* Fixed some compile errors

* Fixed some compile errors

* Fixed errors which causes tomcat starting errors

* Ignored failing test

* Fixed MetadataExportSearchIT - the dateIssued search filter was commented out.

* Added a new action which push test image for FE integration tests.

* Updated creating of the docker

* changed to proper dependency

* Updated cfg, fixed error because rest.properties.exposed was defined in two configuration files.

* fixed cfg for tests

* Copied fixes for the PRs: 277, 279, 281, 273, 284, 286, 296, 300, 308

* Push docker only to migrate-to-7.5 and not to dtq-dev-7.5

* Update migrate-docker.yml

Updated docker action name

* Updated IT test for Shibboleth auth

* Copied ClarinLicenseImportRestController from another branch

* Shibboleth autologin error solved - new header must be added into Allowed Headers in the Application.java

* Fixed checkstyle issues.

* Internal/fix integration tests 75 (#311)

* trying action with different ref

* fixed checkstyle

* updated config, fixed several integration tests

* removed old zip file

* assurance

* dspace.ui.url was changed to http://localhost:4000

* internal/fix-another-integration-tests (#312)

* Set Default charset to UTF-8 in Integration tests

* Fixed test in the ExternalHandleRestRepositoryIT - problem was with encoding

* Fixed WorkspaceItemRestRepositoryIT#patchRejectLicenseTest - the configuration property that disable LicenseValidation was set to false.

* Fixed ClarinDiscoveryRestControllerIT.java#discoverFacetsDateTestWithLabels
FacetEntryMatcher.dateIssuedFacet(false), was missing

* Fixed ClarinDiscoveryRestControllerIT.java#discoverSearchObjectsTestWithBasicQuery missing FacetEntryMatcher.dateIssuedFacet(false),

* Fixed ClarinDiscoveryRestControllerIT tests by updating the discovery.xml

* Fixed MetadataExportSearchIT.exportMetadataSearchFilterDate - commented out the test for Date Issued date search filter which was removed from the discovery.xml

* test  (#317)

* Initial commit

* Fixed SystemWideAlertRestRepositoryIT - wrong Date comparing, the fix was copied from the upstream

* Copied fix from the upstream

* Enabled distribution license validation.

* Update build.yml

Added -fae to integration tests

* Removed unnecessary check

* Revert to DEFAULT_AMOUNT_FORMATS=81

* Fixed lookupPubmed test

---------

Co-authored-by: milanmajchrak <milan.majchrak@dataquest.sk>
Co-authored-by: milanmajchrak <90026355+milanmajchrak@users.noreply.github.com>

* enable different endpoint to S3 bitstorage (#338)

* enable different endpoint to S3 bitstorage

* modified tests

---------

Co-authored-by: Marie Verdonck <maria.verdonck@atmire.com>
Co-authored-by: Giuseppe Digilio <giuseppe.digilio@4science.it>
Co-authored-by: corrado lombardi <corrado.lombardi@4science.com>
Co-authored-by: Mohamed Saber Eskander <mohamed.eskander@4science.com>
Co-authored-by: Koen Pauwels <koen.pauwels@atmire.com>
Co-authored-by: Jens Vannerum <jens.vannerum@atmire.com>
Co-authored-by: jensroets <jens.roets@atmire.com>
Co-authored-by: Yana De Pauw <yana@atmire.com>
Co-authored-by: Tim Donohue <tim.donohue@lyrasis.org>
Co-authored-by: jensvannerum <78496674+jensvannerum@users.noreply.github.com>
Co-authored-by: Mykhaylo <michele.boychuk@gmail.com>
Co-authored-by: Francesco Pio Scognamiglio <francescopio.scognamiglio@4science.it>
Co-authored-by: Nona Luypaert <nona.luypaert@atmire.com>
Co-authored-by: Toni Prieto <antonio.juan.prieto@upc.edu>
Co-authored-by: Alexandre Vryghem <alexandre@atmire.com>
Co-authored-by: Kim Shepherd <kim@shepherd.nz>
Co-authored-by: Pascal-Nicolas Becker <dspace@pascal-becker.de>
Co-authored-by: Agustina Martinez <am857@cam.ac.uk>
Co-authored-by: Raf Ponsaerts <raf.ponsaerts@atmire.com>
Co-authored-by: Andrea Bollini <andrea.bollini@4science.it>
Co-authored-by: MajoBerger <marian.berger@dataquest.sk>
Co-authored-by: MajoBerger <88670521+MajoBerger@users.noreply.github.com>

* Copied fix from 303

* Copied fix from 302, 319, 314

* Copied fix from 331

* Copied fix from 295

* Copied fix from 337, 339

* Removed ClarinLicenseImportRestController.java according to 273

* Eperson.hasPasswordSet was missing and one checkstyle violation as occurred.

* Docker image should be generated.

* Full BE customization for TUL (#329)

* define citace pro in the config file

* rename the config and add it into the default res.properties.exposed

* configure the gg analytics

* add email config propertyy for the contact page

* add the email for lr.help.email

* remove redundant email

---------

Co-authored-by: HuynhKhoa1601 <huynhnhatkhoa21@gmail.com>
Co-authored-by: HuynhKhoa1601 <89246737+HuynhKhoa1601@users.noreply.github.com>

* Temp file

* Migrate to 7.5 (#343)

* 97298: Self-register - test fixes

* [CST-7756] Rename type property to subscriptionType in the subscriptionType object

* [CST-7756] Fix checkstyle

* [CST-7756] fixed database scripts version number

* [CST-7754] otherworkspace discovery configuration shows only supervised workspace items, when a supervision order is deleted grants given to supervision groups on an item are revoked.

* [CST-7754] test supervision order is deleted if workspaceItem or group is deleted.

* 97183 Processing PR review feedback

* 97538: Unauthorized tests should now be anonymous

* 97538: Remove readability change

* 97538: Remove readability change in IT

* 97414 Advanced workflow actions: implemented feedback on SelectReviewerAction + WorkflowActionRestRepositoryIT

* 97414 Advanced workflow actions: fixed SelectReviewerAction NullPointerException

* [CST-7604] Configuration updated to highlight Orgunit and Person

* 97735: Add a accept range cors header

* Fix license issues

* 98345 Advanced workflow actions - Parse select reviewers step

* 98345 SelectReviewerAction, TaskRestRepositoriesIT and h2 migration

* 98433 Reject button mostly works - still triggers a 404 in console though

* 98434: Advanced workflow - refactor scoreReview workflow

* 98434: IT fix

* 98433: Refactoring SingleUserReviewAction & general refactoring in Actions
- Fix in AutoAssignAction that selected reviewer didn't get registered as new InProgressSubmissionUser

* 98433: IT fixes now that access rights are now moved to selected reviewers in AutoAssignAction

* [CST-7756] removed unused param

* 98462: Use discovery configurations in browse

* [DURACOM-113] add jfif extension on bitstream formats

* 98462: Refactor change and add admin tests

* 97538: The search rest method should be public

* 97538: Alter IT for public vocabulary search method

* 97183 Tests for findItemsWithEdit and countItemsWithEdit methods of ItemServiceImpl

* 97080: DSpace#8613 - Doc for the prefix solr field

* Implemented community feedbacks

* 97425: Fix issue with sessions null value

* 97061: type request param name change to avoid confusion with rest object type &
error codes endpoint changes + IT:
- missing/wrong query param accountRequestType => 400 bad request
- email not valid domain => 422 unprocessable entity

* [CST-7756] refactoring & added missing JavaDoc

* [CST-7756] removed unused service bean

* [CST-7756] minor refactoring  according to the rest contract

* PR DSpace#8619: Removed dependency spring-context-support, not needed in main

* [CST-7756] fixed failed tests

* [CST-7756] refactoring

* [CST-7756] added tests to valid subscription parameters

* [CST-7756] added validation logic of params

* [CST-7756] renamed some methods & class

* [CST-7756] minor fix

* [CST-7756] refactored CanSubscribeFeatureIT

* 97425: Implement feedback

* [CST-7756] minor update

* [CST-7756] added missing index field

* [CST-7756] added template for subscription content email

* [CST-7754] removed old code of supervision orders
added a new migration script sql
tested that supervisors can edit only workspace items

* [CST-7756] refactoring

* Remove statusFilter added to Solr browse indexes queries to solve an issue with the local administrators navigation

* [CST-7756] monor fix

* [CST-7756] added unit tests covering methods with business logic

* [CST-7756] sub-daily command and its referred class removed, as subscriptions are sent by subscription-send command

* [CST-7756] updated license header

* 97425: Fix minor issues

* [CST-7756] added instructions to migrate subscriptions from previous versions

* [CST-7756] after merge checkstyle fix

* [CST-7756] extended abstract test

* [CST-7756] updated script

* 99053: Add return_to_pool option to all ProcessingAction except SingleUserReviewAction

* Reinstate config accidentally deleted, added in 30f923a (DSpace#8064) - enables RSS/Atom feeds

* [CST-7756] removed subscriptions for items

* [CST-7756] minor fix

* [CST-7756] extended SubscribeServiceTest in order to use service instance with real (h2) database instead of mocks, so that tests actually store, query and remove subscriptions interacting with database

* [CST-7756] added missing JavaDoc

* [CST-7756] code refactoring

* [CST-7756] renamed test class in order to reflect its actual behavior

* [CST-7756] removed mail template used by previous script

* [CST-7756] code refactoring

* [CST-7756] removed Items section

* [CST-7756] added missing IT

* [CST-7754] updated javadoc

* [CST-7754] updated comment

* [CST-7754] withdrawn item should not allow supervision order

* [CST-7754] moved supervision orders test on workflow items to SupervisionOrderRestRepositoryIT, added test covering the scenario when an admin tries to set a supervision order on a withdrawn item, and when an admin sets a supervision order on a workflow item before sending it back to workspace: supervisor can edit the item only when it goes to workspace status.

* [TLC-380] Browse links and "by regex" links in item display

* [TLC-380] Fix checkstyle and duplicate code

* [TLC-380] Further checkstyle fixes

* [TLC-380] Further checkstyle fixes

* [TLC-380] Refactor browses endpoint for browse link usage

* [TLC-249] Improve 'findByFields' browse refactor

* [TLC-380] Fix browse resource byFields IT

* [TLC-380] Remove unused methods, add ITs

* DSpace#8629: Make sure temporary worfklow groups of reviewers get deleted

* DSpace#8629: PR feedback refactor

* [CST-7756] implemented community feedbacks

* [CST-7756] added test that proves what happens if an object is access restricted after you have a subscription to it.

* [CST-7756] renamed a method

* [CST-7756] updated subscriptions migration scripts

* [CST-7756] removed 'lastModified_dt' index field

* [CST-7756] minor refactoring

* [CST-7756] added email subject

* [CST-7756] added dissemination for generic DSpace Item

* [CST-7756] If no crosswalk is defined for the Item's entity type, default generic Item one is applied

* IT fix: ReviewManagers repository wide group, not collection workflow group

* Test IT without drop constraint

* [CST-7756] restores security check as was originaly

* [CST-7756] described beans

* DSpace#8628: Remove GET shortlivedtokens endpoint & related IT

* [TLC-249] Show Identifier Step, pre-register identifiers

* [TLC-249] Remove unused import in WorkspaceItemServiceImpl

* [TLC-249] Update section count test in SubmissionDefinitionsControllerIT

* [TLC-249] Refactor to support better filter usage, PENDING and MINTED status

* [TLC-249] Add and expose config for enabling register DOI

* [TLC-249] REST backend for identifier config

* [TLC-249] Better status return for new DOIs, write new integration tests

* [TLC-249] Integration tests, keep GET handling in controller

* [TLC-249] Move GET handling back to ItemIdentifierController

* [TLC-249] Checkstyle fixes

* [TLC-249] Licence header fixes

* [TLC-249] Further checkstyle fixes

* [TLC-249] Fix tests, Refactor things to use a LinkRestRepository for GET, Controller for POST

* [TLC-249] Further IT fix for identifiers

* [TLC-249] Licence header fix

* [TLC-249] Address review feedback

Controller updated to be less DOI-specific in its
registration implementation
item-status.register renamed to registerDOI
display types included in section data, for UI hints
comments / javadoc added
DOI status text sent instead of number in status data

As per tdonohue's revew on 2022-01-18

* [TLC-249] Lint fixes

* [TLC-249] Improve model for identifier step data

* [TLC-249] Update configuration identifiers.cfg

* [TLC-249] Remove unused subclass DataIdentifier

* [TLC-249] Update identifier section IT

* [TLC-249] Update integration tests for identifier controller

* [TLC-249] Fix submission controller IT

* [TLC-249] Update canRegisterDOIFeature to check for cfg enabled

* [TLC-249] Refactor identifiers create endpoint

* [TLC-249] Refactor, include controller 'find DSO' operation

* [TLC-249] Throw not implemented for findOne and findAll

* [TLC-249] Fixes and improvements as per review feedback

* [TLC-249] Checkstyle fix

* [TLC-249] return value  as id for IdentifierRest

* [TLC-249] Fix category type in IdentifierRest

* [TLC-249] Update integration tests for IdentifierRestRepository

* [TLC-249] Refactor TrueFilter to get instantiated as singleton

* [TLC-249] Construct canonical handle URL in identifier item link

* [TL-249] Remove example-doi_filter from config, add singleton attr to TrueFilter

* [TL-249] Add always_true_filter to test REST identifier-service.xml config

* [TL-249] Add identifiers.cfg and item-filters.xml config to test data

* [TL-249] Fix imports

* [TL-249] Revert accidental commit to RestResourceController

* [TL-249] Javadoc and other small fixes, DOI unit tests

* [TL-249] Javadoc and other small fixes

Including stripping $Revision$ from filter javadoc.

* [TL-249] Checkstyle fix

* 99200: Delete items after copies have been requested fix

* [CST-7756] added security check into 'subscription-send' script

* Alternate way to restart workflow in case of decline

* Fix for decline when the delete doesn't persist in context before wfi is created again from same item

* [CST-7754] supervising user can perform operations on Workspace item only if they have proper permissions

* [DURACOM-116] process sorted alphabetically

* [TLC-249] Test abandoning of a pending DOI and minting afterwards

* [TLC-249] Ensure property identifiers.item-status.register-doi is set

* Added missing commit in cleanup method

* Update BitstreamStorageServiceImpl.java

Amend commit log message

* [CST-7756] Non-Discoverable and withdrawn items must be excluded from the notification list

* [DURACOM-116] moved sorting to service

* removed the log info

* CST-8936 fix permission for bitstream generated by media-filter

* Updates to LICENSES_THIRD_PARTY for 7.5

* [maven-release-plugin] prepare release dspace-7.5

* Fixed some compile errors

* Fixed some compile errors

* Fixed some compile errors

* Fixed errors which causes tomcat starting errors

* Ignored failing test

* Fixed MetadataExportSearchIT - the dateIssued search filter was commented out.

* Added a new action which push test image for FE integration tests.

* Updated creating of the docker

* changed to proper dependency

* Updated cfg, fixed error because rest.properties.exposed was defined in two configuration files.

* fixed cfg for tests

* Copied fixes for the PRs: 277, 279, 281, 273, 284, 286, 296, 300, 308

* Push docker only to migrate-to-7.5 and not to dtq-dev-7.5

* Update migrate-docker.yml

Updated docker action name

* Updated IT test for Shibboleth auth

* Copied ClarinLicenseImportRestController from another branch

* Shibboleth autologin error solved - new header must be added into Allowed Headers in the Application.java

* Fixed checkstyle issues.

* Internal/fix integration tests 75 (#311)

* trying action with different ref

* fixed checkstyle

* updated config, fixed several integration tests

* removed old zip file

* assurance

* dspace.ui.url was changed to http://localhost:4000

* internal/fix-another-integration-tests (#312)

* Set Default charset to UTF-8 in Integration tests

* Fixed test in the ExternalHandleRestRepositoryIT - problem was with encoding

* Fixed WorkspaceItemRestRepositoryIT#patchRejectLicenseTest - the configuration property that disable LicenseValidation was set to false.

* Fixed ClarinDiscoveryRestControllerIT.java#discoverFacetsDateTestWithLabels
FacetEntryMatcher.dateIssuedFacet(false), was missing

* Fixed ClarinDiscoveryRestControllerIT.java#discoverSearchObjectsTestWithBasicQuery missing FacetEntryMatcher.dateIssuedFacet(false),

* Fixed ClarinDiscoveryRestControllerIT tests by updating the discovery.xml

* Fixed MetadataExportSearchIT.exportMetadataSearchFilterDate - commented out the test for Date Issued date search filter which was removed from the discovery.xml

* test  (#317)

* Initial commit

* Fixed SystemWideAlertRestRepositoryIT - wrong Date comparing, the fix was copied from the upstream

* Copied fix from the upstream

* Enabled distribution license validation.

* Update build.yml

Added -fae to integration tests

* Removed unnecessary check

* Revert to DEFAULT_AMOUNT_FORMATS=81

* Fixed lookupPubmed test

---------

Co-authored-by: milanmajchrak <milan.majchrak@dataquest.sk>
Co-authored-by: milanmajchrak <90026355+milanmajchrak@users.noreply.github.com>

* enable different endpoint to S3 bitstorage (#338)

* enable different endpoint to S3 bitstorage

* modified tests

---------

Co-authored-by: Marie Verdonck <maria.verdonck@atmire.com>
Co-authored-by: Giuseppe Digilio <giuseppe.digilio@4science.it>
Co-authored-by: corrado lombardi <corrado.lombardi@4science.com>
Co-authored-by: Mohamed Saber Eskander <mohamed.eskander@4science.com>
Co-authored-by: Koen Pauwels <koen.pauwels@atmire.com>
Co-authored-by: Jens Vannerum <jens.vannerum@atmire.com>
Co-authored-by: jensroets <jens.roets@atmire.com>
Co-authored-by: Yana De Pauw <yana@atmire.com>
Co-authored-by: Tim Donohue <tim.donohue@lyrasis.org>
Co-authored-by: jensvannerum <78496674+jensvannerum@users.noreply.github.com>
Co-authored-by: Mykhaylo <michele.boychuk@gmail.com>
Co-authored-by: Francesco Pio Scognamiglio <francescopio.scognamiglio@4science.it>
Co-authored-by: Nona Luypaert <nona.luypaert@atmire.com>
Co-authored-by: Toni Prieto <antonio.juan.prieto@upc.edu>
Co-authored-by: Alexandre Vryghem <alexandre@atmire.com>
Co-authored-by: Kim Shepherd <kim@shepherd.nz>
Co-authored-by: Pascal-Nicolas Becker <dspace@pascal-becker.de>
Co-authored-by: Agustina Martinez <am857@cam.ac.uk>
Co-authored-by: Raf Ponsaerts <raf.ponsaerts@atmire.com>
Co-authored-by: Andrea Bollini <andrea.bollini@4science.it>
Co-authored-by: MajoBerger <marian.berger@dataquest.sk>
Co-authored-by: MajoBerger <88670521+MajoBerger@users.noreply.github.com>

* Removed unused class

* Updated docker.yml

* Updated cfg (#348)

* Fixed from port 4000 to 8080 (#350)

* add redeploy to dev-5 -> curl call to deploy action

* add redeploy to dev-5 -> curl call to deploy action

* correct redeploy branch in github action

* Removed duplicate definition of the property (#353)

* internal/shibboleth-missing-one-error-page

* The netId is added to the user which is logged in via shibboleth.

* Fixed failing integration tests.

* Shib login filter returns the duplicate error

* Fixed checkstyle issues

* Added an email param into error response

* Try to fix IT

* Fixed some IT

* The user is not registered if he doesn't have the email

* Fixed IT - there must be unique handle

* migrated-7.5/oai-is-not-working (#355)

* Fixed wront `dspace.server.url` property value.

* Updated scripts

* Updated scripts

* Fixed IT - there must be unique handle

* Removed changes we don't want to have

* Added empty row

* Commented out TUL properties (#359)

* trigger docker images on correct branch

* internal/fix-discojuice-issues (#371)

* Added property to disable or allow the discojuice. Fixed cronjob interval for 2 hours. Changed Discojuice logs to DEBUG.

* Fixed discojuice interval

* In some cases the log shouldn't be in debug mode, but in the error

---------

Co-authored-by: Marie Verdonck <maria.verdonck@atmire.com>
Co-authored-by: Tim Donohue <tim.donohue@lyrasis.org>
Co-authored-by: jensvannerum <78496674+jensvannerum@users.noreply.github.com>
Co-authored-by: Mykhaylo <michele.boychuk@gmail.com>
Co-authored-by: Yana De Pauw <yana@atmire.com>
Co-authored-by: Francesco Pio Scognamiglio <francescopio.scognamiglio@4science.it>
Co-authored-by: Nona Luypaert <nona.luypaert@atmire.com>
Co-authored-by: Jens Vannerum <jens.vannerum@atmire.com>
Co-authored-by: Koen Pauwels <koen.pauwels@atmire.com>
Co-authored-by: Mohamed Saber Eskander <mohamed.eskander@4science.com>
Co-authored-by: Toni Prieto <antonio.juan.prieto@upc.edu>
Co-authored-by: corrado lombardi <corrado.lombardi@4science.com>
Co-authored-by: Alexandre Vryghem <alexandre@atmire.com>
Co-authored-by: Kim Shepherd <kim@shepherd.nz>
Co-authored-by: Pascal-Nicolas Becker <dspace@pascal-becker.de>
Co-authored-by: Agustina Martinez <am857@cam.ac.uk>
Co-authored-by: Raf Ponsaerts <raf.ponsaerts@atmire.com>
Co-authored-by: Andrea Bollini <andrea.bollini@4science.it>
Co-authored-by: MajoBerger <marian.berger@dataquest.sk>
Co-authored-by: MajoBerger <88670521+MajoBerger@users.noreply.github.com>
Co-authored-by: Giuseppe Digilio <giuseppe.digilio@4science.it>
Co-authored-by: jensroets <jens.roets@atmire.com>
Co-authored-by: HuynhKhoa1601 <huynhnhatkhoa21@gmail.com>
Co-authored-by: HuynhKhoa1601 <89246737+HuynhKhoa1601@users.noreply.github.com>
  • Loading branch information
25 people committed Jun 19, 2024
1 parent 147a657 commit ae542da
Show file tree
Hide file tree
Showing 227 changed files with 10,233 additions and 2,955 deletions.
17 changes: 7 additions & 10 deletions .github/disabled-workflows/issue_opened.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,22 @@ on:
issues:
types: [opened]

permissions: {}
jobs:
automation:
runs-on: ubuntu-latest
steps:
# Add the new issue to a project board, if it needs triage
# See https://github.com/marketplace/actions/create-project-card-action
- name: Add issue to project board
# See https://github.com/actions/add-to-project
- name: Add issue to triage board
# 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: technote-space/create-project-card-action@v1
uses: actions/add-to-project@v0.3.0
# Note, the authentication token below is an ORG level Secret.
# It must be created/recreated manually via a personal access token with "public_repo" and "admin:org" permissions
# 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)
with:
GITHUB_TOKEN: ${{ secrets.ORG_PROJECT_TOKEN }}
PROJECT: DSpace Backlog
COLUMN: Triage
CHECK_ORG_PROJECT: true
# Ignore errors.
continue-on-error: true
github-token: ${{ secrets.TRIAGE_PROJECT_TOKEN }}
project-url: https://github.com/orgs/DSpace/projects/24
27 changes: 19 additions & 8 deletions .github/disabled-workflows/label_merge_conflicts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,32 @@ name: Check for merge conflicts
# NOTE: This means merge conflicts are only checked for when a PR is merged to main.
on:
push:
branches:
- main
branches: [ main ]
# 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'
if: github.repository == 'dspace/dspace'
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
# See: https://github.com/mschilde/auto-label-merge-conflicts/
# See: https://github.com/prince-chrismc/label-merge-conflicts-action
- name: Auto-label PRs with merge conflicts
uses: mschilde/auto-label-merge-conflicts@v2.0
uses: prince-chrismc/label-merge-conflicts-action@v2
# 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 }}
# Ignore errors
continue-on-error: true
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!
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
name: Build

# Run this Build for pushes to our main and all PRs
on:
on:
push:
branches:
- dtq-dev
Expand Down Expand Up @@ -112,6 +112,6 @@ jobs:
# Retry action: https://github.com/marketplace/actions/retry-action
# Codecov action: https://github.com/codecov/codecov-action
- name: Upload coverage to Codecov.io
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
10 changes: 3 additions & 7 deletions .github/workflows/codescan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@
# because CodeQL requires a fresh build with all tests *disabled*.
name: "Code Scanning"

# Run this code scan for all pushes / PRs to main or maintenance branches. Also run once a week.
# Run this code scan for all pushes / PRs to main branch. Also run once a week.
on:
push:
branches:
- main
- 'dspace-**'
branches: [ main ]
pull_request:
branches:
- main
- 'dspace-**'
branches: [ main ]
# Don't run if PR is only updating static documentation
paths-ignore:
- '**/*.md'
Expand Down
52 changes: 25 additions & 27 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,30 @@ on:
permissions:
contents: read # to fetch code (actions/checkout)

# Define shared environment variables for all jobs below
env:
# Define tags to use for Docker images based on Git tags/branches (for docker/metadata-action)
# For a new commit on default branch (main), use the literal tag 'latest' on Docker image.
# For a new commit on other branches, use the branch name as the tag for Docker image.
# For a new tag, copy that tag name as the tag for Docker image.
IMAGE_TAGS: |
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
type=ref,event=branch,enable=${{ !endsWith(github.ref, github.event.repository.default_branch) }}
type=ref,event=tag
# Define default tag "flavor" for docker/metadata-action per
# https://github.com/docker/metadata-action#flavor-input
# We manage the 'latest' tag ourselves to the 'main' branch (see settings above)
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. NOTE: The ARM64 build takes MUCH
# longer (around 45mins or so) which is why we only run it when pushing a new Docker image.
PLATFORMS: linux/amd64${{ github.event_name != 'pull_request' && ', linux/arm64' || '' }}

jobs:
docker:
# Ensure this job never runs on forked repos. It's only executed for our repo
if: github.repository == 'dataquest-dev/dspace'
runs-on: ubuntu-latest
env:
# Define tags to use for Docker images based on Git tags/branches (for docker/metadata-action)
# For a new commit on default branch (main), use the literal tag 'dspace-7_x' on Docker image.
# For a new commit on other branches, use the branch name as the tag for Docker image.
# For a new tag, copy that tag name as the tag for Docker image.
IMAGE_TAGS: |
type=raw,value=dspace-7_x,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
type=ref,event=branch,enable=${{ !endsWith(github.ref, github.event.repository.default_branch) }}
type=ref,event=tag
# Define default tag "flavor" for docker/metadata-action per
# https://github.com/docker/metadata-action#flavor-input
# 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. NOTE: The ARM64 build takes MUCH
# longer (around 45mins or so) which is why we only run it when pushing a new Docker image.
PLATFORMS: linux/amd64${{ github.event_name != 'pull_request' && ', linux/arm64' || '' }}

steps:
# https://github.com/actions/checkout
Expand Down Expand Up @@ -78,7 +76,7 @@ jobs:
# https://github.com/docker/build-push-action
- name: Build and push 'dspace-dependencies' image
id: docker_build_deps
uses: docker/build-push-action@v4
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile.dependencies
Expand All @@ -104,7 +102,7 @@ jobs:

- name: Build and push 'dspace' image
id: docker_build
uses: docker/build-push-action@v4
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
Expand Down Expand Up @@ -133,7 +131,7 @@ jobs:

- name: Build and push 'dspace-test' image
id: docker_build_test
uses: docker/build-push-action@v4
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile.test
Expand All @@ -159,7 +157,7 @@ jobs:

- name: Build and push 'dspace-cli' image
id: docker_build_cli
uses: docker/build-push-action@v4
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile.cli
Expand All @@ -170,7 +168,7 @@ jobs:
# Use tags / labels provided by 'docker/metadata-action' above
tags: ${{ steps.meta_build_cli.outputs.tags }}
labels: ${{ steps.meta_build_cli.outputs.labels }}

- name: redeploy
if: 'false'
run: |
Expand All @@ -179,4 +177,4 @@ jobs:
--request POST \
https://api.github.com/repos/dataquest-dev/\
dspace-angular/actions/workflows/deploy.yml/dispatches \
--data "{\"ref\":\"refs/heads/dtq-dev\"}"
--data "{\"ref\":\"refs/heads/dtq-dev-7.5\"}"
169 changes: 169 additions & 0 deletions .github/workflows/migrate-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
# DSpace Docker image build for hub.docker.com
name: Migrate 7.5. Docker

# Run this Build for all pushes to dtq-dev branch
# Also run for PRs to ensure PR doesn't break Docker build process
on:
push:
branches:
- migrate-to-7.5
- dtq-dev-7.5
pull_request:
workflow_dispatch:

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
docker:
# Ensure this job never runs on forked repos. It's only executed for our repo
if: github.repository == 'dataquest-dev/dspace'
runs-on: ubuntu-latest
env:
# Define tags to use for Docker images based on Git tags/branches (for docker/metadata-action)
# For a new commit on default branch (main), use the literal tag 'dspace-7_x' on Docker image.
# For a new commit on other branches, use the branch name as the tag for Docker image.
# For a new tag, copy that tag name as the tag for Docker image.
IMAGE_TAGS: |
type=raw,value=migrate-to-7.5
# Define default tag "flavor" for docker/metadata-action per
# https://github.com/docker/metadata-action#flavor-input
# 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. NOTE: The ARM64 build takes MUCH
# longer (around 45mins or so) which is why we only run it when pushing a new Docker image.
PLATFORMS: linux/amd64${{ github.event_name != 'pull_request' && ', linux/arm64' || '' }}

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 }}

####################################################
# Build/Push the 'dataquest/dspace-dependencies' image
####################################################
# https://github.com/docker/metadata-action
# Get Metadata for docker_build_deps step below
- name: Sync metadata (tags, labels) from GitHub to Docker for 'dspace-dependencies' image
id: meta_build_deps
uses: docker/metadata-action@v4
with:
images: dataquest/dspace-dependencies
tags: ${{ env.IMAGE_TAGS }}
flavor: ${{ env.TAGS_FLAVOR }}

# https://github.com/docker/build-push-action
- name: Build and push 'dspace-dependencies' image
id: docker_build_deps
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile.dependencies
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_deps.outputs.tags }}
labels: ${{ steps.meta_build_deps.outputs.labels }}

#######################################
# Build/Push the 'dataquest/dspace' image
#######################################
# Get Metadata for docker_build step below
- name: Sync metadata (tags, labels) from GitHub to Docker for 'dspace' image
id: meta_build
uses: docker/metadata-action@v4
with:
images: dataquest/dspace
tags: ${{ env.IMAGE_TAGS }}
flavor: ${{ env.TAGS_FLAVOR }}

- name: Build and push 'dspace' image
id: docker_build
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
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.outputs.tags }}
labels: ${{ steps.meta_build.outputs.labels }}

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

- name: Build and push 'dspace-test' image
id: docker_build_test
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile.test
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_test.outputs.tags }}
labels: ${{ steps.meta_build_test.outputs.labels }}

###########################################
# Build/Push the 'dataquest/dspace-cli' image
###########################################
# Get Metadata for docker_build_test step below
- name: Sync metadata (tags, labels) from GitHub to Docker for 'dspace-cli' image
id: meta_build_cli
uses: docker/metadata-action@v4
with:
images: dataquest/dspace-cli
tags: ${{ env.IMAGE_TAGS }}
flavor: ${{ env.TAGS_FLAVOR }}

- name: Build and push 'dspace-cli' image
id: docker_build_cli
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile.cli
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_cli.outputs.tags }}
labels: ${{ steps.meta_build_cli.outputs.labels }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@ rebel.xml

## local config for build scripts
/scripts/envs/__basic.bat
/scripts/envs/__dspace.parent.basic.bat
/scripts/TEST_*
/scripts/tests.yaml
2 changes: 1 addition & 1 deletion Dockerfile.cli
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
ARG JDK_VERSION=11

# Step 1 - Run Maven Build
FROM dspace/dspace-dependencies:dspace-7_x as build
FROM dataquest/dspace-dependencies:migrate-to-7.5 as build
ARG TARGET_DIR=dspace-installer
WORKDIR /app
# The dspace-installer directory will be written to /install
Expand Down
Loading

0 comments on commit ae542da

Please sign in to comment.