Skip to content

Commit

Permalink
Update Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Divya4242 authored Mar 27, 2024
1 parent 23c4cd2 commit 144cf56
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ pipeline {
steps {
// Checkout the source code from your Git repository
script {
// Checkout to tag
// def tag = 'v36'
// if you want to Checkout to tag USE this.
// def Specifictag = 'v36' if you want to checkout to specific tag uncomment this and change to [name: "refs/tags/${Specifictag}"]],.
def latestTag = sh(script: 'git describe --tags $(git rev-list --tags --max-count=1)', returnStdout: true).trim()
checkout([$class: 'GitSCM', branches: [[name: "refs/tags/${latestTag}"]], userRemoteConfigs: [[url: 'https://github.com/Divya4242/React-Node-Docker-Project-CICD-JENKINS-EC2-PUBLIC.git']]])
// CHeckout to branch
// if you want to Checkout to branch USE this.
// git branch: 'main', url: 'https://github.com/Divya4242/React-Node-Docker-Project-CICD-JENKINS-EC2-PUBLIC.git', credentialsId: 'github-id' // Provide your Git credentials ID here
}
}
Expand Down

0 comments on commit 144cf56

Please sign in to comment.