From 8ddef2584b7cd06770654a718e8546275ac41845 Mon Sep 17 00:00:00 2001 From: Phil Elson Date: Tue, 3 Nov 2020 13:10:38 +0100 Subject: [PATCH] Fix the rewrite of the old URL, and allow the build to be triggered correctly by the CI. --- .gitlab-ci.yml | 4 +++- app-config/nginx/nginx.conf | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7f4f0bfb..b5c59b9a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/app-config/nginx/nginx.conf b/app-config/nginx/nginx.conf index b32341d5..d799ebf3 100644 --- a/app-config/nginx/nginx.conf +++ b/app-config/nginx/nginx.conf @@ -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; } } \ No newline at end of file