Skip to content

Support Jenkins2 pipeline #97

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 20, 2017

Conversation

frodeaa
Copy link
Contributor

@frodeaa frodeaa commented Aug 5, 2016

Replace use of AbstractProject with Job to fix ClassCastException thrown when using the plugin in a pipeline job

Note The previous behaviour to skip the build if the project was disabled is currently not implemented. The Job class does not have the method AbstractProject.isDisabled(), so it remains to find an alternative way to do the check...

Fixes #94

@damovsky
Copy link
Collaborator

damovsky commented Jan 2, 2017

Helo, any change? are you going to merge this PR?
Thanks!
Martin

@damovsky
Copy link
Collaborator

damovsky commented Jan 9, 2017

Hi,
thanks for this fix! I tried locally...now I can run the build on new PRs. But I found a new issue:

The problem is following:

  • when there is a new PR in bitbucket, the plugin execute the build
  • it updates the PR with information saying "Build in progress"
  • BUG: when build finishes, the plugin should update PR with info "build failed" or "build success"....but this not happen. Plugin does not update the PR after completed build....

Do you know how to fix it?
Martin

@ccamp46
Copy link

ccamp46 commented Feb 7, 2017

Is the Build Status supposed to be updated in bitbucket? I am getting this even for a success build:

image

@frodeaa
Copy link
Contributor Author

frodeaa commented Feb 12, 2017

confirmed the issue with updating the PR build status after the build completes

@frodeaa
Copy link
Contributor Author

frodeaa commented Feb 12, 2017

problem is caused by BitbucketBuildListener, the extension will not be invoked on pipeline jobs

Copy link
Collaborator

@damovsky damovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @frodeaa
can you, please, rebase your branch to resolve the conflicts?

I'd like to merge this PR and make a new release ASAP :-)
Martin

Frode Aannevik and others added 4 commits February 20, 2017 00:16
Replace use of AbstractProject with Job to fix
ClassCastException thrown when using the plugin
in a pipeline job

The fix is "not" complete, it remains to find a
replacement to the call AbstractProject.isDisabled
used to decide if the build should be skipped
Previously called in BitbucketBuildTrigger.run()

fixes nishio-dens#94
looks like pipeline jobs don't have a disable option
BitbucketBuildListener was not invoked on
pipeline jobs

Change BitbucketBuildListener to extend from
RunListener<Run<?, ?>> so it will invoked to
update job description and PR build result
@frodeaa frodeaa force-pushed the jenkins2-pipeline-support-94 branch from d160d97 to 0debdfb Compare February 19, 2017 23:20
@frodeaa
Copy link
Contributor Author

frodeaa commented Feb 19, 2017

@damovsky rebase done

@damovsky damovsky merged commit d7700dc into nishio-dens:master Feb 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

not compatible with jenkins2
4 participants