Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
examsAndAdmissions
Commits
0153e2b4
Unverified
Commit
0153e2b4
authored
1 year ago
by
vky25
Committed by
GitHub
1 year ago
Browse files
Options
Download
Patches
Plain Diff
Create Jenkinsfile
parent
8d7c1465
development
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Jenkinsfile
+42
-0
Jenkinsfile
with
42 additions
and
0 deletions
+42
-0
Jenkinsfile
0 → 100644
+
42
−
0
View file @
0153e2b4
pipeline
{
agent
any
environment
{
GCR_REGISTRY
=
"asia.gcr.io/upsmf-368011"
IMAGE_NAME
=
"examsandadmissions-be-uat"
BRANCH_NAME
=
"main"
IMAGE_TAG
=
"1.0"
}
stages
{
stage
(
'Clone Repository'
)
{
steps
{
git
branch:
'main'
,
url:
'https://github.com/UPHRH-platform/examsAndAdmissions.git'
}
}
stage
(
'Build Artifact'
)
{
steps
{
sh
'mvn clean install -DskipTests'
}
}
stage
(
'Build Docker Image'
)
{
steps
{
script
{
def
dockerTag
=
"${IMAGE_TAG}-${env.BUILD_NUMBER}"
def
dockerImage
=
docker
.
build
(
"${GCR_REGISTRY}/${IMAGE_NAME}:${dockerTag}"
)
}
}
}
stage
(
'Push to GCR'
)
{
steps
{
script
{
def
dockerTag
=
"${IMAGE_TAG}-${env.BUILD_NUMBER}"
sh
"docker push ${GCR_REGISTRY}/${IMAGE_NAME}:${dockerTag}"
}
}
}
}
}
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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
Menu
Explore
Projects
Groups
Topics
Snippets