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

Set up TC codebetter build #20

Closed
ferventcoder opened this issue Jan 18, 2015 · 47 comments
Closed

Set up TC codebetter build #20

ferventcoder opened this issue Jan 18, 2015 · 47 comments

Comments

@ferventcoder
Copy link
Member

No description provided.

@gep13
Copy link
Member

gep13 commented Jan 18, 2015

Can you give me access to TC? Happy to take a look at this.

@ferventcoder
Copy link
Member Author

That would be Hadi or Maarten that could give you access.

On Sunday, January 18, 2015, Gary Ewan Park notifications@github.com
wrote:

Can you give me access to TC? Happy to take a look at this.


Reply to this email directly or view it on GitHub
#20 (comment).

Rob
"Be passionate in all you do"

http://devlicio.us/blogs/rob_reynolds
http://ferventcoder.com
http://twitter.com/ferventcoder

@gep13
Copy link
Member

gep13 commented Jan 18, 2015

@hhariri or @maartenba can you hook me up with access to the Chocolatey Project on the TeamCity Codebetter instance? My username is the same as it is for GitHub. Thanks!

@maartenba
Copy link

@gep13 made you a project admin for Chocolatey.

@gep13
Copy link
Member

gep13 commented Jan 19, 2015

@maartenba nice one, thank you very much! 😸

@gep13 gep13 self-assigned this Jan 19, 2015
@ferventcoder
Copy link
Member Author

Thank you @maartenba !

@ferventcoder
Copy link
Member Author

If you can look at http://teamcity.codebetter.com/project.html?projectId=ChuckNorris&tab=projectOverview (roundhouse), it will give you an idea of how I want it. :)

Keep in mind that the RH build is probably outdated compared to what this is going to have.

@gep13
Copy link
Member

gep13 commented Jan 19, 2015

Have started to implement this. Just dropped you an email with some questions. Will follow up based on your responses.

@ferventcoder
Copy link
Member Author

Not sure if I set it completely up correctly. Still waiting to see it update the status on a PR I synchronized.

@gep13
Copy link
Member

gep13 commented Jan 20, 2015

Yeah, still doesn't seem to be working :-(

What permissions did you give to the token that you assigned?

Can I get a screenshot? I will put it past Maarten to see if it has everything that is required.

@maartenba
Copy link

I did notice some AppVeyor status info. Not sure if GitHub allows overwriting it?

@gep13
Copy link
Member

gep13 commented Jan 20, 2015

@maartenba I was going by this:

https://github.com/blog/1935-see-results-from-all-pull-request-status-checks

Could it be that there is something in either the AppVeyor or TeamCity side of things needs to change so that they are live in harmony? Or am I missing the intent of the multiple build status API?

@ferventcoder
Copy link
Member Author

So appveyor supports and uses the multiple build status, so it wouldn't overwrite anything. Take a look at https://github.com/puppetlabs/cfacter/pull/224 for an example of the multiple status.

image

@ferventcoder
Copy link
Member Author

Github Auth Token

I put in the same permissions that were requested, however I noticed that when you select repo it removes repo_status and public_repo.
image

I removed repo and specifically selected repo_status and public_repo and it didn't remove them this time. I should note that the account that is set up for this is https://github.com/choco-bot which has read access to the repository.

image

Team City Settings

Since the last time I checked, I noticed the url has changed (to removeapi/v3):

image

@gep13
Copy link
Member

gep13 commented Jan 20, 2015

@ferventcoder I didn't change the URL, but I did change the Context to be:

continuousintegration/teamcity

But I see that this has changed to teamcity. Was that by you?

@maartenba
Copy link

I changes the URL and context to see if it helped.

@ferventcoder
Copy link
Member Author

sweet! I will push up some changes and see if it picks it up.

@ferventcoder
Copy link
Member Author

Pushed, nothing yet #30 (comment)

@ferventcoder
Copy link
Member Author

But already picked up as pending by TC.
image

@maartenba
Copy link

Seeing a 404 in the server log, which according to GitHub means that auth failed. Just as a test, could you try with your full credentials configured?

@ferventcoder
Copy link
Member Author

Weird part is appveyor is not reporting status now either.
image

@ferventcoder
Copy link
Member Author

@maartenba keys updated. That user is set to full access to the token. This is how it allows items (I removed repo and user):
image

@ferventcoder
Copy link
Member Author

What i think you need is a webhook created, maybe?
image

Actually strike that, you get the notifications through VCS polling.

@maartenba
Copy link

Nope, TeamCity should be able to do it without the webhook. On the TC side, could you try your credentials instead of a token? (just for testing)

@ferventcoder
Copy link
Member Author

Changed and pushed.

@ferventcoder
Copy link
Member Author

It doesn't know about it yet. Have you thought about adding the push from github webhooks to kick off builds?

@gep13
Copy link
Member

gep13 commented Jan 20, 2015

In a separate conversation I asked @maartenba if this;

http://tcplugins.sourceforge.net/info/tcWebHooks

Could be added to the CodeBetter TeamCity instance. This was to allow integration into Gitter Chat, but sounds like it could be used for other things as well.

@ferventcoder
Copy link
Member Author

Okay, so it has noticed the pending changes, but still no status update.

@gep13
Copy link
Member

gep13 commented Jan 20, 2015

Okay, so it has noticed the pending changes, but still no status update.

Strangely again though, the AppVeyor status is working again.

@ferventcoder
Copy link
Member Author

image
It works, it should probably update the status when it goes PENDING, not when it kicks of the build.

@ferventcoder
Copy link
Member Author

So now that we've determined it is a permissions issue, I think we need to have @maartenba tell us what those permissions should be. ;)

@gep13
Copy link
Member

gep13 commented Jan 20, 2015

Woot! 😸

For the sake of consistency, otherwise it will bug the crap out of me, can we make the context continuous-integation/teamcity, rather than just teamcity?

@ferventcoder
Copy link
Member Author

Done. Switched to the choco-bot user. I'll do another push and see if that works.

@maartenba
Copy link

Perhaps @jonnyzzz knows which permissions should be given to the token?

@ferventcoder
Copy link
Member Author

@maartenba @jonnyzzz Would you agree that something can sit in pending status for awhile? TravisCI and AppVeyor are both subject to this - so they push a status update of pending until they are ready to kick off.

Still queued...

@ferventcoder
Copy link
Member Author

When I switched over to the choco-bot user (not back to the auth token yet) that has read access to the repository (and has read status on commits), there was no status update on that PR, even though the build went through.

image

@ferventcoder
Copy link
Member Author

I think there is a missing permission here somewhere - we'll need it locked down so we are happy to try out a few things with you guys. Now that we've determined it is a permissions issue, can we start determining what it is that is necessary? Perhaps there is something in the plugin that is attempting to request too much permission?

@ferventcoder
Copy link
Member Author

I'm guessing the code for this is at https://github.com/JetBrains/commit-status-publisher but I haven't looked too deeply into it.

@maartenba
Copy link

@ferventcoder
Copy link
Member Author

Sweet, I created jonnyzzz/TeamCity.GitHub#73

@ferventcoder
Copy link
Member Author

As a reference, this is what AppVeyor asks for:

image

@ferventcoder
Copy link
Member Author

Actually this may just be an issue with that user. I'm going to set up an access token under my account.

@ferventcoder
Copy link
Member Author

I put this comment on jonnyzzz/TeamCity.GitHub#73 (comment), but I thought I would share here as well:

It comes down to permissions, but not permissions you can change. GitHub doesn't have the ability to give a github user permission to write status updates but nothing else.

Once you switch over to a user with write access (and in this case add an authorization token), it works appropriately:

image

@ferventcoder
Copy link
Member Author

I'm good with considering this closed for now.

@gep13
Copy link
Member

gep13 commented Jan 20, 2015

Cool. I have just corrected the TeamCity settings to put a c at the start on continuous, as per screen shot above 😸

@ferventcoder
Copy link
Member Author

@gep13 thanks, copy pasta error.

@gep13
Copy link
Member

gep13 commented Jan 20, 2015

@gep13 thanks, copy pasta error.

No worries, things like that just sort of jump out at me :-D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants