Skip to content

Commit

Permalink
PI-1648 Disable vizjs in SchemaSpy report (#2925)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-bcl authored Dec 15, 2023
1 parent dac0906 commit 0f3d58f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/schema-spy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
HOST: ${{ secrets.SCHEMA_SPY_HOST }}
PORT: ${{ secrets.SCHEMA_SPY_PORT }}
SCHEMA: ${{ secrets.SCHEMA_SPY_SCHEMA }}
USERNAME: ${{ secrets.SCHEMA_SPY_USERNAME }}
PASSWORD: ${{ secrets.SCHEMA_SPY_PASSWORD }}
DB_USERNAME: ${{ secrets.SCHEMA_SPY_USERNAME }}
DB_PASSWORD: ${{ secrets.SCHEMA_SPY_PASSWORD }}

- name: Publish HTML report
uses: JamesIves/github-pages-deploy-action@65b5dfd4f5bcd3a7403bbc2959c144256167464e # v4.5.0
Expand Down
16 changes: 13 additions & 3 deletions tools/schema-spy/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ kubectl run "$pod_name" \
"stdin": true,
"tty": true,
"securityContext": { "runAsNonRoot": true, "runAsUser": 1000 },
"resources": { "limits": { "cpu": "2000m", "memory": "8000Mi" } },
"env": [ { "name": "JAVA_TOOL_OPTIONS", "value": "-Xss1g -XX:MaxRAMPercentage=75" } ]
"resources": { "limits": { "cpu": "2000m", "memory": "2000Mi" } },
"env": [ { "name": "JAVA_TOOL_OPTIONS", "value": "-XX:MaxRAMPercentage=75" } ]
}
]
}
Expand All @@ -34,7 +34,17 @@ kubectl cp ./tools/schema-spy/ojdbc10.jar "$pod_name:/drivers_inc/ojdbc10.jar"

# Generate report
excludes='^(^Z.*$|^.*[0-9]$|^PRF_.*$|^PERF_.*$|^MIS_.*$|^.*_MV$|^.*\\$.*$|^.*TRAINING.*$|^PDT_THREAD$|^CHANGE_CAPTURE$)$'
kubectl exec "$pod_name" -- /usr/local/bin/schemaspy -db "${DB}" -host "${HOST}" -port "${PORT}" -s "${SCHEMA}" -u "${USERNAME}" -p "${PASSWORD}" -cat "${SCHEMA}" -t orathin-service -I "$excludes" -vizjs -norows -noviews
kubectl exec "$pod_name" -- /usr/local/bin/schemaspy \
-host "${HOST}" \
-port "${PORT}" \
-db "${DB}" \
-s "${SCHEMA}" \
-cat "${SCHEMA}" \
-u "${DB_USERNAME}" \
-p "${DB_PASSWORD}" \
-t orathin-service \
-I "$excludes" \
-norows -noviews -degree 1

# Download report
kubectl cp "$pod_name:/output" schema-spy-report
Expand Down

0 comments on commit 0f3d58f

Please sign in to comment.