Skip to content

Commit 2a25572

Browse files
authored
Merge pull request #293 from holashchand/sql-server-support
[FEAT]: Added microsoft sql server database support
2 parents ab7ea6c + 83286a0 commit 2a25572

File tree

15 files changed

+395
-303
lines changed

15 files changed

+395
-303
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ ENABLE_AUTH=false
2525

2626
# credential service
2727
IDENTITY_BASE_URL=http://identity:3332
28-
SCHEMA_BASE_URL=http://schema:3333
28+
SCHEMA_BASE_URL=http://credential-schema:3333
2929
CREDENTIAL_SERVICE_BASE_URL=https://example.com/credentials
3030
JWKS_URI=
3131
ENABLE_AUTH=false

.github/workflows/maven.yml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,34 @@ jobs:
1313
build:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
- name: Set up JDK 11
18-
uses: actions/setup-java@v3
18+
uses: actions/setup-java@v4
1919
with:
2020
java-version: '11'
2121
distribution: 'adopt'
2222
cache: 'maven'
2323
- name: Set up properties
2424
run: sh configure-dependencies.sh
25-
# # debug step
26-
# - name: Setup upterm session
27-
# uses: lhotari/action-upterm@v1
28-
# with:
29-
# ## limits ssh access and adds the ssh public key for the user which triggered the workflow ie Sreejith-K
30-
# limit-access-to-actor: true
25+
- name: Check space before free up the space
26+
run: df -h
27+
- name: Free up space
28+
run: |
29+
sudo rm -rf /usr/share/dotnet
30+
sudo rm -rf /usr/local/lib/android
31+
sudo rm -rf /usr/local/.ghcup/ghc/9.6.4
32+
- name: Check space before tests
33+
run: df -h
34+
# debug step
35+
# - name: Setup upterm session
36+
# uses: lhotari/action-upterm@v1
37+
# with:
38+
# ## limits ssh access and adds the ssh public key for the user which triggered the workflow ie holashchand
39+
# limit-access-to-actor: true
3140
- name: Build and test
3241
run: make test
42+
- name: Check space after tests
43+
run: df -h
3344
# test:
3445
# runs-on: ubuntu-latest
3546
# steps:

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ java/registry/target/registry.jar: $(SOURCES)
2828

2929
test: build
3030
@docker-compose -f docker-compose-v1.yml down
31-
@rm -rf db-data* || echo "no permission to delete"
31+
@sudo rm -rf db-data* || echo "no permission to delete"
3232
# test with distributed definition manager and native search
3333
@docker-compose -f docker-compose-v1.yml --env-file test_environments/test_with_distributedDefManager_nativeSearch.env up -d db keycloak registry certificate-signer certificate-api redis
3434
@echo "Starting the test" && sh build/wait_for_port.sh 8080
@@ -37,7 +37,7 @@ test: build
3737
@curl -v http://localhost:8081/health
3838
@cd java/apitest && ../mvnw -Pe2e test
3939
@docker-compose -f docker-compose-v1.yml down
40-
@rm -rf db-data-1 || echo "no permission to delete"
40+
@sudo rm -rf db-data-1 || echo "no permission to delete"
4141
# test with kafka(async), events, notifications,
4242
@docker-compose -f docker-compose-v1.yml --env-file test_environments/test_with_asyncCreate_events_notifications.env up -d db es clickhouse redis keycloak registry certificate-signer certificate-api kafka zookeeper notification-ms metrics
4343
@echo "Starting the test" && sh build/wait_for_port.sh 8080
@@ -46,7 +46,7 @@ test: build
4646
@curl -v http://localhost:8081/health
4747
@cd java/apitest && MODE=async ../mvnw -Pe2e test
4848
@docker-compose -f docker-compose-v1.yml down
49-
@rm -rf db-data-2 || echo "no permission to delete"
49+
@sudo rm -rf db-data-2 || echo "no permission to delete"
5050
# make -C services/identity-service test
5151
# make -C services/credential-schema test
5252
# make -C services/credentials-service test

docker-compose.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ services:
8787
- signature_v2_delete_url=${SIGNATURE_V2_DELETE_URL-http://credential:3000/credentials/{id}}
8888
- signature_v2_verify_url=${SIGNATURE_V2_VERIFY_URL-http://credential:3000/credentials/{id}/verify}
8989
- signature_v2_revocation_list_url=${SIGNATURE_V2_REVOCATION_LIST_URL-http://credential:3000/credentials/revocation-list?issuerId={issuerDid}&page={page}&limit={limit}}
90-
- signature_v2_schema_health_check_url=${SIGNATURE_V2_SCHEMA_HEALTH_CHECK_URL-http://schema:3333/health}
91-
- signature_v2_schema_create_url=${SIGNATURE_V2_SCHEMA_CREATE_URL-http://schema:3333/credential-schema}
92-
- signature_v2_schema_update_url=${SIGNATURE_V2_SCHEMA_UPDATE_URL-http://schema:3333/credential-schema/{id}/{version}}
93-
- signature_v2_schema_get_by_id_and_version_url=${SIGNATURE_V2_SCHEMA_GET_BY_ID_AND_VERSION_URL-http://schema:3333/credential-schema/{id}/{version}
94-
- signature_v2_schema_search_by_tags_url=${SIGNATURE_V2_SCHEMA_GET_BY_TAGS_URL-http://schema:3333/credential-schema?tags={tags}}
90+
- signature_v2_schema_health_check_url=${SIGNATURE_V2_SCHEMA_HEALTH_CHECK_URL-http://credential-schema:3333/health}
91+
- signature_v2_schema_create_url=${SIGNATURE_V2_SCHEMA_CREATE_URL-http://credential-schema:3333/credential-schema}
92+
- signature_v2_schema_update_url=${SIGNATURE_V2_SCHEMA_UPDATE_URL-http://credential-schema:3333/credential-schema/{id}/{version}}
93+
- signature_v2_schema_get_by_id_and_version_url=${SIGNATURE_V2_SCHEMA_GET_BY_ID_AND_VERSION_URL-http://credential-schema:3333/credential-schema/{id}/{version}
94+
- signature_v2_schema_search_by_tags_url=${SIGNATURE_V2_SCHEMA_GET_BY_TAGS_URL-http://credential-schema:3333/credential-schema?tags={tags}}
9595
- sign_url=http://certificate-signer:8079/sign
9696
- verify_url=http://certificate-signer:8079/verify
9797
- sign_health_check_url=http://certificate-signer:8079/health

java/registry/pom.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,24 @@
353353
<groupId>org.postgresql</groupId>
354354
<artifactId>postgresql</artifactId>
355355
</dependency>
356+
<!-- Include this dependency for MSSQL Server support -->
357+
<dependency>
358+
<groupId>com.microsoft.sqlserver</groupId>
359+
<artifactId>mssql-jdbc</artifactId>
360+
<version>12.6.1.jre8</version>
361+
</dependency>
362+
<dependency>
363+
<groupId>org.umlg</groupId>
364+
<artifactId>sqlg-mssqlserver</artifactId>
365+
<version>2.0.2</version>
366+
<exclusions>
367+
<exclusion>
368+
<groupId>org.slf4j</groupId>
369+
<artifactId>slf4j-nop</artifactId>
370+
</exclusion>
371+
</exclusions>
372+
</dependency>
373+
<!-- End dependency for MSSQL Server support -->
356374
<dependency>
357375
<groupId>com.steelbridgelabs.oss</groupId>
358376
<artifactId>neo4j-gremlin-bolt</artifactId>

services/credential-schema/Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1-
FROM node:16 AS install
1+
FROM node:20.11.0-alpine3.18 AS install
2+
RUN apk add openssl curl
23
WORKDIR /app
34
COPY package.json yarn.lock ./
45
RUN yarn
56

6-
FROM node:16 as build
7+
FROM node:20.11.0-alpine3.18 as build
8+
RUN apk add openssl curl
79
WORKDIR /app
810
COPY prisma ./prisma/
911
COPY --from=install /app/node_modules ./node_modules
1012
RUN npx prisma generate
1113
COPY . .
1214
RUN yarn build
1315

14-
FROM node:16
16+
FROM node:20.11.0-alpine3.18
17+
RUN apk add openssl curl
1518
WORKDIR /app
1619
COPY --from=build /app/dist ./dist
1720
COPY --from=build /app/package*.json ./

services/credential-schema/Dockerfile.test

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
FROM node:16 AS install
1+
FROM node:20.11.0-alpine3.18 AS install
2+
RUN apk add openssl curl
23
WORKDIR /app
34
COPY package.json yarn.lock ./
45
RUN yarn
56

6-
FROM node:16 as test
7+
FROM node:20.11.0-alpine3.18 as test
8+
RUN apk add openssl curl
79
WORKDIR /app
810
COPY prisma ./prisma/
911
COPY --from=install /app/node_modules ./node_modules

services/credential-schema/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"@nestjs/platform-fastify": "^9.2.1",
3535
"@nestjs/swagger": "^6.1.4",
3636
"@nestjs/terminus": "^10.0.1",
37-
"@prisma/client": "4.7.1",
37+
"@prisma/client": "4.8.1",
3838
"ajv": "^8.11.2",
3939
"axios": "^1.4.0",
4040
"cache-manager": "^5.1.4",
@@ -46,7 +46,7 @@
4646
"passport": "^0.6.0",
4747
"passport-http": "^0.3.0",
4848
"passport-jwt": "^4.0.1",
49-
"prisma": "4.7.1",
49+
"prisma": "4.8.1",
5050
"reflect-metadata": "^0.1.13",
5151
"rimraf": "^3.0.2",
5252
"rxjs": "^7.2.0"

0 commit comments

Comments
 (0)