Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Team6-Digital Insight for Health
Manage
Activity
Members
Labels
Plan
Issues
12
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Chen Liang
Team6-Digital Insight for Health
Commits
44b7ed4c
Commit
44b7ed4c
authored
1 month ago
by
Burhan Akbar
Browse files
Options
Downloads
Patches
Plain Diff
Save local changes before switching branches
parent
8fb362fd
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/main/Jenkinsfile.groovy
+47
-0
47 additions, 0 deletions
src/main/Jenkinsfile.groovy
src/main/resources/application.yml
+5
-5
5 additions, 5 deletions
src/main/resources/application.yml
src/main/resources/schema.sql
+22
-17
22 additions, 17 deletions
src/main/resources/schema.sql
with
74 additions
and
22 deletions
src/main/Jenkinsfile.groovy
0 → 100644
+
47
−
0
View file @
44b7ed4c
pipeline
{
agent
{
label
'your-agent-label'
// Replace with your agent's label
}
stages
{
stage
(
'Checkout'
)
{
steps
{
git
credentialsId:
'your-repo-credentials'
,
url:
'your-repo-url'
}
}
stage
(
'Build'
)
{
steps
{
sh
'./gradlew clean build'
}
}
stage
(
'Test'
)
{
steps
{
sh
'./gradlew test'
}
}
stage
(
'Database Migration'
)
{
steps
{
sh
'./migrate_db.sh'
}
}
stage
(
'Deploy'
)
{
steps
{
sh
'pkill -f \'java -jar\''
sh
'nohup java -jar build/libs/HealthCare-0.0.1-SNAPSHOT.jar --server.port=8081 > app.log 2>&1 &'
}
}
}
post
{
always
{
echo
"Pipeline finished"
}
success
{
echo
"Pipeline succeeded"
}
failure
{
echo
"Pipeline failed"
mail
to:
'your-email@example.com'
,
subject:
"Jenkins Pipeline Failed"
,
body:
"The pipeline ${env.JOB_NAME} build ${env.BUILD_NUMBER} failed."
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/main/resources/application.yml
+
5
−
5
View file @
44b7ed4c
server
:
port
:
808
0
port
:
808
1
spring
:
profiles
:
active
:
dev
datasource
:
url
:
${
healthcare
.datasource.url}
username
:
${healthcare.datasource.username}
password
:
${healthcare.datasource.password}
port
:
${healthcare.datasource.port}
url
:
jdbc:mysql://localhost:3306/
health
_
care
username
:
root
password
:
root
port
:
3306
sql
:
init
:
schema-locations
:
classpath:schema.sql
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/schema.sql
+
22
−
17
View file @
44b7ed4c
...
...
@@ -14,9 +14,9 @@
Date: 09/12/2024 17:20:20
*/
CREATE
DATABASE
IF
NOT
EXISTS
healthcare
;
CREATE
DATABASE
IF
NOT
EXISTS
health_care
;
USE
health_care
;
USE
healthcare
;
SET
NAMES
utf8mb4
;
SET
FOREIGN_KEY_CHECKS
=
0
;
...
...
@@ -66,22 +66,23 @@ CREATE TABLE `device` (
-- Table structure for hospital
-- ----------------------------
DROP
TABLE
IF
EXISTS
`hospital`
;
CREATE
TABLE
`hospital`
(
CREATE
TABLE
`hospital`
(
`id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
`name`
varchar
(
255
)
CHARACTER
SET
utf8mb3
COLLATE
utf8mb3_general_ci
NULL
DEFAULT
NULL
,
`amountPatient`
int
(
11
)
NULL
DEFAULT
NULL
,
`maxAmount`
int
(
11
)
NULL
DEFAULT
NULL
,
`type`
varchar
(
255
)
CHARACTER
SET
utf8mb3
COLLATE
utf8mb3_general_ci
NULL
DEFAULT
NULL
,
`address`
varchar
(
255
)
CHARACTER
SET
utf8mb3
COLLATE
utf8mb3_general_ci
NULL
DEFAULT
NULL
,
`phone`
varchar
(
255
)
CHARACTER
SET
utf8mb3
COLLATE
utf8mb3_general_ci
NULL
DEFAULT
NULL
,
`status`
int
(
11
)
NULL
DEFAULT
NULL
,
`roleId`
int
(
11
)
NULL
DEFAULT
NULL
,
`email`
varchar
(
255
)
CHARACTER
SET
utf8mb3
COLLATE
utf8mb3_general_ci
NULL
DEFAULT
NULL
,
`password`
varchar
(
255
)
CHARACTER
SET
utf8mb3
COLLATE
utf8mb3_general_ci
NULL
DEFAULT
NULL
,
`patientId`
int
(
11
)
NULL
DEFAULT
NULL
,
`deviceId`
int
(
11
)
NULL
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
3
CHARACTER
SET
=
utf8mb3
COLLATE
=
utf8mb3_general_ci
ROW_FORMAT
=
Dynamic
;
`name`
varchar
(
255
)
CHARACTER
SET
utf8mb3
COLLATE
utf8mb3_general_ci
DEFAULT
NULL
,
`amountPatient`
int
(
11
)
DEFAULT
NULL
,
`maxAmount`
int
(
11
)
DEFAULT
NULL
,
`type`
varchar
(
255
)
CHARACTER
SET
utf8mb3
COLLATE
utf8mb3_general_ci
DEFAULT
NULL
,
`address`
varchar
(
255
)
CHARACTER
SET
utf8mb3
COLLATE
utf8mb3_general_ci
DEFAULT
NULL
,
`phone`
varchar
(
255
)
CHARACTER
SET
utf8mb3
COLLATE
utf8mb3_general_ci
DEFAULT
NULL
,
`status`
int
(
11
)
DEFAULT
NULL
,
`roleId`
int
(
11
)
DEFAULT
NULL
,
`email`
varchar
(
255
)
CHARACTER
SET
utf8mb3
COLLATE
utf8mb3_general_ci
DEFAULT
NULL
,
`password`
varchar
(
255
)
CHARACTER
SET
utf8mb3
COLLATE
utf8mb3_general_ci
DEFAULT
NULL
,
`patientId`
int
(
11
)
DEFAULT
NULL
,
`deviceId`
int
(
11
)
DEFAULT
NULL
,
`approval_status`
varchar
(
20
)
DEFAULT
'PENDING'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
3
DEFAULT
CHARSET
=
utf8mb3
COLLATE
=
utf8mb3_general_ci
ROW_FORMAT
=
DYNAMIC
;
-- ----------------------------
-- Table structure for hospital_device
...
...
@@ -157,4 +158,8 @@ CREATE TABLE `super_admin` (
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
2
CHARACTER
SET
=
utf8mb3
COLLATE
=
utf8mb3_general_ci
ROW_FORMAT
=
Dynamic
;
UPDATE
hospital
SET
approval_status
=
'APPROVED'
WHERE
id
=
1
;
SET
FOREIGN_KEY_CHECKS
=
1
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment