From d2c7fc4a09290847f674f6efc8d69ad32ad99391 Mon Sep 17 00:00:00 2001 From: Carlo Minotti <50220438+minottic@users.noreply.github.com> Date: Fri, 9 Dec 2022 15:01:18 +0100 Subject: [PATCH] Deploy newest lp and add psi config * Deploy newest lp and add favicon.ico * Remove newlines from block * Remove ess google site verification * Add google verify as a secret Co-authored-by: Carlo Minotti --- .github/workflows/reusable.build-deploy.yml | 2 +- .github/workflows/scicat-landing-page-server.yml | 5 ++++- helm_configs/landing-page-server/favicon.ico | Bin 0 -> 2686 bytes .../production/environment.ts | 14 ++++++++++++++ .../landing-page-server/production/values.yaml | 12 ++++++++++++ helm_configs/landing-page-server/values.yaml | 9 +++++++++ landing-page-server | 2 +- 7 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 helm_configs/landing-page-server/favicon.ico create mode 100644 helm_configs/landing-page-server/production/environment.ts create mode 100644 helm_configs/landing-page-server/production/values.yaml diff --git a/.github/workflows/reusable.build-deploy.yml b/.github/workflows/reusable.build-deploy.yml index 0072c04..2359209 100644 --- a/.github/workflows/reusable.build-deploy.yml +++ b/.github/workflows/reusable.build-deploy.yml @@ -86,7 +86,7 @@ jobs: run: | for f in ${{ inputs.docker_build_files }}; do - cp -r ${f%%:*} ${f#*:}; + cp ${f%%:*} ${f#*:}; done - name: Log in to the Container registry diff --git a/.github/workflows/scicat-landing-page-server.yml b/.github/workflows/scicat-landing-page-server.yml index 62b1980..310aa74 100644 --- a/.github/workflows/scicat-landing-page-server.yml +++ b/.github/workflows/scicat-landing-page-server.yml @@ -44,7 +44,9 @@ jobs: - set_env uses: ./.github/workflows/reusable.build-deploy.yml with: - docker_build_files: helm_configs/landing-page-server/${{ needs.set_env.outputs.environment }}/environment.ts:landing-page-server/src/environments/environment.essprod.ts + docker_build_files: >- + helm_configs/landing-page-server/${{ needs.set_env.outputs.environment }}/environment.ts:landing-page-server/src/environments/environment.essprod.ts + helm_configs/landing-page-server/favicon.ico:landing-page-server/src/favicon.ico context: landing-page-server/. image_name: ${{ github.repository }}/landing-page-server release_name: landing-page-server @@ -55,3 +57,4 @@ jobs: submodule: landing-page-server secrets: KUBECONFIG: ${{ secrets.KUBECONFIG }} + JSON_SECRETS: ${{ toJSON(secrets) }} diff --git a/helm_configs/landing-page-server/favicon.ico b/helm_configs/landing-page-server/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..5a41401a849fe13d34ccc40a07eae3a0f0810e04 GIT binary patch literal 2686 zcmeHJ%WcF!2qjWZd&*o=0H@q(zz4T5J*15E;7_^sz6YL(qLo7dHoLz*Me3 zlHgXyT9Hr?N7JS4@MpMIEA^;aqXBBTit)J#UTkD=2zLuIFil4*8LlYq`G(BOTvmsR zCRK*B$?C)#X^bOUXDayrkE3{WY+BkA&;wIJohrj4-Q%ekUXFZsX1G)KpyM29M}5!F z@!;>H!Yo2OHTpm1bB1GBB#v{$U;7MV^ynnRS*bMA*m;uH&o7vq;+(VzpMb=X%wb^z zf4@H&&imyz#;LlchOOP-3`b;tYuf03ceaz^jA32AfE4EtX4e_s18?JE6L|R`xE+_8 Fz!PCSSVsT= literal 0 HcmV?d00001 diff --git a/helm_configs/landing-page-server/production/environment.ts b/helm_configs/landing-page-server/production/environment.ts new file mode 100644 index 0000000..52f5a0a --- /dev/null +++ b/helm_configs/landing-page-server/production/environment.ts @@ -0,0 +1,14 @@ +export const environment = { + accessDataHref: + "https://www.psi.ch/en/photon-science-data-services/slsswissfel-data-transfer", + accessInstructions: + "To access the data associated with this DOI click below and follow the instructions", + directMongoAccess: true, + doiBaseUrl: "https://doi.org/", + facility: "psi", + lbBaseURL: "https://dacat.psi.ch", + oaiProviderRoute: null, + production: true, + scicatBaseUrl: "https://discovery.psi.ch", + showLogoBanner: false + }; diff --git a/helm_configs/landing-page-server/production/values.yaml b/helm_configs/landing-page-server/production/values.yaml new file mode 100644 index 0000000..9a61e6a --- /dev/null +++ b/helm_configs/landing-page-server/production/values.yaml @@ -0,0 +1,12 @@ +host: oaipmh-prod.qa.psi.ch + +secrets: + "{{ .Release.Name }}-s": + type: Opaque + data: + google-verification.html: '${{ secrets.LP_GOOGLE_VERIFY }}' + +volumeMounts: + - name: secrets-volume + mountPath: '{{ b64dec "${{ secrets.LP_GOOGLE_VERIFY }}" | trimPrefix "google-site-verification: " }}' + subPath: google-verification.html diff --git a/helm_configs/landing-page-server/values.yaml b/helm_configs/landing-page-server/values.yaml index a6ede56..351c6dd 100644 --- a/helm_configs/landing-page-server/values.yaml +++ b/helm_configs/landing-page-server/values.yaml @@ -25,3 +25,12 @@ ingress: - hosts: - "{{ .Values.host }}" secretName: "scicat-oaipmh-certificate" + +run: + command: + - /bin/sh + args: + - -c + - > + rm -f /usr/share/nginx/html/google43e14584df796f63.html; + nginx -g "daemon off;" diff --git a/landing-page-server b/landing-page-server index e19a53b..fe6e1b0 160000 --- a/landing-page-server +++ b/landing-page-server @@ -1 +1 @@ -Subproject commit e19a53b04855785e7064a016f78c6a49e5e2c95c +Subproject commit fe6e1b02802ff78f8a12d1598225a087e47afbcc