Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove unused and outdated files #1624

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 0 additions & 55 deletions .github/workflows/build-release.yml

This file was deleted.

20 changes: 1 addition & 19 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy
on:
push:
branches:
- master
- master
env:
NODE_VERSION: 18.x

Expand Down Expand Up @@ -50,21 +50,3 @@ jobs:
push: true
platforms: linux/amd64,linux/arm64/v8
tags: ${{ steps.meta.outputs.tags }}

- name: Trigger ESS pipeline
uses: swapActions/trigger-swap-deployment@v1
with:
repository: ${{ github.event.repository.name }}
environment: develop
gh-trigger-url: ${{ secrets.GITLAB_TRIGGER_URL }}
gh-token: ${{ secrets.GITLAB_TRIGGER_TOKEN }}
image-tag: ${{ github.sha }}

- name: Trigger MAXIV pipeline
uses: appleboy/gitlab-ci-action@master
with:
token: ${{ secrets.MAXIV_TOKEN }}
project_id: 21902377
ref: "develop"
host: "https://gitlab.com"
debug: true
11 changes: 4 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ jobs:
with:
node-version: ${{ env.NODE_VERSION }}

# These settings optimize memory and file handling for Elasticsearch,
# preventing common issues related to system limits running on github workflow.
- name: Configure sysctl limits
run: |
sudo swapoff -a
Expand All @@ -115,20 +117,15 @@ jobs:

- name: Run docker-compose
run: |
cp CI/ESS/e2e/docker-compose.e2e.yaml docker-compose.yaml
cp CI/e2e/docker-compose.e2e.yaml docker-compose.yaml
docker compose pull
docker compose build --no-cache
docker compose up -d

- name: Wait for Backend
run: |
npm install -g wait-on
wait-on http://localhost:3000/api/v3/health --timeout 200000

- name: Run Cypress tests
uses: cypress-io/github-action@v6
with:
config-file: CI/ESS/e2e/cypress.github.ts
config-file: cypress.config.ts
install-command: npm install --omit peer
browser: chrome

Expand Down
14 changes: 0 additions & 14 deletions CI/ESS/e2e/.env

This file was deleted.

22 changes: 0 additions & 22 deletions CI/ESS/e2e/Dockerfile.e2e

This file was deleted.

20 changes: 0 additions & 20 deletions CI/ESS/e2e/cypress.config.ts

This file was deleted.

20 changes: 0 additions & 20 deletions CI/ESS/e2e/cypress.github.ts

This file was deleted.

20 changes: 0 additions & 20 deletions CI/ESS/e2e/cypress.nestjs.ts

This file was deleted.

2 changes: 1 addition & 1 deletion CI/ESS/e2e/.env.backend-next → CI/e2e/.env.backend.e2e
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ LOGBOOK_BASE_URL="http://scichat-loopback:3000/scichatapi"

METADATA_KEYS_RETURN_LIMIT=100
METADATA_PARENT_INSTANCES_RETURN_LIMIT=100
MONGODB_URI="mongodb://mongodb:27017/scicat-backend-nestjs-e2e-testing"
MONGODB_URI="mongodb://mongodb:27017/test"
PID_PREFIX="20.500.12269/"
PUBLIC_URL_PREFIX="https://doi.ess.eu/detail/"
PORT=3000
Expand Down
5 changes: 5 additions & 0 deletions CI/e2e/.env.scichat-loopback.e2e
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PORT: ""
SYNAPSE_SERVER_NAME: ""
SYNAPSE_SERVER_HOST: ""
SYNAPSE_BOT_NAME: ""
SYNAPSE_BOT_PASSWORD: ""
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
version: "3.4"
services:
reverse-proxy:
image: traefik:2.5
image: traefik:2.10
nitrosx marked this conversation as resolved.
Show resolved Hide resolved
command: --api.insecure=true --providers.docker=true --entrypoints.web.address=:80
ports:
- 8080:80
volumes:
- /var/run/docker.sock:/var/run/docker.sock
mongodb:
image: "bitnami/mongodb:latest"
## As of 2024-10-22 bitnami mongoDB still do not support ARM64
nitrosx marked this conversation as resolved.
Show resolved Hide resolved
## Change back to bitnami/mongodb when it supports ARM64
image: "mongo:latest"
ports:
- "27017:27017"
volumes:
Expand All @@ -19,60 +21,35 @@ services:
timeout: 10s
retries: 5
start_period: 40s
scichat-loopback:
image: "ghcr.io/scicatproject/scichat-loopback:e2e"
command:
[
"./wait-for-it.sh",
"mongodb:27017",
"--",
"node",
"-r",
"dotenv/config",
"."
]
volumes:
- "./CI/ESS/e2e/.env:/home/node/app/.env"
depends_on:
mongodb:
condition: service_healthy

backend:
image: ghcr.io/scicatproject/backend-next:latest
command: sh -c "node dist/main"
ports:
- 3000:3000
volumes:
- "./CI/ESS/e2e/.env.backend-next:/home/node/app/.env"
- "./CI/ESS/e2e/functionalAccounts.json:/home/node/app/functionalAccounts.json"
- "./CI/ESS/e2e/config.e2e.json:/home/node/app/dist/config/frontend.config.json"
- "./CI/e2e/.env.backend.e2e:/home/node/app/.env"
- "./CI/e2e/functionalAccounts.e2e.json:/home/node/app/functionalAccounts.json"
- "./CI/e2e/frontend.config.e2e.json:/home/node/app/dist/config/frontend.config.json"
depends_on:
mongodb:
condition: service_healthy
es01:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api/v3/health"]
interval: 30s
timeout: 10s
retries: 5
labels:
- "traefik.http.routers.backend.rule=PathPrefix(`/api/v3`, `/auth/msad`)"
- "traefik.http.routers.backend.entrypoints=web"
frontend:
build:
context: .
dockerfile: CI/ESS/e2e/Dockerfile.e2e
command:
[
"./wait-for-it.sh",
"backend:3000",
"--",
"nginx",
"-g",
"daemon off;"
]
ports:
- 4200:80
volumes:
- "./CI/ESS/e2e/config.e2e.json:/usr/share/nginx/html/assets/config.json"
- "./CI/ESS/site.png:/usr/share/nginx/html/assets/images/site.png"
- "./CI/ESS/site-logo.png:/usr/share/nginx/html/assets/images/site-logo.png"
- "./CI/ESS/favicon.ico:/usr/share/nginx/html/favicon.ico"
- "./CI/e2e/frontend.config.e2e.json:/usr/share/nginx/html/assets/config.json"
depends_on:
- backend
labels:
Expand Down Expand Up @@ -110,6 +87,29 @@ services:
timeout: 10s
start_period: 60s
retries: 4


## NOTE:
## scichat-loopback is ESS specific microservice for logbook
## Discussion is needed to decide if this should be included in the e2e test
## If not, remove the following block and also .env.scichat-loopback.e2e in the same directory


# scichat-loopback:
# image: "ghcr.io/scicatproject/scichat-loopback:latest"
# command:
# [
# "node",
# "-r",
# "dotenv/config",
# "."
# ]
# volumes:
# - "./CI/e2e/.env.scichat-loopback.e2e:/home/node/app/.env"
# depends_on:
# mongodb:
# condition: service_healthy

volumes:
mongodb_data:
driver: local
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"maxDirectDownloadSize": 1047521824,
"metadataPreviewEnabled": true,
"metadataStructure": "",
"multipleDownloadAction": "http:/127.0.0.1:3012/zip",
"multipleDownloadAction": "http:/localhost/zip",
"multipleDownloadEnabled": true,
"oAuth2Endpoints": [
{
Expand All @@ -42,12 +42,12 @@
],
"policiesEnabled": true,
"retrieveDestinations": [],
"riotBaseUrl": "http://scichat.esss.lu.se",
"riotBaseUrl": "",
"scienceSearchEnabled": true,
"scienceSearchUnitsEnabled": true,
"searchPublicDataEnabled": true,
"searchSamples": true,
"sftpHost": "login.esss.dk",
"sftpHost": "",
"shareEnabled": true,
"shoppingCartEnabled": true,
"shoppingCartOnHeader": true,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
Loading
Loading