Skip to content
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

Specify git revision #16

Merged
merged 3 commits into from
Jul 16, 2015
Merged

Conversation

exi
Copy link
Contributor

@exi exi commented Jul 24, 2014

This pull request fixes #15 by explicitly telling the jenkins git plugin which sha1 to build.

@ghusse
Copy link

ghusse commented Apr 21, 2015

I'm having the same problem, is it possible to merge this pull request?

It's very annoying that Jenkins is not building the right branch when testing PRs!

@nishio-dens
Copy link
Owner

I'm sorry to my late response.
I checked this PR but I cannot compile it in my environments.

[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5:compile (default-compile) @ bitbucket-pullrequest-builder ---
Downloading: http://repo.jenkins-ci.org/public/org/apache/maven/maven-toolchain/1.0/maven-toolchain-1.0.jar
Downloaded: http://repo.jenkins-ci.org/public/org/apache/maven/maven-toolchain/1.0/maven-toolchain-1.0.jar (33 KB at 50.5 KB/sec)
[INFO] Compiling 1 source file to /Users/nishio/Projects/workspace/bitbucket-pullrequest-builder/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/nishio/Projects/workspace/bitbucket-pullrequest-builder/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuildTrigger.java:[126,136] エラー: シンボルを見つけられません
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.004 s
[INFO] Finished at: 2015-06-02T23:49:06+09:00
[INFO] Final Memory: 28M/124M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5:compile (default-compile) on project bitbucket-pullrequest-builder: Compilation failure
[ERROR] /Users/nishio/Projects/workspace/bitbucket-pullrequest-builder/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuildTrigger.java:[126,136] エラー: シンボルを見つけられません
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

line 126 is

return this.job.scheduleBuild2(0, cause, new ParametersAction(new ArrayList(values.values())), new RevisionParameterAction(cause.getCommitHash()));

and,
"エラー: シンボルを見つけられません" means Symbol not found.

@exi
Copy link
Contributor Author

exi commented Jun 2, 2015

I'll look into it when I get back from my vacation

-----Original Message-----
From: "S.Nishio" notifications@github.com
To: nishio-dens/bitbucket-pullrequest-builder-plugin bitbucket-pullrequest-builder-plugin@noreply.github.com
Cc: Reno Reckling reno.reckling@mayflower.de
Sent: Tue, 02 Jun 2015 8:01
Subject: Re: [bitbucket-pullrequest-builder-plugin] Specify git revision (#16)

I'm sorry to my late response.
I checked this PR but I cannot compile it in my environments.

[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5:compile (default-compile) @ bitbucket-pullrequest-builder ---
Downloading: http://repo.jenkins-ci.org/public/org/apache/maven/maven-toolchain/1.0/maven-toolchain-1.0.jar
Downloaded: http://repo.jenkins-ci.org/public/org/apache/maven/maven-toolchain/1.0/maven-toolchain-1.0.jar (33 KB at 50.5 KB/sec)
[INFO] Compiling 1 source file to /Users/nishio/Projects/workspace/bitbucket-pullrequest-builder/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/nishio/Projects/workspace/bitbucket-pullrequest-builder/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuildTrigger.java:[126,136] エラー: シンボルを見つけられません
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.004 s
[INFO] Finished at: 2015-06-02T23:49:06+09:00
[INFO] Final Memory: 28M/124M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5:compile (default-compile) on project bitbucket-pullrequest-builder: Compilation failure
[ERROR] /Users/nishio/Projects/workspace/bitbucket-pullrequest-builder/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuildTrigger.java:[126,136] エラー: シンボルを見つけられません
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

line 126 is

return this.job.scheduleBuild2(0, cause, new ParametersAction(new ArrayList(values.values())), new RevisionParameterAction(cause.getCommitHash()));

and,
"エラー: シンボルを見つけられません" means Symbol not found.


Reply to this email directly or view it on GitHub:
#16 (comment)

@ghusse
Copy link

ghusse commented Jul 15, 2015

Hello,

I experience this very annoying issue on a daily basis: sometimes Jenkins builds the wrong branch and the build fails / passes because of the code on another branch. This is really annoying because we cannot rely on Jenkins to validate pull requests!

Is it possible to take a look at this issue?

Thanks

@exi
Copy link
Contributor Author

exi commented Jul 15, 2015

@ghusse @nishio-dens
It weird, i just checked out this branch again and it builds without issues for me.
I just ran "mvn package" and out comes a working package.

@exi
Copy link
Contributor Author

exi commented Jul 15, 2015

maybe you are missing some dependencies, but i think maven should take care of this automatically

@ghusse
Copy link

ghusse commented Jul 15, 2015

Does it work as expected?

@exi
Copy link
Contributor Author

exi commented Jul 15, 2015

We are using it in production for 6 months now. Works as expected

On Jul 15, 2015, 15:28, at 15:28, Guillaume Gautreau notifications@github.com wrote:

Does it work as expected?


Reply to this email directly or view it on GitHub:
#16 (comment)

@exi
Copy link
Contributor Author

exi commented Jul 16, 2015

Is there any reason to now have this merged? @nishio-dens

@nishio-dens
Copy link
Owner

@exi Oh, I'm sorry.
I'm trying to compile your pr in another environments, It's no problem.
(my environments is something wrong...)

nishio-dens added a commit that referenced this pull request Jul 16, 2015
@nishio-dens nishio-dens merged commit 5ce7591 into nishio-dens:master Jul 16, 2015
@nishio-dens
Copy link
Owner

I will fix this PR a little because BitbucketCause.commitHash method is not exists in the latest source code.

@ghusse
Copy link

ghusse commented Jul 16, 2015

Great !

Please let us know when you're releasing a new version with this fix! Can't wait for it :)

damovsky added a commit that referenced this pull request Feb 22, 2017
Upgrading parent pom org.jenkins-ci.plugins to version 2.11.
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.

Plugin is sometimes checking out the wrong branch
3 participants