forked from DSpace/dspace-angular
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[devOps] create new dspace instance with imported data
- Loading branch information
jm
committed
Nov 7, 2023
1 parent
de76edd
commit 40fdef0
Showing
2 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Import DSpace v5 | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy: | ||
runs-on: dspace-dep-1 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: dataquest-dev/dspace-python-api | ||
path: dspace-python-api | ||
ref: 'refactor_jm' | ||
|
||
- name: deploy dspace-import on dev-5 | ||
id: import | ||
working-directory: dspace-python-api/scripts | ||
run: | | ||
docker stop dspace-import-db5 || true | ||
DB5PORT=15432 | ||
cid=$(docker run -d --name dspace-import-db5 -v $pwd:/dq/scripts -v %cd%/../input/dump:/dq/dump \ | ||
-p 127.0.0.1:$DB5PORT:5432 -e POSTGRES_DB=empty -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=dspace postgres /bin/bash -c "cd /dq/scripts && ./init.dspacedb5.sh") | ||
echo "cid=$cid" >> $GITHUB_OUTPUT | ||
sleep 10 | ||
cd ../src | ||
# cleanup resume | ||
rm __temp/resume/*.json || true | ||
echo python repo_import.py --resume=false | ||
- name: cleanup | ||
run: | | ||
docker stop ${{ steps.import.outputs.cid }} || true | ||
if: ${{ always() }} | ||
|