Commit ca015736 authored by Mathias Goebel's avatar Mathias Goebel 🎠
Browse files

feat: receive update from upsteam

parent 6aa3f96b
stages:
- update-projects
- build
- deploy
# autoupdate the viewer on upstream changes
# triggered by the upstream pipeline!
update-viewer:
image:
stage: update-projects
rules:
- if: '$UPDATE == "true"'
- if: '$UPSTREAM_COMMIT_SHA'
script:
- 'curl --request PUT --header "PRIVATE-TOKEN: $PROJECT_ACCESS_TOKEN" "$CI_API_V4_URL/projects/$CI_PROJECT_ID/repository/submodules/Qviewer" --data "branch=develop&commit_sha=$UPSTREAM_COMMIT_SHA&commit_message=update: Qviewer"'
# build the frontend viewer with a custom index.html
build:
image: docker.gitlab.gwdg.de/subugoe/emo/qviewer/node:latest
......@@ -57,13 +69,3 @@ release:
paths:
- gitlab-release.json
.update:
image: docker.gitlab.gwdg.de/fontane-notizbuecher/build:latest
stage: update
variables:
VIEWER_PROJECT_ID: 6474
script:
- url=$(curl "$CI_API_V4_URL/projects/$VIEWER_PROJECT_ID/releases" | jq '.[0].assets.links[0].url')
- curl --output viewer.zip $url
- unzip viewer.zip
- mv dist/* . && rm dist/
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment