Commit 828174e2 authored by Ali's avatar Ali

add docker and jenkins files

parent 66b4dfc9
FROM openjdk:17-jdk
WORKDIR /app
COPY jar/notificationsvc-0.0.1-SNAPSHOT.jar /app/notificationsvc-0.0.1-SNAPSHOT.jar
CMD ["java", "-jar", "notificationsvc-0.0.1-SNAPSHOT.jar"]
\ No newline at end of file
pipeline {
agent {
label 'localhost_Agent'
}
tools {
jdk 'Java17'
maven 'Maven3'
}
environment {
APP_NAME = "jobseekersvc"
RELEASE = "1.0.0"
DOCKER_REGISTRY_URL = "http://172.29.3.41:5000"
IMAGE_NAME = "172.29.3.41:5000/${APP_NAME}:${RELEASE}.${BUILD_NUMBER}"
}
stages {
stage('Cleanup Workspace') {
steps {
cleanWs()
}
}
stage('Checkout from SCM') {
steps {
git branch: 'master', credentialsId: 'gitLab', url: 'https://git.hiast.edu.sy/abdullh.alsoleman/notificationsvc.git'
}
}
stage("Build & Push Docker Image") {
steps {
script {
def dockerImage = docker.build("${IMAGE_NAME}")
dockerImage.push()
}
}
}
}
}
Markdown is supported
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