From 547e1f8eaf5e089bb245cd5db0f3613e2fa08e86 Mon Sep 17 00:00:00 2001 From: Lars Gohr Date: Mon, 27 Mar 2023 22:34:53 +0200 Subject: [PATCH 01/10] Updated elgohr/Publish-Docker-Github-Action to a supported version (v5) --- .github/workflows/deploy_dev.yml | 2 +- .github/workflows/deploy_prod.yml | 2 +- .github/workflows/deploy_stage.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy_dev.yml b/.github/workflows/deploy_dev.yml index b68207a5b..57b83f757 100644 --- a/.github/workflows/deploy_dev.yml +++ b/.github/workflows/deploy_dev.yml @@ -20,7 +20,7 @@ jobs: with: ref: develop - name: Build UI and publish Docker image - uses: elgohr/Publish-Docker-Github-Action@master + uses: elgohr/Publish-Docker-Github-Action@v5 with: name: hsldevcom/jore-map-ui username: ${{ secrets.DOCKERHUB_USERNAME }} diff --git a/.github/workflows/deploy_prod.yml b/.github/workflows/deploy_prod.yml index deddc2c31..b6289f4d1 100644 --- a/.github/workflows/deploy_prod.yml +++ b/.github/workflows/deploy_prod.yml @@ -20,7 +20,7 @@ jobs: with: ref: release-prod - name: Build UI and publish Docker image - uses: elgohr/Publish-Docker-Github-Action@master + uses: elgohr/Publish-Docker-Github-Action@v5 with: name: hsldevcom/jore-map-ui username: ${{ secrets.DOCKERHUB_USERNAME }} diff --git a/.github/workflows/deploy_stage.yml b/.github/workflows/deploy_stage.yml index 659cf66c0..577e795a8 100644 --- a/.github/workflows/deploy_stage.yml +++ b/.github/workflows/deploy_stage.yml @@ -20,7 +20,7 @@ jobs: with: ref: master - name: Build UI and publish Docker image - uses: elgohr/Publish-Docker-Github-Action@master + uses: elgohr/Publish-Docker-Github-Action@v5 with: name: hsldevcom/jore-map-ui username: ${{ secrets.DOCKERHUB_USERNAME }} From 801d10efa42a2e83305d4b386d01f5d8f06c0b77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juho=20H=C3=A4nninen?= Date: Tue, 3 Sep 2024 13:43:22 +0300 Subject: [PATCH 02/10] Optimize docker build and update builds to support multiple domains --- .github/workflows/deploy_dev.yml | 17 +++---------- .github/workflows/deploy_prod.yml | 17 +++---------- .github/workflows/deploy_stage.yml | 38 ------------------------------ .vscode/settings.json | 12 ---------- Dockerfile | 28 +++++++++++++++------- src/constants/constants.ts | 6 ++--- 6 files changed, 29 insertions(+), 89 deletions(-) delete mode 100644 .github/workflows/deploy_stage.yml delete mode 100644 .vscode/settings.json diff --git a/.github/workflows/deploy_dev.yml b/.github/workflows/deploy_dev.yml index 57b83f757..acec9f41c 100644 --- a/.github/workflows/deploy_dev.yml +++ b/.github/workflows/deploy_dev.yml @@ -9,14 +9,10 @@ jobs: deploy-dev: runs-on: ubuntu-latest steps: - - name: "Set time zone to Europe/Helsinki" - uses: zcong1993/setup-timezone@master - with: - timezone: "Europe/Helsinki" - name: Set current date to be accessible later with steps.date.outputs.date id: date - run: echo "::set-output name=date::$(date +'%d.%m.%Y_%H:%M')" - - uses: actions/checkout@v2 + run: echo "::set-output name=date::$(TZ='Europe/Helsinki' date +'%d.%m.%Y_%H:%M')" + - uses: actions/checkout@v4 with: ref: develop - name: Build UI and publish Docker image @@ -25,14 +21,7 @@ jobs: name: hsldevcom/jore-map-ui username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} - buildargs: APP_ENVIRONMENT=dev, APP_REACT_APP_DIGITRANSIT_API_KEY=${{ secrets.JOREMAPUI_DIGITRANSITAPIKEY_PROD }} APP_DOMAIN_NAME=${{ secrets.APP_DOMAIN_NAME }}, APP_BUILD_DATE=${{ steps.date.outputs.date }} + buildargs: APP_ENVIRONMENT=dev, APP_REACT_APP_DIGITRANSIT_API_KEY=${{ secrets.JOREMAPUI_DIGITRANSITAPIKEY_PROD }} APP_DOMAIN=${{ secrets.APP_DOMAIN_DEV }}, APP_BUILD_DATE=${{ steps.date.outputs.date }} tags: develop - - name: Notify of deployment - uses: 8398a7/action-slack@v3 - if: always() - with: - status: ${{ job.status }} - text: Jore-map DEV deployment status env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/deploy_prod.yml b/.github/workflows/deploy_prod.yml index b6289f4d1..90b4ffd53 100644 --- a/.github/workflows/deploy_prod.yml +++ b/.github/workflows/deploy_prod.yml @@ -9,14 +9,10 @@ jobs: deploy-prod: runs-on: ubuntu-latest steps: - - name: "Set time zone to Europe/Helsinki" - uses: zcong1993/setup-timezone@master - with: - timezone: "Europe/Helsinki" - name: Set current date to be accessible later with steps.date.outputs.date id: date - run: echo "::set-output name=date::$(date +'%d.%m.%Y_%H:%M')" - - uses: actions/checkout@v2 + run: echo "::set-output name=date::$(TZ='Europe/Helsinki' date +'%d.%m.%Y_%H:%M')" + - uses: actions/checkout@v4 with: ref: release-prod - name: Build UI and publish Docker image @@ -25,14 +21,7 @@ jobs: name: hsldevcom/jore-map-ui username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} - buildargs: APP_ENVIRONMENT=prod, APP_REACT_APP_DIGITRANSIT_API_KEY=${{ secrets.JOREMAPUI_DIGITRANSITAPIKEY_PROD }}, APP_DOMAIN_NAME=${{ secrets.APP_DOMAIN_NAME }}, APP_BUILD_DATE=${{ steps.date.outputs.date }} + buildargs: APP_ENVIRONMENT=prod, APP_REACT_APP_DIGITRANSIT_API_KEY=${{ secrets.JOREMAPUI_DIGITRANSITAPIKEY_PROD }}, APP_DOMAIN=${{ secrets.APP_DOMAIN_PROD }}, APP_BUILD_DATE=${{ steps.date.outputs.date }} tags: release-prod - - name: Notify of deployment - uses: 8398a7/action-slack@v3 - if: always() - with: - status: ${{ job.status }} - text: Jore-map PROD deployment status env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/deploy_stage.yml b/.github/workflows/deploy_stage.yml deleted file mode 100644 index 577e795a8..000000000 --- a/.github/workflows/deploy_stage.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Deploy stage - -on: - push: - branches: - - master - -jobs: - deploy-stage: - runs-on: ubuntu-latest - steps: - - name: "Set time zone to Europe/Helsinki" - uses: zcong1993/setup-timezone@master - with: - timezone: "Europe/Helsinki" - - name: Set current date to be accessible later with steps.date.outputs.date - id: date - run: echo "::set-output name=date::$(date +'%d.%m.%Y_%H:%M')" - - uses: actions/checkout@v2 - with: - ref: master - - name: Build UI and publish Docker image - uses: elgohr/Publish-Docker-Github-Action@v5 - with: - name: hsldevcom/jore-map-ui - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} - buildargs: APP_ENVIRONMENT=stage, APP_REACT_APP_DIGITRANSIT_API_KEY=${{ secrets.JOREMAPUI_DIGITRANSITAPIKEY_PROD }}, APP_DOMAIN_NAME=${{ secrets.APP_DOMAIN_NAME }}, APP_BUILD_DATE=${{ steps.date.outputs.date }} - tags: stage - - name: Notify of deployment - uses: 8398a7/action-slack@v3 - if: always() - with: - status: ${{ job.status }} - text: Jore-map STAGE deployment status - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 044e9795f..000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "tslint.autoFixOnSave": true, - "editor.tabSize": 4, - "editor.insertSpaces": true, - "editor.codeActionsOnSave": { - "source.fixAll.tslint": true - }, - "files.exclude": { - "**/*.scss.d.ts": true - }, - "typescript.tsdk": "node_modules/typescript/lib" -} diff --git a/Dockerfile b/Dockerfile index 2541dc909..aad1580c0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,12 @@ -FROM node:12.16.1-alpine +FROM node:12.16.1-alpine AS builder -ENV WORK /build +ENV WORK=/opt/joremapui RUN mkdir -p ${WORK} WORKDIR ${WORK} # Install app dependencies -COPY yarn.lock ${WORK} -COPY package.json ${WORK} -COPY .yarnrc ${WORK} +COPY yarn.lock package.json .yarnrc ${WORK} RUN yarn COPY . ${WORK} @@ -19,8 +17,8 @@ ENV ENVIRONMENT=${APP_ENVIRONMENT} ARG APP_REACT_APP_DIGITRANSIT_API_KEY ENV REACT_APP_DIGITRANSIT_API_KEY=${APP_REACT_APP_DIGITRANSIT_API_KEY} -ARG APP_DOMAIN_NAME -ENV DOMAIN_NAME=${APP_DOMAIN_NAME} +ARG APP_DOMAIN +ENV DOMAIN_NAME=${APP_DOMAIN} ARG APP_BUILD_DATE ENV BUILD_DATE=${APP_BUILD_DATE} @@ -28,4 +26,18 @@ ENV BUILD_DATE=${APP_BUILD_DATE} RUN yarn test:ci RUN yarn build -CMD yarn run production + +FROM node:20-alpine AS server + +ENV WORK=/opt/joremapui + +# Create app directory +RUN mkdir -p ${WORK} +WORKDIR ${WORK} + +# Install serve +RUN yarn global add serve@^14.2.3 + +COPY --from=builder /opt/joremapui/build build/ + +CMD ["serve", "-s", "-l", "5000", "build/"] diff --git a/src/constants/constants.ts b/src/constants/constants.ts index 6d2a3837b..cf084d1fc 100644 --- a/src/constants/constants.ts +++ b/src/constants/constants.ts @@ -19,7 +19,7 @@ switch (environment) { break; } case Environment.DEV: { - APP_URL = `https://${process.env.ENVIRONMENT}.${process.env.DOMAIN_NAME}`; + APP_URL = `https://${process.env.APP_DOMAIN}`; HSL_ID_URL = 'https://hslid-uat.cinfra.fi'; HSL_ID_CLIENT_ID = '6549375356227079'; DIGITRANSIT_CACHED_URL_PREFIX = 'cdn'; @@ -27,7 +27,7 @@ switch (environment) { break; } case Environment.STAGE: { - APP_URL = `https://${process.env.ENVIRONMENT}.${process.env.DOMAIN_NAME}`; + APP_URL = `https://${process.env.APP_DOMAIN}`; HSL_ID_URL = 'https://hslid-uat.cinfra.fi'; HSL_ID_CLIENT_ID = '6549375356227079'; DIGITRANSIT_CACHED_URL_PREFIX = 'cdn'; @@ -35,7 +35,7 @@ switch (environment) { break; } case Environment.PROD: { - APP_URL = `https://${process.env.DOMAIN_NAME}`; + APP_URL = `https://${process.env.APP_DOMAIN}`; HSL_ID_URL = 'https://id.hsl.fi'; HSL_ID_CLIENT_ID = '7799731418699567'; DIGITRANSIT_CACHED_URL_PREFIX = 'cdn'; From 36fd117f69a5febd7a24ed60656bc140d677c4d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juho=20H=C3=A4nninen?= Date: Tue, 3 Sep 2024 14:06:49 +0300 Subject: [PATCH 03/10] Fix missing env changes --- Dockerfile | 2 +- config/env.js | 2 +- config/webpack.config.prod.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index aad1580c0..cccdb6cc6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ ARG APP_REACT_APP_DIGITRANSIT_API_KEY ENV REACT_APP_DIGITRANSIT_API_KEY=${APP_REACT_APP_DIGITRANSIT_API_KEY} ARG APP_DOMAIN -ENV DOMAIN_NAME=${APP_DOMAIN} +ENV APP_DOMAIN=${APP_DOMAIN} ARG APP_BUILD_DATE ENV BUILD_DATE=${APP_BUILD_DATE} diff --git a/config/env.js b/config/env.js index eabd9d05e..dda7251f1 100644 --- a/config/env.js +++ b/config/env.js @@ -78,7 +78,7 @@ function getClientEnvironment(publicUrl) { // images into the `src` and `import` them in code to get their paths. PUBLIC_URL: publicUrl, ENVIRONMENT: process.env.ENVIRONMENT, - DOMAIN_NAME: process.env.DOMAIN_NAME, + APP_DOMAIN: process.env.APP_DOMAIN, BUILD_DATE: process.env.BUILD_DATE, REACT_APP_DIGITRANSIT_API_KEY: process.env.REACT_APP_DIGITRANSIT_API_KEY } diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js index 6dc75a6fc..52a1d328f 100644 --- a/config/webpack.config.prod.js +++ b/config/webpack.config.prod.js @@ -305,7 +305,7 @@ module.exports = { 'process.env.REACT_APP_DIGITRANSIT_API_KEY': JSON.stringify(process.env.REACT_APP_DIGITRANSIT_API_KEY) }), new webpack.DefinePlugin({ - 'process.env.DOMAIN_NAME': JSON.stringify(process.env.DOMAIN_NAME) + 'process.env.APP_DOMAIN': JSON.stringify(process.env.APP_DOMAIN) }), new webpack.DefinePlugin({ 'process.env.BUILD_DATE': JSON.stringify(process.env.BUILD_DATE) From 9354f3455760a54a8e54f5d66f7da9435ff1fe21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juho=20H=C3=A4nninen?= Date: Tue, 3 Sep 2024 17:45:44 +0300 Subject: [PATCH 04/10] Change Geoserver to tileserver --- src/components/map/layers/NetworkLayers.tsx | 33 ++++++++++----------- src/constants/constants.ts | 4 +-- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/src/components/map/layers/NetworkLayers.tsx b/src/components/map/layers/NetworkLayers.tsx index 038c9a8ee..d8a191995 100644 --- a/src/components/map/layers/NetworkLayers.tsx +++ b/src/components/map/layers/NetworkLayers.tsx @@ -18,10 +18,9 @@ import VectorGridLayer from './VectorGridLayer'; import * as s from './networkLayers.scss'; import { INodePopupData } from './popups/NodePopup'; -enum GeoserverLayer { - Node = 'solmu', - Link = 'linkki', - Point = 'piste', +enum TileserverLayer { + Link = 'linkki_view', + Point = 'piste_view', } interface INetworkLayersProps { @@ -40,9 +39,9 @@ interface ILinkProperties { lnkloppusolmu: string; } -function getGeoServerUrl(layerName: string) { - const GEOSERVER_URL = constants.GEOSERVER_URL; - return `${GEOSERVER_URL}/gwc/service/tms/1.0.0/joremapui%3A${layerName}@jore_EPSG%3A900913@pbf/{z}/{x}/{y}.pbf`; +function getTileserverUrl(layerName: string) { + const TILESERVER_URL = constants.TILESERVER_URL; + return `${TILESERVER_URL}/jore.${layerName}/{z}/{x}/{y}.pbf`; } @inject('mapStore', 'networkStore', 'nodeStore', 'linkStore', 'popupStore') @@ -52,7 +51,7 @@ class NetworkLayers extends Component { private getLinkStyle = () => { return { - // Layer name 'linkki' is directly mirrored from Jore through geoserver + // Layer name 'linkki' is directly mirrored from Jore through tileserver linkki: (properties: ILinkProperties) => { const { lnkalkusolmu: startNodeId, @@ -84,7 +83,7 @@ class NetworkLayers extends Component { private getLinkPointStyle = () => { return { - // Layer name 'piste' is directly mirrored from Jore through geoserver + // Layer name 'piste' is directly mirrored from Jore through tileserver piste: (properties: ILinkProperties) => { const { lnkalkusolmu: startNodeId, @@ -144,10 +143,10 @@ class NetworkLayers extends Component { }; /** - * Sets a reaction object for GeoserverLayer (replaces existing one) so + * Sets a reaction object for TileserverLayer (replaces existing one) so * that reaction object's wouldn't multiply each time a VectorGridLayer is re-rendered. */ - private setVectorgridLayerReaction = (type: GeoserverLayer) => ( + private setVectorgridLayerReaction = (type: TileserverLayer) => ( reaction: IReactionDisposer ) => { if (this.reactionDisposer[type]) this.reactionDisposer[type](); @@ -165,11 +164,11 @@ class NetworkLayers extends Component { @@ -178,11 +177,11 @@ class NetworkLayers extends Component { diff --git a/src/constants/constants.ts b/src/constants/constants.ts index cf084d1fc..00e51ed9b 100644 --- a/src/constants/constants.ts +++ b/src/constants/constants.ts @@ -72,14 +72,14 @@ const commonConstants = { const developmentConstants = { ...commonConstants, API_URL: 'http://localhost:3040', - GEOSERVER_URL: 'http://localhost:8080/geoserver', + TILESERVER_URL: 'http://localhost:7800/tiles', FADE_ALERT_TIMEOUT: 500, // milliseconds }; const productionConstants = { ...commonConstants, API_URL: `${APP_URL}/api`, - GEOSERVER_URL: `${APP_URL}/geoserver`, + TILESERVER_URL: `${APP_URL}/tiles`, FADE_ALERT_TIMEOUT: 2500, // milliseconds }; From 454c1160cf024d68ade06c36d173db0d18ca12f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juho=20H=C3=A4nninen?= Date: Wed, 4 Sep 2024 12:15:02 +0300 Subject: [PATCH 05/10] Disable tms for vt-layers --- src/components/map/layers/VectorGridLayer.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/map/layers/VectorGridLayer.tsx b/src/components/map/layers/VectorGridLayer.tsx index aec67a5b4..1ebdaa45d 100644 --- a/src/components/map/layers/VectorGridLayer.tsx +++ b/src/components/map/layers/VectorGridLayer.tsx @@ -50,8 +50,6 @@ class VectorGridLayer extends GridLayer { createLeafletElement(props: IVectorGridLayerProps): any { const { url, ...options } = props; - options.tms = true; - return L.vectorGrid.protobuf(url, options); } From c9e94332aab21695c3f2be337d22f8ec3091c55d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juho=20H=C3=A4nninen?= Date: Thu, 5 Sep 2024 14:33:14 +0300 Subject: [PATCH 06/10] Rename view names --- src/components/map/layers/NetworkLayers.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/map/layers/NetworkLayers.tsx b/src/components/map/layers/NetworkLayers.tsx index d8a191995..bed3baba7 100644 --- a/src/components/map/layers/NetworkLayers.tsx +++ b/src/components/map/layers/NetworkLayers.tsx @@ -19,8 +19,8 @@ import * as s from './networkLayers.scss'; import { INodePopupData } from './popups/NodePopup'; enum TileserverLayer { - Link = 'linkki_view', - Point = 'piste_view', + Link = 'linkki', + Point = 'piste', } interface INetworkLayersProps { From 05ff1db1fe07ee8c3c9c45c32faba7314cc178bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juho=20H=C3=A4nninen?= Date: Thu, 5 Sep 2024 14:34:51 +0300 Subject: [PATCH 07/10] Revert "Rename view names" This reverts commit c9e94332aab21695c3f2be337d22f8ec3091c55d. --- src/components/map/layers/NetworkLayers.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/map/layers/NetworkLayers.tsx b/src/components/map/layers/NetworkLayers.tsx index bed3baba7..d8a191995 100644 --- a/src/components/map/layers/NetworkLayers.tsx +++ b/src/components/map/layers/NetworkLayers.tsx @@ -19,8 +19,8 @@ import * as s from './networkLayers.scss'; import { INodePopupData } from './popups/NodePopup'; enum TileserverLayer { - Link = 'linkki', - Point = 'piste', + Link = 'linkki_view', + Point = 'piste_view', } interface INetworkLayersProps { From a07ab9e7e8da10224b52ce12a3c6b55c8b706c62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juho=20H=C3=A4nninen?= Date: Mon, 21 Oct 2024 09:47:28 +0300 Subject: [PATCH 08/10] Change the default production branch to 'master' --- .github/workflows/deploy_prod.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy_prod.yml b/.github/workflows/deploy_prod.yml index 90b4ffd53..f74d9e78e 100644 --- a/.github/workflows/deploy_prod.yml +++ b/.github/workflows/deploy_prod.yml @@ -3,7 +3,7 @@ name: Deploy prod on: push: branches: - - release-prod + - master jobs: deploy-prod: @@ -14,7 +14,7 @@ jobs: run: echo "::set-output name=date::$(TZ='Europe/Helsinki' date +'%d.%m.%Y_%H:%M')" - uses: actions/checkout@v4 with: - ref: release-prod + ref: master - name: Build UI and publish Docker image uses: elgohr/Publish-Docker-Github-Action@v5 with: @@ -22,6 +22,6 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} buildargs: APP_ENVIRONMENT=prod, APP_REACT_APP_DIGITRANSIT_API_KEY=${{ secrets.JOREMAPUI_DIGITRANSITAPIKEY_PROD }}, APP_DOMAIN=${{ secrets.APP_DOMAIN_PROD }}, APP_BUILD_DATE=${{ steps.date.outputs.date }} - tags: release-prod + tags: production env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From bff5ca780a2b5ffc920264486faffa09677bf1da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juho=20H=C3=A4nninen?= Date: Mon, 21 Oct 2024 09:53:37 +0300 Subject: [PATCH 09/10] Fix e2e tests --- .github/workflows/test_dev.yml | 4 +-- .github/workflows/test_stage.yml | 52 -------------------------------- 2 files changed, 2 insertions(+), 54 deletions(-) delete mode 100644 .github/workflows/test_stage.yml diff --git a/.github/workflows/test_dev.yml b/.github/workflows/test_dev.yml index 5b1ed3f97..06cbf69bb 100644 --- a/.github/workflows/test_dev.yml +++ b/.github/workflows/test_dev.yml @@ -30,13 +30,13 @@ jobs: CYPRESS_HSLID_READ_ACCESS_PASSWORD: ${{ secrets.CYPRESS_HSLID_READ_ACCESS_PASSWORD }} # CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} # Only prod updates to record into Cypress.io - name: Upload screenshot artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: failure() with: name: cypress-screenshots path: cypress/screenshots - name: Upload video artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: always() with: name: cypress-videos diff --git a/.github/workflows/test_stage.yml b/.github/workflows/test_stage.yml deleted file mode 100644 index 5798073ea..000000000 --- a/.github/workflows/test_stage.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Test stage - -on: - pull_request: - branches: - - release-prod - -jobs: - test-stage: - runs-on: ubuntu-latest - steps: - - name: "Set time zone to Europe/Helsinki" - uses: zcong1993/setup-timezone@master - with: - timezone: "Europe/Helsinki" - - name: Checkout - uses: actions/checkout@v2 - - name: Cypress run - uses: cypress-io/github-action@v2 - with: - record: true - env: - CYPRESS_E2E: true # Needed to tell babel.config to not load cypress breaking presets - CYPRESS_BASE_URL: https://stage.jore-map.hsl.fi - CYPRESS_HSLID_CLIENT_ID: ${{ secrets.CYPRESS_HSLID_CLIENT_ID }} - CYPRESS_HSLID_CLIENT_SECRET: ${{ secrets.CYPRESS_HSLID_CLIENT_SECRET }} - CYPRESS_HSLID_WRITE_ACCESS_USERNAME: ${{ secrets.CYPRESS_HSLID_WRITE_ACCESS_USERNAME }} - CYPRESS_HSLID_WRITE_ACCESS_PASSWORD: ${{ secrets.CYPRESS_HSLID_WRITE_ACCESS_PASSWORD }} - CYPRESS_HSLID_READ_ACCESS_USERNAME: ${{ secrets.CYPRESS_HSLID_READ_ACCESS_USERNAME }} - CYPRESS_HSLID_READ_ACCESS_PASSWORD: ${{ secrets.CYPRESS_HSLID_READ_ACCESS_PASSWORD }} - CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} - - name: Upload screenshot artifacts - uses: actions/upload-artifact@v2 - if: failure() - with: - name: cypress-screenshots - path: cypress/screenshots - - name: Upload video artifacts - uses: actions/upload-artifact@v2 - if: always() - with: - name: cypress-videos - path: cypress/videos - - name: Notify of tests - uses: 8398a7/action-slack@v3 - if: always() - with: - status: ${{ job.status }} - text: Jore-map STAGE E2E test status - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} From c00de5f3aa4ed592354ce60722d3302e947cf881 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juho=20H=C3=A4nninen?= Date: Mon, 21 Oct 2024 09:58:07 +0300 Subject: [PATCH 10/10] Change the correct dev url --- .github/workflows/test_dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_dev.yml b/.github/workflows/test_dev.yml index 06cbf69bb..b14fb9cbf 100644 --- a/.github/workflows/test_dev.yml +++ b/.github/workflows/test_dev.yml @@ -21,7 +21,7 @@ jobs: # record: true env: CYPRESS_E2E: true # Needed to tell babel.config to not load cypress breaking presets - CYPRESS_BASE_URL: https://dev.jore-map.hsl.fi + CYPRESS_BASE_URL: https:///dev.jore-map.hsldev.com CYPRESS_HSLID_CLIENT_ID: ${{ secrets.CYPRESS_HSLID_CLIENT_ID }} CYPRESS_HSLID_CLIENT_SECRET: ${{ secrets.CYPRESS_HSLID_CLIENT_SECRET }} CYPRESS_HSLID_WRITE_ACCESS_USERNAME: ${{ secrets.CYPRESS_HSLID_WRITE_ACCESS_USERNAME }}