Context:
featureBranchhas been forked fromsprintBranchand now needs to be merged into itfile[A-C]where changed infeatureBranchcreating a conflict withsprintBranchchanges from
featureBranchare to be keptafter a merge of
sprintBranchintofeatureBranch(no files were changed insprintBranchpipelines in jenkins have started to fail$ git log commit ce90629c1f6a796a9e1b9ebf9f03641ecffeeabd (HEAD -> featureBranch, origin/featureBranch) Merge: f261cec59 dca640165 Author: userA Date: Wed Aug 3
Merge remote-tracking branch 'sprintBranch' into 'featureBranch' # Conflicts: # code/fileA # code/fileB # code/fileC commit f261cec591f05979c769c272ef2cba135414a6e9 Author: userB Date: Wed Aug 3 Commit msg #1 commit e22e68756637ed7e628a2de6e45bf8b36f5a5127 Author: userB Date: Tue Aug 2 Commit msg #2
After conflicts were resolved and a push was made to origin/featureBranch even though there were no changes, the following occurs on jenkins that uses the following pipeline:
Nodes.node(this, "name", "proj") { podLabel ->
node(podLabel) {
try {
stage('Checkout') {
cleanWs()
checkout scm
}
LongCommitID = sh(returnStdout: true, script: "git rev-parse HEAD").trim()
SdkNotifier.buildStarted("bitbucketURL",
credentials,
LongCommitID,
BitbucketAccessToken)
producing:
hudson.remoting.ProxyException: groovy.lang.MissingPropertyException: No such property: LongCommitID for class: WorkflowScript
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:66)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:471)
at org.kohsuke.groovy.sandbox.impl.Checker$7.call(Checker.java:355)
at org.kohsuke.groovy.sandbox.GroovyInterceptor.onGetProperty(GroovyInterceptor.java:68)
at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onGetProperty(SandboxInterceptor.java:313)
Running locally we get the HEAD correctly.
$ git rev-parse HEAD
ce90629c1f6a796a9e1b9ebf9f03641ecffeeabd
If the files that are in conflict in the current branch that is to be merged into another, are left unchanged in the current branch, where are they being pushed to? The target branch, right?