diff --git a/services/web/Jenkinsfile b/services/web/Jenkinsfile index 9be0479892..960c800910 100644 --- a/services/web/Jenkinsfile +++ b/services/web/Jenkinsfile @@ -32,11 +32,9 @@ pipeline { } } - stage('Install modules') { + stage('Copy external pages') { steps { - sshagent (credentials: ['GIT_DEPLOY_KEY']) { - sh 'bin/install_modules' - } + sh 'bin/copy_external_pages' } } diff --git a/services/web/bin/copy_external_pages b/services/web/bin/copy_external_pages new file mode 100755 index 0000000000..c025379e97 --- /dev/null +++ b/services/web/bin/copy_external_pages @@ -0,0 +1,6 @@ +#!/bin/bash +set -e + +# Branding +mv app/views/external/robots.txt public/robots.txt +mv app/views/external/googlebdb0f8f7f4a17241.html public/googlebdb0f8f7f4a17241.html diff --git a/services/web/bin/install_modules b/services/web/bin/install_modules deleted file mode 100755 index 192b8b376f..0000000000 --- a/services/web/bin/install_modules +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -set -e - -# Branding -rm -rf public/brand app/views/external -git clone -b master git@github.com:sharelatex/brand-sharelatex public/brand -git clone -b master git@github.com:sharelatex/external-pages-sharelatex app/views/external -mv app/views/external/robots.txt public/robots.txt -mv app/views/external/googlebdb0f8f7f4a17241.html public/googlebdb0f8f7f4a17241.html - -# Web Modules -rm -rf modules -BRANCH_NAME=${BRANCH_NAME:="$(git rev-parse --abbrev-ref HEAD)-nope"} -function install_module { - echo "Cloning $1 from $BRANCH_NAME branch" - git clone -b $BRANCH_NAME $1 $2 || { - echo "Cloning from $BRANCH_NAME failed - it likely doesn't exist. Using master"; - git clone -b master $1 $2; - } -} -install_module git@github.com:sharelatex/web-sharelatex-modules modules -install_module git@github.com:sharelatex/admin-panel modules/admin-panel -install_module git@github.com:sharelatex/tpr-webmodule.git modules/tpr-webmodule -install_module git@github.com:sharelatex/templates-webmodule.git modules/templates -install_module git@github.com:sharelatex/track-changes-web-module.git modules/track-changes -install_module git@github.com:sharelatex/overleaf-integration-web-module.git modules/overleaf-integration -install_module git@github.com:sharelatex/overleaf-account-merge.git modules/overleaf-account-merge -install_module git@github.com:sharelatex/references-search.git modules/references-search -install_module git@github.com:sharelatex/learn-wiki-web-module.git modules/learn-wiki -install_module git@github.com:sharelatex/metrics-web-module.git modules/metrics diff --git a/services/web/copybara/copy.bara.sky b/services/web/copybara/copy.bara.sky index 7d3bbe21e4..e946c83cbe 100644 --- a/services/web/copybara/copy.bara.sky +++ b/services/web/copybara/copy.bara.sky @@ -10,7 +10,7 @@ core.workflow( push = "master" ), # Exclude the modules directory - origin_files = glob(["**"], exclude = ["modules/**"]), + origin_files = glob(["**"], exclude = ["modules/**", "app/views/external/**", "public/brand/**"]), mode="ITERATIVE", migrate_noop_changes=True, authoring = authoring.pass_thru("Copybot ")