Skip to content

Commit

Permalink
feat(sage-monorepo): create nx plugin for the monorepo (#2890)
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaffter authored Oct 11, 2024
1 parent 439f78d commit b05e021
Show file tree
Hide file tree
Showing 41 changed files with 937 additions and 350 deletions.
5 changes: 5 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
"ignorePatterns": ["**/*"],
"plugins": ["@nx"],
"overrides": [
{
"files": "*.json",
"parser": "jsonc-eslint-parser",
"rules": {}
},
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
Expand Down
15 changes: 8 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@
"editor.inlayHints.enabled": "off",
"eslint.enable": true,
"eslint.workingDirectories": ["."],
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact", "html"],
// We need to explicitly set Prettier as the format for JSON formats, otherwise the formatter
// provided with VS Code will set itself as the default one, despite us specifying that Prettier
// is the default formatter (editor.defaultFormatter).
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"html",
"json"
],
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
Expand All @@ -42,16 +46,13 @@
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"typescript.tsdk": "node_modules/typescript/lib",
// Python settings
"python.analysis.autoImportCompletions": true,
"python.analysis.typeCheckingMode": "basic",
// "python.terminal.activateEnvironment": false,
"python.terminal.activateEnvInCurrentTerminal": false,
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.tabSize": 4
},
// SQL settings
"sqltools.autoOpenSessionFiles": false,
"sqltools.connections": [
{
Expand Down
22 changes: 0 additions & 22 deletions apps/openchallenges/apex/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,6 @@
"command": "docker/openchallenges/serve-detach.sh openchallenges-apex"
}
},
"build-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
"context": "{projectRoot}"
},
"configurations": {
"local": {
"metadata": {
"images": ["ghcr.io/sage-bionetworks/{projectName}"],
"tags": ["type=edge,branch=main", "type=raw,value=local", "type=sha"]
}
},
"ci": {
"metadata": {
"images": ["ghcr.io/sage-bionetworks/{projectName}"],
"tags": ["type=semver,pattern={{version}},value=${VERSION}", "type=sha"]
},
"push": true
}
},
"defaultConfiguration": "local"
},
"publish-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
Expand Down
12 changes: 0 additions & 12 deletions apps/openchallenges/api-docs/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,6 @@
"command": "docker/openchallenges/serve-detach.sh openchallenges-api-docs"
}
},
"build-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
"context": "apps/openchallenges/api-docs",
"metadata": {
"images": ["ghcr.io/sage-bionetworks/openchallenges-api-docs"],
"tags": ["type=edge,branch=main", "type=raw,value=local", "type=sha"]
},
"push": false
},
"dependsOn": ["build"]
},
"publish-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
Expand Down
12 changes: 0 additions & 12 deletions apps/openchallenges/api-gateway/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,6 @@
},
"dependsOn": ["^install"]
},
"build-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
"context": "apps/openchallenges/api-gateway",
"metadata": {
"images": ["ghcr.io/sage-bionetworks/openchallenges-api-gateway"],
"tags": ["type=edge,branch=main", "type=raw,value=local", "type=sha"]
},
"push": false
},
"dependsOn": ["build-image-base"]
},
"publish-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
Expand Down
12 changes: 0 additions & 12 deletions apps/openchallenges/app/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,6 @@
"jestConfig": "apps/openchallenges/app/jest.config.ts"
}
},
"build-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
"context": ".",
"metadata": {
"images": ["ghcr.io/sage-bionetworks/openchallenges-app"],
"tags": ["type=edge,branch=main", "type=raw,value=local", "type=sha"]
},
"push": false
},
"dependsOn": ["server"]
},
"publish-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
Expand Down
12 changes: 0 additions & 12 deletions apps/openchallenges/challenge-service/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,6 @@
},
"dependsOn": ["^install"]
},
"build-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
"context": "apps/openchallenges/challenge-service",
"metadata": {
"images": ["ghcr.io/sage-bionetworks/{projectName}"],
"tags": ["type=edge,branch=main", "type=raw,value=local", "type=sha"]
},
"push": false
},
"dependsOn": ["build-image-base"]
},
"publish-image": {
"executor": "@nx-tools/nx-container:build",
"context": "apps/openchallenges/challenge-service",
Expand Down
12 changes: 0 additions & 12 deletions apps/openchallenges/config-server/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,6 @@
},
"dependsOn": ["^install"]
},
"build-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
"context": "apps/openchallenges/config-server",
"metadata": {
"images": ["ghcr.io/sage-bionetworks/openchallenges-config-server"],
"tags": ["type=edge,branch=main", "type=raw,value=local", "type=sha"]
},
"push": false
},
"dependsOn": ["build-image-base"]
},
"publish-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
Expand Down
11 changes: 0 additions & 11 deletions apps/openchallenges/edam-etl/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,6 @@
"command": "docker/openchallenges/serve-detach.sh {projectName}"
}
},
"build-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
"context": "{projectRoot}",
"metadata": {
"images": ["ghcr.io/sage-bionetworks/{projectName}"],
"tags": ["type=edge,branch=main", "type=raw,value=local", "type=sha"]
},
"push": false
}
},
"publish-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
Expand Down
11 changes: 0 additions & 11 deletions apps/openchallenges/elasticsearch/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,6 @@
},
"dependsOn": []
},
"build-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
"context": "apps/openchallenges/elasticsearch",
"metadata": {
"images": ["ghcr.io/sage-bionetworks/openchallenges-elasticsearch"],
"tags": ["type=edge,branch=main", "type=raw,value=local", "type=sha"]
},
"push": false
}
},
"publish-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
Expand Down
11 changes: 0 additions & 11 deletions apps/openchallenges/grafana/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,6 @@
},
"dependsOn": []
},
"build-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
"context": "apps/openchallenges/grafana",
"metadata": {
"images": ["ghcr.io/sage-bionetworks/openchallenges-grafana"],
"tags": ["type=edge,branch=main", "type=raw,value=local", "type=sha"]
},
"push": false
}
},
"publish-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
Expand Down
12 changes: 0 additions & 12 deletions apps/openchallenges/image-service/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,6 @@
},
"dependsOn": ["^install"]
},
"build-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
"context": "apps/openchallenges/image-service",
"metadata": {
"images": ["ghcr.io/sage-bionetworks/openchallenges-image-service"],
"tags": ["type=edge,branch=main", "type=raw,value=local", "type=sha"]
},
"push": false
},
"dependsOn": ["build-image-base"]
},
"publish-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
Expand Down
11 changes: 0 additions & 11 deletions apps/openchallenges/mariadb/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,6 @@
"command": "docker/openchallenges/serve-detach.sh {projectName}"
}
},
"build-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
"context": "{projectRoot}",
"metadata": {
"images": ["ghcr.io/sage-bionetworks/{projectName}"],
"tags": ["type=edge,branch=main", "type=raw,value=local", "type=sha"]
},
"push": false
}
},
"publish-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
Expand Down
11 changes: 0 additions & 11 deletions apps/openchallenges/mysqld-exporter/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,6 @@
},
"dependsOn": []
},
"build-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
"context": "apps/openchallenges/mysqld-exporter",
"metadata": {
"images": ["ghcr.io/sage-bionetworks/openchallenges-mysqld-exporter"],
"tags": ["type=edge,branch=main", "type=raw,value=local", "type=sha"]
},
"push": false
}
},
"publish-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
Expand Down
12 changes: 0 additions & 12 deletions apps/openchallenges/organization-service/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,6 @@
},
"dependsOn": ["^install"]
},
"build-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
"context": "{projectRoot}",
"metadata": {
"images": ["ghcr.io/sage-bionetworks/{projectName}"],
"tags": ["type=edge,branch=main", "type=raw,value=local", "type=sha"]
},
"push": false
},
"dependsOn": ["build-image-base"]
},
"publish-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
Expand Down
11 changes: 0 additions & 11 deletions apps/openchallenges/prometheus/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,6 @@
},
"dependsOn": []
},
"build-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
"context": "apps/openchallenges/prometheus",
"metadata": {
"images": ["ghcr.io/sage-bionetworks/openchallenges-prometheus"],
"tags": ["type=edge,branch=main", "type=raw,value=local", "type=sha"]
},
"push": false
}
},
"publish-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
Expand Down
12 changes: 0 additions & 12 deletions apps/openchallenges/service-registry/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,6 @@
},
"dependsOn": ["^install"]
},
"build-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
"context": "apps/openchallenges/service-registry",
"metadata": {
"images": ["ghcr.io/sage-bionetworks/openchallenges-service-registry"],
"tags": ["type=edge,branch=main", "type=raw,value=local", "type=sha"]
},
"push": false
},
"dependsOn": ["build-image-base"]
},
"publish-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
Expand Down
11 changes: 0 additions & 11 deletions apps/openchallenges/thumbor/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,6 @@
"command": "docker/openchallenges/serve-detach.sh openchallenges-thumbor"
}
},
"build-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
"context": "apps/openchallenges/thumbor",
"metadata": {
"images": ["ghcr.io/sage-bionetworks/openchallenges-thumbor"],
"tags": ["type=edge,branch=main", "type=raw,value=local", "type=sha"]
},
"push": false
}
},
"publish-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
Expand Down
11 changes: 0 additions & 11 deletions apps/openchallenges/zipkin/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,6 @@
"command": "docker/openchallenges/serve-detach.sh openchallenges-zipkin"
}
},
"build-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
"context": "apps/openchallenges/zipkin",
"metadata": {
"images": ["ghcr.io/sage-bionetworks/openchallenges-zipkin"],
"tags": ["type=edge,branch=main", "type=raw,value=local", "type=sha"]
},
"push": false
}
},
"publish-image": {
"executor": "@nx-tools/nx-container:build",
"options": {
Expand Down
Loading

0 comments on commit b05e021

Please sign in to comment.