boolean processGit()

in resources/repositories/cluster-mgmt.git/stages/Helmfile.groovy [35:51]


    boolean processGit(context, buildUser, helmValuesPath) {
        boolean isChanged = false
        script.sshagent([context.git.credentialsId]) {
            if (script.sh(script: "git diff", returnStdout: true)) {
                isChanged = true
                script.sh "git config --global user.email ${context.git.autouser}@epam.com " +
                        "&& git config --global user.name ${context.git.autouser} " +
                        "&& git add ${helmValuesPath}" +
                        "&& gitdir=\$(git rev-parse --git-dir); scp -p -P ${context.git.sshPort} ${context.git.autouser}@${context.git.host}:hooks/commit-msg \${gitdir}/hooks/ " +
                        "&& git commit -a --allow-empty -m 'Remove section consoleVersions from values.yaml. " +
                        "Started by ${buildUser}'" +
                        "&& git push origin HEAD:${context.git.branch}"

            }
        }
        return isChanged
    }