Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Issue with running this Pipeline Shared Library
class GitTool extends StepsBase {
def GitTool(steps) {
def runSh(script, returnStdout = false) {
def output = script, returnStdout: returnStdout)
return output.toString()
def commitGitChanges(String path, String message, String gitEmail='sunflower@sunflower-build-bot.local', String gitName='sunflower-build-bot') {
def git_cmd
steps.dir(path) {
runSh("git config --local '${gitEmail}'".toString())
runSh("git config --local '${gitName}'".toString())
runSh('git add -A')
git_cmd = runSh("git commit --message '${message}'".toString(), true)
return git_cmd
class StepsBase implements Serializable{
def steps
StepsBase(steps=null) {
this.steps = steps
def log(message) {
if (this.steps) {
} else {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment