@@ -78,35 +78,38 @@ jobs:
7878 ADMIN_PASSWORD : ${{ secrets.DSPACE_ADMIN_PASSWORD }}
7979 USER_PASSWORD : ${{ secrets.DSPACE_USER_PASSWORD }}
8080 steps :
81- - uses : actions/checkout@v4
82-
83- - uses : ./.github/actions/erase-db
84- if : inputs.ERASE_DB
85- with :
86- INSTANCE : ${{ env.INSTANCE }}
87- NAME : dspace-${{ env.INSTANCE }}
88-
89- - name : deploy dspace-import on dev-5
90- working-directory : build-scripts/run/
91- run : |
92- ./start.sh dspace-$INSTANCE
93- cd ../..
94- # this is not necessary, since extra.yml doesn't contain any new images that weren't pulled within script above
95- # docker compose --env-file $ENVFILE -p dspace-$INSTANCE -f docker/docker-compose.yml -f docker/docker-compose-rest.yml -f /opt/dspace-envs/8/extra.yml pull
96- docker compose --env-file $ENVFILE -p dspace-$INSTANCE -f docker/docker-compose.yml -f docker/docker-compose-rest.yml -f /opt/dspace-envs/8/extra.yml up -d --no-build
97-
98- # this must be here and not in the start.sh, because extra.yml replaces dspace container
99- ## !!!!! please remove this section if you do not want handle server !!!!!!!
100- echo "====="
101- echo "installing handle server"
102- docker exec dspace${INSTANCE} /dspace/bin/make-handle-config
103- echo "made handle config:"
104- docker exec dspace${INSTANCE} cat /dspace/handle-server/config.dct
105- docker exec dspace${INSTANCE} /dspace/bin/start-handle-server
106- echo "started handle server"
107- # this seems to be the easiest solution for now
108- docker restart dockerized-nginx-with-shibboleth-nginx-1
109- /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'
81+ - name : Skip deployment (testing rest-tests only)
82+ run : echo "Skipping deployment steps to test rest-tests workflow call"
83+
84+ # - uses: actions/checkout@v4
85+
86+ # - uses: ./.github/actions/erase-db
87+ # if: inputs.ERASE_DB
88+ # with:
89+ # INSTANCE: ${{ env.INSTANCE }}
90+ # NAME: dspace-${{ env.INSTANCE }}
91+
92+ # - name: deploy dspace-import on dev-5
93+ # working-directory: build-scripts/run/
94+ # run: |
95+ # ./start.sh dspace-$INSTANCE
96+ # cd ../..
97+ # # this is not necessary, since extra.yml doesn't contain any new images that weren't pulled within script above
98+ # # docker compose --env-file $ENVFILE -p dspace-$INSTANCE -f docker/docker-compose.yml -f docker/docker-compose-rest.yml -f /opt/dspace-envs/8/extra.yml pull
99+ # docker compose --env-file $ENVFILE -p dspace-$INSTANCE -f docker/docker-compose.yml -f docker/docker-compose-rest.yml -f /opt/dspace-envs/8/extra.yml up -d --no-build
100+
101+ # # this must be here and not in the start.sh, because extra.yml replaces dspace container
102+ # ## !!!!! please remove this section if you do not want handle server !!!!!!!
103+ # echo "====="
104+ # echo "installing handle server"
105+ # docker exec dspace${INSTANCE} /dspace/bin/make-handle-config
106+ # echo "made handle config:"
107+ # docker exec dspace${INSTANCE} cat /dspace/handle-server/config.dct
108+ # docker exec dspace${INSTANCE} /dspace/bin/start-handle-server
109+ # echo "started handle server"
110+ # # this seems to be the easiest solution for now
111+ # docker restart dockerized-nginx-with-shibboleth-nginx-1
112+ # /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'
110113
111114
112115 import-8 :
@@ -151,50 +154,13 @@ jobs:
151154 echo "dspace healthcheck:"
152155 docker exec $DNAME /bin/bash -c "cd /dspace/bin && ./dspace healthcheck -v"
153156
154- # playwright-after-deploy8:
155- # needs: deploy-8
156- # if: '!inputs.IMPORT'
157- # uses: ./.github/workflows/playwright-tests.yml
158- # secrets: inherit
159-
160157 rest-tests-after-deploy8 :
161- # runs-on: ubuntu-latest
162- # needs: playwright-after-deploy8
163158 needs : deploy-8
164- # timeout-minutes: 120
165- uses : dataquest-dev/dspace-rest-test/.github/workflows/run_unittests.yml@main
159+ uses : dataquest-dev/dspace-rest-test/.github/workflows/run_unittests.yml@change-running-tests
166160 with :
167161 INSTANCE : ' 8'
168162 CUSTOMER : ${{ github.ref_name }}
169163 secrets : inherit
170- # steps:
171- # - name: run rest-tests
172- # run: |
173- # curl -H "Accept: application/vnd.github.everest-preview+json" \
174- # -H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" \
175- # --request POST \
176- # https://api.github.com/repos/dataquest-dev/\
177- # dspace-rest-test/actions/workflows/run_unittests.yml/dispatches \
178- # --data "{\"ref\":\"refs/heads/master\"}" 2> /dev/null
179-
180- # # wait for it to start
181- # sleep 30s
182-
183- # # get result of last job
184- # RES=$(curl -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" https://api.github.com/repos/dataquest-dev/dspace-rest-test/actions/workflows/run_unittests.yml/runs?per_page=1 2> /dev/null | jq .workflow_runs[0].conclusion)
185-
186- # # while job did not finish, sleep
187- # while [[ $RES == 'null' ]]; do
188- # sleep 10s
189- # RES=$(curl -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" https://api.github.com/repos/dataquest-dev/dspace-rest-test/actions/workflows/run_unittests.yml/runs?per_page=1 2> /dev/null | jq .workflow_runs[0].conclusion)
190- # done;
191-
192- # echo $RES
193- # # if last result is not success, return -1 and fail
194- # if [[ $RES != \"success\" ]]; then
195- # echo "rest-tests have failed! check appropriate action run in the dspace-rest-test repository"
196- # exit 1
197- # fi;
198164
199165
200166 playwright-after-import8 :
0 commit comments