Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/actions/erase-db/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ runs:
env:
NAME: ${{ inputs.NAME }}
run: |
# # condition below was found by accident and appears to be useless. Investigate later.
# be sure to have INSTANCE set
# if [[ "x${NAME}" != "dspace-" ]]; then
docker volume rm $(docker volume ls --filter name="${NAME}_" -q) || true
# fi;
echo "Removing volumes for $(docker volume ls --filter name="${NAME}_" -q)"
docker volume rm $(docker volume ls --filter name="${NAME}_" -q) || true
Comment on lines +31 to +32
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This echo line has unescaped double quotes inside a double-quoted string (within the $(...)), which will break shell parsing and cause the action step to fail. Use single quotes for the --filter argument or escape the inner quotes, e.g. build the volume list into a variable first and echo that variable.

Suggested change
echo "Removing volumes for $(docker volume ls --filter name="${NAME}_" -q)"
docker volume rm $(docker volume ls --filter name="${NAME}_" -q) || true
VOLUMES=$(docker volume ls --filter "name=${NAME}_" -q)
echo "Removing volumes for ${VOLUMES}"
docker volume rm ${VOLUMES} || true

Copilot uses AI. Check for mistakes.

7 changes: 4 additions & 3 deletions .github/actions/import-db/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ runs:

- uses: actions/checkout@v4
with:
repository: dataquest-dev/dspace-import
repository: dataquest-dev/dspace-import-clarin
ref: 'main'
submodules: 'recursive'
path: 'dspace-import'
path: 'dspace-import-clarin'


- name: stop and remove containers
id: import
shell: bash
working-directory: dspace-import/scripts
working-directory: dspace-import-clarin/scripts
env:
DATADIR: ${{ inputs.DATADIR }}
DB5PORT: 15432
Expand All @@ -62,6 +62,7 @@ runs:
echo Location of assetstore folder is empty. Not copping assetstore
else
docker cp ${{ inputs.ASSETSTORE }} dspace${{ inputs.INSTANCE }}:/dspace/
docker exec -u root dspace${{ inputs.INSTANCE }} chown -R dspace:dspace /dspace/assetstore
fi
echo "====="
cd ../
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ jobs:
NODE_OPTIONS: '--max-old-space-size=4096'
# Project name to use when running "docker compose" prior to e2e tests
COMPOSE_PROJECT_NAME: 'ci'
# Docker Registry to use for Docker compose scripts below.
# We use GitHub's Container Registry to avoid aggressive rate limits at DockerHub.
DOCKER_REGISTRY: ghcr.io
strategy:
# Create a matrix of Node versions to test against (in parallel)
matrix:
Expand Down Expand Up @@ -125,14 +122,6 @@ jobs:
path: 'coverage/dspace-angular/lcov.info'
retention-days: 14

# Login to our Docker registry, so that we can access private Docker images using "docker compose" below.
- name: Login to ${{ env.DOCKER_REGISTRY }}
uses: docker/login-action@v3
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

# Using "docker compose" start backend using CI configuration
# and load assetstore from a cached copy
- name: Start DSpace REST Backend via Docker (for e2e tests)
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,48 @@ jobs:
/bin/bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://dev-5.pc:8$INSTANCE/repository/server/api)" != "200" ]]; do sleep 5; done'


import-5:
runs-on: dspace-dep-1
if: inputs.IMPORT
needs: deploy-5
env:
INSTANCE: '5'
ENVFILE: /opt/dspace-envs/.env.dspace.dev-5
steps:
- uses: ./.github/actions/import-db
with:
INSTANCE: ${{ env.INSTANCE }}
DATADIR: /opt/dspace-data/clarin-dspace-oxford/
ASSETSTORE: /opt/dspace-data/clarin-dspace-oxford/assetstore/
LOGDIR: /log/
ADMIN_PASSWORD: ${{ secrets.DSPACE_ADMIN_PASSWORD }}

- name: dspace basic 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 reindex solr:"
docker exec $DNAME /bin/bash -c "cd /dspace/bin && ./dspace index-discovery -b"

echo "dspace reindex OAI-PMH:"
docker exec $DNAME /bin/bash -c "cd /dspace/bin && ./dspace oai import -c"

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

- name: dspace healthcheck
run: |
export DNAME=dspace$INSTANCE
echo "dspace healthcheck:"
docker exec $DNAME /bin/bash -c "cd /dspace/bin && ./dspace healthcheck -v"

import-8:
runs-on: dspace-dep-1
if: inputs.IMPORT
Expand Down
1 change: 1 addition & 0 deletions build-scripts/run/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ popd
echo "====="
echo "Copy assetstore"
docker cp assetstore dspace${INSTANCE}:/dspace/
docker exec -u root dspace${INSTANCE} chown -R dspace:dspace /dspace/assetstore

echo "====="
echo "Finished start.sh"
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export class ClarinLicenseAgreementPageComponent implements OnInit {
/**
* The path to the Seznam dataset license content.
*/
LICENSE_PATH_SEZNAM_CZ = 'szn-dataset-license.html';
LICENSE_PATH_SEZNAM_CZ = 'szn-dataset-licence.html';

/**
* The content of the Seznam dataset license. Fetch from the static file.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,33 @@
<h6><i class="fa fa-paperclip">&nbsp;</i>{{'item.page.files.head' | translate}}</h6>
<div class="pb-3">
<span class="pr-1">
<a class="btn btn-download" (click)="setCommandline()" style="text-decoration: none"
<a class="btn btn-download" (click)="openCommandModal(commandModal)" style="text-decoration: none"
*ngIf="canShowCurlDownload">
<i class="fa fa-download fa-3x" style="display: block">&nbsp;</i>
{{'item.page.download.button.command.line' | translate}}
</a>
</span>
<div id="command-div" *ngIf="isCommandLineVisible">
<pre class="command-pre">{{ command }}</pre>
</div>

<ng-template #commandModal let-modal>
<div class="modal-header">
<h5 class="modal-title" id="commandModalTitle">{{'item.page.download.button.command.line' | translate}}</h5>
<button type="button" class="close" aria-label="Close" (click)="modal.dismiss()">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<pre class="command-pre mb-0">{{ command }}</pre>
</div>
<div class="modal-footer">
<button class="btn btn-outline-secondary" (click)="copyCommand()">
<i class="fa" [ngClass]="commandCopied ? 'fa-check' : 'fa-clipboard'"></i>
{{ commandCopied ? ('item.page.download.command.copied' | translate) : ('item.page.download.command.copy' | translate) }}
</button>
<button class="btn btn-secondary" (click)="modal.close()">
{{'item.page.download.command.close' | translate}}
</button>
</div>
</ng-template>
<span>
<a *ngIf="
(totalFileSizes | async) > (downloadZipMinFileSize | async) &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,44 +17,17 @@ The styling file for the `clarin-files-section.component`

.command-pre {
display: block;
padding: 9.5px;
margin: 0 0 10px;
padding: 12px 16px;
margin: 0;
font-size: 13px;
line-height: 1.428571429;
line-height: 1.5;
white-space: pre-wrap;
word-break: break-all;
word-wrap: break-word;
background-color: #d9edf7;
color: #3a87ad;
border: 1px solid #ccc;
border-radius: 4px;
}

#command-div .repo-copy-btn {
opacity: 0;
-webkit-transition: opacity 0.3s ease-in-out;
-o-transition: opacity 0.3s ease-in-out;
transition: opacity 0.3s ease-in-out;
}

#command-div:hover .repo-copy-btn, #command-div .repo-copy-btn:focus {
opacity: 1;
}

.repo-copy-btn {
width: 20px;
height: 20px;
position: relative;
display: inline-block;
padding: 0 !important;
}

.repo-copy-btn:before {
content: " ";
background-size: 13px 15px;
background-repeat: no-repeat;
background-color: red;
display: inline-block;
width: 13px;
height: 15px;
padding: 0 !important;
max-height: 60vh;
overflow-y: auto;
}
Loading