Skip to content

Commit

Permalink
Use ISLE fabricator deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
joecorall committed Dec 3, 2024
1 parent 30bacb7 commit a2d40f0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 38 deletions.
18 changes: 2 additions & 16 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
# 3d max execution time
timeout-minutes: 4320
env:
SHARED_SECRET: abc123
SHARED_SECRET: ${{ secrets.FABRICATOR_SHARED_SECRET }}
FABRICATOR_DATA_MOUNT: /mnt/islandora_staging
runs-on: self-hosted
permissions:
Expand All @@ -35,16 +35,6 @@ jobs:
URL: ${{ github.event.inputs.url }}
RANGE: ${{ github.event.inputs.range }}

- uses: actions/setup-go@v5
with:
go-version: '>=1.23.3'

- name: Install dependencies
run: go get .

- name: Build
run: go build -o fabricator

- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v1'
Expand Down Expand Up @@ -82,7 +72,7 @@ jobs:
Google Sheet: __URL__
Workbench execution log: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${{ steps.get-job-id.outputs.job_id }}#step:13:1
Workbench execution log: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${{ steps.get-job-id.outputs.job_id }}#step:10:1
URL: ${{ github.event.inputs.url }}

- name: transform google sheet
Expand Down Expand Up @@ -124,7 +114,3 @@ jobs:
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
MESSAGE: "🚨 Workbench job failed!"

- name: cleanup
if: ${{ always() }}
run: ./scripts/cleanup.sh
9 changes: 0 additions & 9 deletions scripts/cleanup.sh

This file was deleted.

15 changes: 2 additions & 13 deletions scripts/transform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,14 @@ else
exit 1
fi

nohup ./fabricator &
echo $! > fabricator_pid.txt
while true; do
STATUS=$(curl -s -w '%{http_code}' -o /dev/null http://localhost:8080/healthcheck)
if [ "${STATUS}" -eq 200 ]; then
break
fi
echo "Waiting for fabricator to come online"
sleep 1
done

# make sure the sheet passes the check my work
STATUS=$(curl -v \
-w '%{http_code}' \
-H "X-Secret: $SHARED_SECRET" \
-o check.json \
-XPOST \
--upload-file csv.json \
http://localhost:8080/workbench/check)
https://islandora-stage.lib.lehigh.edu/workbench/check)
if [ "${STATUS}" != 200 ]; then
echo "Check my work failed"
exit 1
Expand All @@ -51,7 +40,7 @@ STATUS=$(curl -v \
-XPOST \
-o target.zip \
--upload-file source.csv \
http://localhost:8080/workbench/transform)
https://islandora-stage.lib.lehigh.edu/workbench/transform)
if [ "${STATUS}" -gt 299 ] || [ "${STATUS}" -lt 200 ]; then
echo "CSV transform failed"
exit 1
Expand Down

0 comments on commit a2d40f0

Please sign in to comment.