Unverified Commit 0153e2b4 authored by vky25's avatar vky25 Committed by GitHub
Browse files

Create Jenkinsfile

No related merge requests found
Showing with 42 additions and 0 deletions
+42 -0
Jenkinsfile 0 → 100644
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}"
}
}
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment