Skip to content

Commit

Permalink
checkout to before commit for working code
Browse files Browse the repository at this point in the history
Signed-off-by: Divya Madala <divyaasm@amazon.com>
  • Loading branch information
Divyaasm committed Mar 7, 2024
1 parent ad92097 commit 5510fcf
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions jenkins/release/release-branch.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,11 @@ pipeline {
echo "Branch already exists"
continue
}
}
dir("opensearch-build") {
checkout([$class: 'GitSCM', branches: [[name: "oncall"]], userRemoteConfigs: [[url: "https://github.com/Divyaasm/opensearch-build.git"]]])
dir(component) {
checkout([$class: 'GitSCM', branches: [[name: SOURCE_BRANCH]], userRemoteConfigs: [[url: repoUrl]]])

sh "git checkout -b $TARGET_BRANCH"
sh "git push origin $TARGET_BRANCH"
}
}
}
}
Expand Down

0 comments on commit 5510fcf

Please sign in to comment.