Praqma / pretested-integration-plugin

A generic pretest commit plugin for Jenkins CI
MIT License
7 stars 14 forks source link

Some of the last errors I see as a user in the Jenkins Console log is misleading - it's not a build failure #120

Open buep opened 6 years ago

buep commented 6 years ago

In this specific use-case it was an integration failure, so why are we even running the build? That was never done in earlier versions of the plugin. If we can't integrate, we don't need to run any build steps.

Some logic must have been switched around.

10:48:05 [PREINT] Starting squash merge - without commit:
10:48:05 [PREINT]  merge --squash origin/ready/69-fixing-wording-again
10:48:05  > git merge --squash dbb33e7a747ab1a435c5786285db5df7fe5ef507 # timeout=10
10:48:05 [PREINT] Exception while merging. Logging exception msg: Command "git merge --squash dbb33e7a747ab1a435c5786285db5df7fe5ef507" returned status code 1:
10:48:05 stdout: Auto-merging _pages/gatherings.md
10:48:05 CONFLICT (content): Merge conflict in _pages/gatherings.md
10:48:05 Squash commit -- not updating HEAD
10:48:05 Automatic merge failed; fix conflicts and then commit the result.
10:48:05 
10:48:05 stderr: 
10:48:05 [PREINT]  - setUp() - IntegrationFailedException - Merge failure
10:48:05  > git config core.sparsecheckout # timeout=10
10:48:05  > git checkout -f origin/master
10:48:05  > git branch -a -v --no-abbrev # timeout=10
10:48:05  > git branch -D master # timeout=10
10:48:05  > git checkout -b master origin/master
10:48:05  > git config core.sparsecheckout # timeout=10
10:48:05  > git checkout -f origin/ready/69-fixing-wording-again
10:48:05 Checking out Revision dbb33e7a747ab1a435c5786285db5df7fe5ef507 (origin/ready/69-fixing-wording-again)
10:48:05  > git config core.sparsecheckout # timeout=10
10:48:05  > git checkout -f dbb33e7a747ab1a435c5786285db5df7fe5ef507
10:48:05 Commit message: "Close #69 again again fixing wording"
10:48:05 First time build. Skipping changelog.
10:48:05 No emails were triggered.
10:48:06 [Web_alliance.praqma.com-integrate] $ /bin/sh -xe /tmp/jenkins185455640963876181.sh
10:48:06 + git log --decorate --oneline --graph master..origin/ready/69-fixing-wording-again
10:48:06 + tee git_graph.txt
10:48:06 * dbb33e7 (HEAD, origin/ready/69-fixing-wording-again) Close #69 again again fixing wording
10:48:06 * aad8c81 Close #69 again fixing wording
10:48:06 + git log --pretty=format:%ae -1
10:48:06 + export GIT_AUTHOR_COMMITTER=bue@praqma.net
10:48:06 + + grep -e ^GIT
10:48:06 env
10:48:06 [EnvInject] - Injecting environment variables from a build step.
10:48:06 [EnvInject] - Injecting as environment variables the properties file path 'git.env'
10:48:06 [EnvInject] - Variables injected successfully.
10:48:06 [Web_alliance.praqma.com-integrate] $ /bin/sh -xe /tmp/jenkins5662330383912220420.sh
10:48:06 + tee jekyll_build.txt
10:48:06 + id -u
10:48:06 + id -g
10:48:06 + pwd
10:48:06 + docker run --rm -u 1000:1000 -v /home/ubuntu/workspace/workspace/Web_alliance.praqma.com-integrate:/srv/jekyll -w /srv/jekyll praqma/jekyll:0.4 jekyll build --unpublished
10:48:07 Configuration file: /srv/jekyll/_config.yml
10:48:07             Source: /srv/jekyll
10:48:07        Destination: /srv/jekyll/_site
10:48:07  Incremental build: disabled. Enable with --incremental
10:48:07       Generating... 
10:48:10                     done in 2.819 seconds.
10:48:10  Auto-regeneration: disabled. Use --watch to enable.
10:48:10 Archiving artifacts
10:48:11 Checking console output
10:48:11 [PREINT] Found credentials
10:48:11 [PREINT] Build result not satisfied - skipped post-build step.
MichaelDepner commented 6 years ago

I'm seeing the same thing. It looks like the stage is not marked as failing, but the build is. So everything continues and the build is marked as red in the end, instead of being interrupted.

MichaelDepner commented 6 years ago

Praqma.com pipeline has seemingly the same issue. Merge conflict, pretested fails, build keeps going https://jenkins.praqma.cloud/job/Web_www.praqma.com-integrate/837/console

buep commented 6 years ago

My best guess is it is the continuously re-triggering is related to the git scm plugin, as the pretested plugin first get control later in the process when the polling is done and the job started.

The log messages, though could definitely be better it seems.