Skip to content

Commit b1e8720

Browse files
KasinhouclaudeMatus Kasak
authored
JCU/fix(deploy): make jcu GA deploy support ERASE_DB and import (#1341)
* ci(deploy): add erase-db composite action so ERASE_DB works jcu deploy.yml already `uses: ./.github/actions/erase-db`, but the branch had no .github/actions/ dir, so ERASE_DB failed with "Can't find action.yml". Add the composite action (same as customer/vsb-tuo). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Removed -o flag * Added defaults --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Matus Kasak <matus.kasak@dataquest.sk>
1 parent 33b7f2d commit b1e8720

2 files changed

Lines changed: 34 additions & 1 deletion

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: 'Erase dspace db'
2+
description: 'CI/CD Erase db'
3+
4+
inputs:
5+
INSTANCE:
6+
description: 'port suffix'
7+
required: true
8+
default: '8593'
9+
type: string
10+
NAME:
11+
description: 'docker compose project name'
12+
required: true
13+
default: 'dspace-8593'
14+
type: string
15+
16+
runs:
17+
using: "composite"
18+
steps:
19+
20+
- name: stop and remove containers
21+
shell: bash
22+
env:
23+
INSTANCE: ${{ inputs.INSTANCE }}
24+
run: |
25+
docker stop dspacesolr$INSTANCE dspacedb$INSTANCE dspace$INSTANCE dspace-angular$INSTANCE || true
26+
docker rm dspacesolr$INSTANCE dspacedb$INSTANCE dspace$INSTANCE dspace-angular$INSTANCE || true
27+
28+
- name: remove volumes
29+
shell: bash
30+
env:
31+
NAME: ${{ inputs.NAME }}
32+
run: |
33+
docker volume rm $(docker volume ls --filter name="${NAME}_" -q) || true

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ jobs:
148148
run: |
149149
export DNAME=dspace${{inputs.INSTANCE}}
150150
echo "Creating DSpace administrator..."
151-
docker exec $DNAME /bin/bash -c "cd /dspace/bin && ./dspace create-administrator -e dspace.admin.dev@dataquest.sk -f admin -l user -p \"${ADMIN_PASSWORD}\" -c en -o dataquest"
151+
docker exec $DNAME /bin/bash -c "cd /dspace/bin && ./dspace create-administrator -e dspace.admin.dev@dataquest.sk -f admin -l user -p \"${ADMIN_PASSWORD}\" -c en"
152152
153153
- name: rebuild discovery index and run oai import
154154
run: |

0 commit comments

Comments
 (0)