Skip to content

Commit de3b554

Browse files
committed
_toolbar.html.erb wasn't found for testing. Reordered tests to make sure file is built and it can find the path
1 parent 5d0b2ff commit de3b554

1 file changed

Lines changed: 18 additions & 5 deletions

File tree

.github/workflows/build.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,20 +137,33 @@ jobs:
137137
docker compose up --wait
138138
docker compose exec -u root app chown archivesspace:archivesspace artifacts
139139
140+
- name: Query the ASpace home page
141+
run: |
142+
curl --location --fail --retry 30 --retry-all-errors http://localhost:8080/
143+
140144
- name: Verify deployed resource toolbar matches upstream
141145
run: |
142146
set -euo pipefail
143-
csum="$(docker compose exec -T app sh -lc "diff /opt/app/data/tmp/jetty-0_0_0_0-8080-frontend_war-_-any-*/webapp/WEB-INF/app/views/resources/_toolbar.html.erb /opt/app/plugins/local/frontend/views/resources/_toolbar.html.erb | sha256sum | cut -f1 -d' '")"
147+
148+
csum="$(docker compose exec -T app sh -lc '
149+
upstream="$(find /opt/app/data/tmp -type f -path "*/webapp/WEB-INF/app/views/resources/_toolbar.html.erb" | head -n1)"
150+
if [ -z "$upstream" ]; then
151+
echo "__MISSING__"
152+
exit 0
153+
fi
154+
diff "$upstream" /opt/app/plugins/local/frontend/views/resources/_toolbar.html.erb | sha256sum | cut -f1 -d" "
155+
')"
156+
157+
if [[ "$csum" == "__MISSING__" ]]; then
158+
echo "Could not find extracted upstream _toolbar.html.erb under /opt/app/data/tmp"
159+
exit 1
160+
fi
144161
145162
if [[ "$csum" != "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" ]]; then
146163
echo "resources/toolbar.html.erb checksum differs. We override this file in plugins so probably needs to be compared and updated"
147164
exit 1
148165
fi
149166
150-
- name: Query the ASpace home page
151-
run: |
152-
curl --location --fail --retry 30 --retry-all-errors http://localhost:8080/
153-
154167
- name: Copy out artifacts
155168
if: ${{ always() }}
156169
run: |

0 commit comments

Comments
 (0)