Merge branch 'develop/nginx_proxy' into 'master'

Fix the rewrite of the old URL, and allow the build to be triggered correctly by the CI.

See merge request cara/cara!11
This commit is contained in:
Philip James Elson 2020-11-03 12:26:01 +00:00
commit f2644a720d
2 changed files with 4 additions and 1 deletions

View file

@ -25,6 +25,7 @@ trigger_build_on_openshift:
- if: '$OPENSHIFT_BUILD_WEBHOOK_SECRET'
script:
- curl -X POST -k https://openshift.cern.ch:443/apis/build.openshift.io/v1/namespaces/cara/buildconfigs/cara-app/webhooks/${OPENSHIFT_BUILD_WEBHOOK_SECRET}/generic
- curl -X POST -k https://openshift.cern.ch:443/apis/build.openshift.io/v1/namespaces/cara/buildconfigs/cara-router/webhooks/${OPENSHIFT_BUILD_WEBHOOK_SECRET}/generic
deploy_to_test:
@ -36,4 +37,5 @@ deploy_to_test:
when: manual
allow_failure: true
script:
- curl -X POST -k https://openshift-dev.cern.ch:443/apis/build.openshift.io/v1/namespaces/test-cara/buildconfigs/test-cara/webhooks/${OPENSHIFT_TEST_BUILD_WEBHOOK_SECRET}/generic
- curl -X POST -k https://openshift-dev.cern.ch:443/apis/build.openshift.io/v1/namespaces/test-cara/buildconfigs/cara-app/webhooks/${OPENSHIFT_TEST_BUILD_WEBHOOK_SECRET}/generic
- curl -X POST -k https://openshift-dev.cern.ch:443/apis/build.openshift.io/v1/namespaces/test-cara/buildconfigs/cara-router/webhooks/${OPENSHIFT_TEST_BUILD_WEBHOOK_SECRET}/generic

View file

@ -68,6 +68,7 @@ http {
# Before implementing the nginx router we could access /voila/render/cara.ipynb.
# Redirect this (and all other) URLs to the new scheme.
absolute_redirect off;
rewrite ^/voila/(.*)$ /voila-server/voila/$1 redirect;
}
}