Commit 04283c85 authored by Muhammad Suleman's avatar Muhammad Suleman

Add new file

parent b9ae38d2
pipeline {
agent any
stages {
stage('Checkout') {
steps {
checkout scm
}
}
stage('Build and Create Docker Image') {
steps {
sh 'npm install'
sh 'npm run build'
sh 'docker build -t your-image-name:tag .'
}
}
stage('Push Docker Image to Docker Hub') {
steps {
withCredentials([usernamePassword(credentialsId: 'docker-hub-credentials', usernameVariable: 'sulemantalpur6', passwordVariable: 'Talpur226##')]) {
sh "docker login -u $DOCKER_HUB_USERNAME -p $DOCKER_HUB_PASSWORD"
sh "docker push your-image-name:tag" }
}
}
}
}
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