Open petemounce opened 11 years ago
Good point! I will consider this change. Thanks!
BTW. If you like, you may consider to come up with a pull request
@jonnyzzz I'd like to say I'll come up with the PR, but I've never written a line of java in my life. I could probably hack something together, but would be foundering around figuring out how to build and run tests; is there a set of guidelines to go look at? I guess IntelliJ would be a starting point...?
Let me try to describe how to start with plugin development. Initially I used Plugin Template to start with. You may take a look to the docs there as well.
I totally use IntelliJ project setup to compile, tests and generate plugin. Here is the list on how to open the plugin for development. Unfortunately, this is quite a big number of tasks. To start with, try the following steps:
Path Variable
to point to unpacked tar.gz/TeamCity
or root of .exe
installation of TeamCity. File | Project Structure -> SDKs
to point to JDK 1.6 and name it 1.6
`Build | Build Artifacts ...
menu)I checked the code. It uses the event from TeamCity that is fired exactly when changes were associated with a build. There are two possibilities
I pushed this change in commit f406dd2c
Current implementation notices the build only one build is started. I'll reopen it to make it fixed properly
It would be great if TeamCity notified GitHub as soon as the job was queued.
I think the premise of this issue is no longer valid. When a branch commit is pushed to github, the api returns [] for status and the ui doesn't show a status message.
For comparison, this is what a pull request's merge prompt looks like when there is no status and you can fast-forward merge:
And this is what it looks like when there is a success status on the commit:
I disagree - I want a potential merger to know explicitly that a build is pending. That merger (I'm in a corporate setting, not public!) might not know that CI exists, to not click that inviting green button.
On 7 April 2014 14:44, willroden notifications@github.com wrote:
I think the premise of this issue is no longer valid. When a branch commit is pushed to github, the api returns [] for status and the ui doesn't show a status message.
For comparison, this is what a pull request's merge prompt looks like when there is no status and you can fast-forward merge:
And this is what it looks like when there is a success status on the commit:
Reply to this email directly or view it on GitHubhttps://github.com/jonnyzzz/TeamCity.GitHub/issues/21#issuecomment-39730778 .
I agree with @petemounce. We have had several accidental merged because the reviewer did not realize that there was a pending TeamCity run.
@jonnyzzz What the status of this issue now?
There are no specific plans for the issue now. The requested feature is nice to have. So here I collect votes now. If you like you may submit a pull request for it. On Aug 22, 2014 1:43 PM, "j0tunn" notifications@github.com wrote:
@jonnyzzz https://github.com/jonnyzzz What the status of this issue now?
— Reply to this email directly or view it on GitHub https://github.com/jonnyzzz/TeamCity.GitHub/issues/21#issuecomment-53050884 .
ok, I understand. Are your advices in https://github.com/jonnyzzz/TeamCity.GitHub/issues/21#issuecomment-18900141 still ok?
Yes. You may use newer version of IntelliJ IDEA of course.
You need to register a listener on changesCollected event and check there if updated buildTypes have the build fearure enabled. On Aug 22, 2014 1:54 PM, "j0tunn" notifications@github.com wrote:
ok, I understand. Are your advices in #21 (comment) https://github.com/jonnyzzz/TeamCity.GitHub/issues/21#issuecomment-18900141 still ok?
— Reply to this email directly or view it on GitHub https://github.com/jonnyzzz/TeamCity.GitHub/issues/21#issuecomment-53051852 .
How about listener to buildTypeAddedToQueue
It is first added. Changes are collected later on. There is a difference between chained builds and single. For chained changes are collected ehile it is in the queue. But for single only ehen build is started on agent On Aug 22, 2014 2:02 PM, "j0tunn" notifications@github.com wrote:
How about listener to buildTypeAddedToQueue: http://javadoc.jetbrains.net/teamcity/openapi/6.0/jetbrains/buildServer/serverSide/BuildServerListener.html#buildTypeAddedToQueue(jetbrains.buildServer.serverSide.SQueuedBuild
— Reply to this email directly or view it on GitHub https://github.com/jonnyzzz/TeamCity.GitHub/issues/21#issuecomment-53052465 .
@jonnyzzz
Under Ultimate edition you'll see run configuration to start plugin under TeamCity under debug strait from IntelliJ (this trick requires Tomcat support. Use TeamCity installation directory as tomcat path)
How can I start plugin under TeamCity under debug with Community edition?
The only manual way would work since Tomcat support was used to start the server. But you may have the 'deploy' artifact to deploy plugin binaries into the started server's data directory
Best regards, Eugene Petrenko
On Tue, Aug 26, 2014 at 2:32 PM, j0tunn notifications@github.com wrote:
@jonnyzzz https://github.com/jonnyzzz
Under Ultimate edition you'll see run configuration to start plugin under TeamCity under debug strait from IntelliJ (this trick requires Tomcat support. Use TeamCity installation directory as tomcat path)
How can I start plugin under TeamCity under debug with Community edition?
— Reply to this email directly or view it on GitHub https://github.com/jonnyzzz/TeamCity.GitHub/issues/21#issuecomment-53401937 .
You may also try IntelliJ IDEA Ultimate 14 EAP which does not require license
Best regards, Eugene Petrenko
On Tue, Aug 26, 2014 at 2:43 PM, Eugene Petrenko eugene.petrenko@gmail.com wrote:
The only manual way would work since Tomcat support was used to start the server. But you may have the 'deploy' artifact to deploy plugin binaries into the started server's data directory
Best regards, Eugene Petrenko
On Tue, Aug 26, 2014 at 2:32 PM, j0tunn notifications@github.com wrote:
@jonnyzzz https://github.com/jonnyzzz
Under Ultimate edition you'll see run configuration to start plugin under TeamCity under debug strait from IntelliJ (this trick requires Tomcat support. Use TeamCity installation directory as tomcat path)
How can I start plugin under TeamCity under debug with Community edition?
— Reply to this email directly or view it on GitHub https://github.com/jonnyzzz/TeamCity.GitHub/issues/21#issuecomment-53401937 .
@jonnyzzz There are errors during run under IntelliJ IDEA (14 EAP or 13):
[2014-08-26 04:07:25,013] Artifact ROOT: Artifact is being deployed, please wait...
[2014-08-26 04:07:25,028] Artifact ROOT: Error during artifact deployment. See server log for details.
[2014-08-26 04:07:25,029] Artifact ROOT: com.intellij.javaee.oss.admin.jmx.JmxAdminException: com.intellij.execution.ExecutionException: /Applications/IntelliJ IDEA 13.app/bin/Users/j0tunn/work/j0tunn/TeamCity/webapps/ROOT not found for the web module.
Aug 26, 2014 4:07:34 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /Users/j0tunn/work/j0tunn/TeamCity/webapps/ROOT
log4j:ERROR Could not parse url [file:%IDEA_RUN:TOMCAT_HOME%/conf/teamcity-server-log4j.xml].
...
Am I missing something?
nevermind. Looks like some conflicts of different IDEA versions: after reset to clean repository state errors dissapeared
:+1:
Related to #30
:+1: vote. :)
My work around:
And viola!
Do You see a problem if i change the event for marking a build as pending for the one currently used :
to the following one :
And all needed data i get form this object : buildType.getLastChangesStartedBuild()
If not what do you suggest is there another way to get all needed values ?
I think at the moment, the plugin will mark a pull request as "pending build" when a build starts.
Would it be possible instead to mark the PR as pending as soon as changes are detected against it, since otherwise there's a window between changes committed and build-started that the commit status will be green, when actually there are untested changes?