forked from DSpace/dspace-angular
-
Notifications
You must be signed in to change notification settings - Fork 2
88 lines (79 loc) · 2.12 KB
/
Copy pathdeploy.yml
File metadata and controls
88 lines (79 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# DSpace Docker deploy on dataquest servers
name: Deploy DSpace
on:
workflow_call:
inputs:
INSTANCE:
required: false
type: string
default: '2'
IMPORT:
required: false
default: true
type: boolean
ERASE_DB:
required: false
default: false
type: boolean
workflow_dispatch:
inputs:
INSTANCE:
required: true
default: '2'
type: choice
options:
- '*'
- '2'
- '5'
- '8'
IMPORT:
required: true
default: true
type: boolean
ERASE_DB:
required: false
default: false
type: boolean
jobs:
deploy-2:
if: inputs.INSTANCE == '*' || inputs.INSTANCE == '2'
runs-on: dspace-dep-1
timeout-minutes: 10
env:
INSTANCE: '2'
ENVFILE: /opt/dspace-envs/.env.dspace.dev-5.uk
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/erase-db
if: inputs.ERASE_DB
with:
INSTANCE: ${{ env.INSTANCE }}
NAME: dspace-${{ env.INSTANCE }}
- name: deploy to dev-5
working-directory: build-scripts/run/
run: |
./start.sh dspace-$INSTANCE
playwright-after-deploy2:
needs: deploy-2
if: '!inputs.IMPORT'
uses: ./.github/workflows/playwright-tests.yml
secrets: inherit
rest-tests-after-deploy2:
runs-on: ubuntu-latest
needs: playwright-after-deploy2
timeout-minutes: 120
env:
GH_TOKEN: ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}
REPO: dataquest-dev/dspace-rest-test
WORKFLOW: run_unittests.yml
steps:
- name: run rest-tests
run: |
OUTPUT=$(gh workflow run "$WORKFLOW" \
--repo "$REPO" \
--ref master \
-f CUSTOMER="${{ github.ref_name }}" \
-f URL="http://dev-5.pc:82/server/api" 2>&1)
RUN_ID=$(echo "$OUTPUT" | grep -oE '/runs/[0-9]+' | grep -oE '[0-9]+')
echo "Watching run: https://github.com/$REPO/actions/runs/$RUN_ID"
gh run watch "$RUN_ID" --repo "$REPO" --interval 30 --exit-status