Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-46406

Broken build still merged into origin/master

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • Windows 2008 R2 Standard 64-bit
      Jenkins 2.32.3 as a Windows service
      Pretested-Integration v2.4.1
      GitSwarm EE (based on GitLab 8.14.10-ee)

      This is likely my own configuration / misunderstanding issue and may possibly be an issue using GitSwarm EE.

      In a sample Pretested-Integration repo containing HelloWorld.java/HelloWorld2.java files and gradle configuration files I have committed source with a known fatal build issue (redefinition of a final variable) to a */ready/ branch to test the results of the plugin's ability to compile and terminate without pushing to the origin.

      In my test the code was pushed to **/ready/VA-Test006 then a merge request was issued.

      The build shows the failure, but I still find the source change in the origin/master branch when I examine the commits in the UI and when I clone to a new local repo.

      The plugin appears to see the build failure and skip the post-build step:
      [PREINT] Build result not satisfied - skipped post-build step.

      So I am unclear how I have managed to get the code into the origin/master. I am new to git so it is also possible that I am using terms loosely. Please let me know where I have been unclear.

       

      Started by an SCM change
      [EnvInject] - Loading node environment variables.
      Building remotely on SJ-Build03 (VAM Audio) in workspace D:\Jenkins\workspace\Pretested-Integration2
      Wiping out workspace first.
      Cloning the remote Git repository
      Cloning repository git@<project_root>/Pretested-Integration.git
       > C:\Program Files\Git\bin\git.exe init D:\Jenkins\workspace\Pretested-Integration2 # timeout=10
      Fetching upstream changes from git@<project_root>/Pretested-Integration.git
       > C:\Program Files\Git\bin\git.exe --version # timeout=10
      using GIT_SSH to set credentials The C:\Users\build\.ssh\id_rsa SJC-Jenkins02
       > C:\Program Files\Git\bin\git.exe fetch --tags --progress git@<project_root>/Pretested-Integration.git +refs/heads/:refs/remotes/origin/
       > C:\Program Files\Git\bin\git.exe config remote.origin.url git@<project_root>/Pretested-Integration.git # timeout=10
       > C:\Program Files\Git\bin\git.exe config --add remote.origin.fetch +refs/heads/:refs/remotes/origin/ # timeout=10
       > C:\Program Files\Git\bin\git.exe config remote.origin.url git@<project_root>/Pretested-Integration.git # timeout=10
      Pruning obsolete local branches
      Fetching upstream changes from git@<project_root>/Pretested-Integration.git
      using GIT_SSH to set credentials The C:\Users\build\.ssh\id_rsa SJC-Jenkins02
       > C:\Program Files\Git\bin\git.exe fetch --tags --progress git@<project_root>/Pretested-Integration.git +refs/heads/:refs/remotes/origin/ --prune
      Seen branch in repository origin/VA-Test001
      Seen branch in repository origin/master
      Seen branch in repository origin/ready/VA-Test002
      Seen branch in repository origin/ready/VA-Test006
      Seen 4 remote branches
      Checking out Revision 33c56944ce6680ed570e936f214b4df4f90143db (origin/ready/VA-Test006)
       > C:\Program Files\Git\bin\git.exe config core.sparsecheckout # timeout=10
       > C:\Program Files\Git\bin\git.exe checkout -f 33c56944ce6680ed570e936f214b4df4f90143db
      First time build. Skipping changelog.
      [PREINT]  Pretested Integration Plugin v2.4.1 (409ae)
      [PREINT] Checking out integration branch master:
       > C:\Program Files\Git\bin\git.exe config core.sparsecheckout # timeout=10
       > C:\Program Files\Git\bin\git.exe checkout -f origin/master
       > C:\Program Files\Git\bin\git.exe branch -a -v --no-abbrev # timeout=10
       > C:\Program Files\Git\bin\git.exe checkout -b master origin/master
      Fetching upstream changes from origin
       > C:\Program Files\Git\bin\git.exe config --get remote.origin.url # timeout=10
      using GIT_SSH to set credentials The C:\Users\build\.ssh\id_rsa SJC-Jenkins02
       > C:\Program Files\Git\bin\git.exe fetch -t git@<project_root>/Pretested-Integration.git refs/heads/master # timeout=10
       > C:\Program Files\Git\bin\git.exe rev-parse "origin/master^{commit}" # timeout=10
       > C:\Program Files\Git\bin\git.exe merge eaefcf921334282fe3cc5727ebfab4c23fde7bcd # timeout=10
       > C:\Program Files\Git\bin\git.exe merge --ff-only 33c56944ce6680ed570e936f214b4df4f90143db # timeout=10
      [PREINT] FF merge successful.
      [Gradle] - Launching build.
      [Pretested-Integration2] $ cmd.exe /C "D:\Jenkins\tools\hudson.plugins.gradle.GradleInstallation\Gradle_3.3\bin\gradle.bat build -x test && exit %%ERRORLEVEL%%"
      :compileJavaD:\Jenkins\workspace\Pretested-Integration2\src\main\java\com\domain\HelloWorld2.java:7: error: illegal start of expression
            private final int tempValue = 100;
            ^
      D:\Jenkins\workspace\Pretested-Integration2\src\main\java\com\domain\HelloWorld2.java:8: error: illegal start of expression
            private final int tempValue2 = 10;
            ^
      D:\Jenkins\workspace\Pretested-Integration2\src\main\java\com\domain\HelloWorld2.java:12: error: illegal start of expression
            private final int val = 1;
            ^
      3 errors
       FAILED

      FAILURE: Build failed with an exception.

      * What went wrong:
      Execution failed for task ':compileJava'.
      > Compilation failed; see the compiler error output for details.

      * Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

      BUILD FAILED

      Total time: 5.819 secs
      Build step 'Invoke Gradle script' changed build result to FAILURE
      Build step 'Invoke Gradle script' marked build as failure
      Archiving artifacts
      [PREINT] Performing pre-verified post build steps
      [PREINT] Build result not satisfied - skipped post-build step.
      [BFA] Scanning build for known causes...
      [BFA] No failure causes found
      [BFA] Done. 0s
      Started calculate disk usage of build
      Finished Calculation of disk usage of build in 0 seconds
      Started calculate disk usage of workspace
      Finished Calculation of disk usage of workspace in 0 seconds
      Notifying upstream projects of job completion
      Finished: FAILURE

       

            praqma Praqma Support
            tgreer Tom Greer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: