forked from bitrise-io/devcenter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7792b85
commit a4e0937
Showing
7 changed files
with
188 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
If you can't see the nice little green/red CI checks status (like the one you can see on our [Blog, | ||
about the Pull Request status feature announcement](http://blog.bitrise.io/2015/04/23/pull-request-support-for-github-repositories.html)) | ||
on the Pull Request's GitHub page, you should check this list for troubleshooting. | ||
|
||
## Make sure to select a Service credential User who has a connected GitHub account | ||
|
||
The first requirement is that the **Service credential User** of the app on [bitrise.io](https://www.bitrise.io) | ||
have to connect his/her GitHub account, or else [bitrise.io](https://www.bitrise.io) | ||
won't be able to send the status messages to GitHub. | ||
|
||
!!! note "Set the Service credential User for the app" | ||
You can set which Team Member's sercive connections should be used when Bitrise tries to communicate | ||
with GitHub or any other connected service (like Bitbucket or Xamarin) API. | ||
You can set this user on the `Team` tab of the app, in the __Service credential User__ section. | ||
Default is to use the Owner's credentials. | ||
|
||
If you want to manage your connected services on [bitrise.io](https://www.bitrise.io), | ||
just open your [Account Settings](https://www.bitrise.io/me/profile) page. | ||
On the left side you can find the __Connected Accounts__ section, | ||
where you can connect and disconnect other services (like GitHub, Bitbucket or Xamarin) | ||
to your [bitrise.io](https://www.bitrise.io) account. | ||
|
||
!!! note "Make sure you connected the correct GitHub account" | ||
If you have more than one GitHub account you should also check whether you connected the right one, | ||
which can access the repository. | ||
You can check which GitHub user you connected by clicking the `GitHub` text | ||
on your [bitrise.io](https://www.bitrise.io) [Account Settings](https://www.bitrise.io/me/profile) page, | ||
it will open the connected GitHub user's page. | ||
|
||
|
||
## If your builds are triggering, but you don't see the Pull Request / Build status indicator on GitHub | ||
|
||
If you have Pull Request testing enabled you should see a green/yellow/red CI check status indicator at every Pull Request on GitHub, | ||
[like the one you can see on our Blog about the Pull Request status feature announcement](http://blog.bitrise.io/2015/04/23/pull-request-support-for-github-repositories.html). | ||
|
||
If your builds are running fine but you still can't see the status indicator on GitHub: | ||
|
||
- __Make sure that you granted access to your GitHub organization for Bitrise__. | ||
It might be that you did not **grant access** to the GitHub organization | ||
(who owns the repository) for Bitrise, so even though everything else is in place, | ||
GitHub will still reject the status message [bitrise.io](https://www.bitrise.io) sends to it. | ||
See the | ||
[Grant access to a GitHub Organization](/faq/grant-access-to-github-organization) | ||
guide for more information. | ||
- Another thing might be that the user you specified as the | ||
[Service credential User](#make-sure-to-select-a-service-credential-user-who-has-a-connected-github-account) | ||
doesn't have **administrator rights** on GitHub **for the repository**. | ||
_Administrator rights are required in order to send status messages to GitHub._ | ||
Usually you face this issue (no access to the organization) when you add your app on [bitrise.io](https://www.bitrise.io). | ||
If you did not select the repository from the GitHub list on the [Add New App](http://www.bitrise.io/apps/add) page, | ||
but rather copy-pasted your repository's URL, you still need to grant access to the organization to see | ||
the build status indicator on GitHub. | ||
See the | ||
[Grant access to a GitHub Organization](/faq/grant-access-to-github-organization) | ||
guide for more information, and make sure that you selected the right | ||
[Service credential User](#make-sure-to-select-a-service-credential-user-who-has-a-connected-github-account) | ||
for the app on [bitrise.io](https://www.bitrise.io). | ||
- __If you renamed or transferred the repository on GitHub__. | ||
GitHub in general is quite good with handling repository rename and transfer, | ||
and usually redirects to the right url automatically, but this is not the case with the Status API. | ||
Fortunately the fix for this is quite simple: __Go to the `Settings` tab of your app on [bitrise.io](https://www.bitrise.io) | ||
and make sure that the `Repository URL` is up to date__, and does not point to the previous location of the repository, | ||
but to the current location of the repository. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Steps to grant access for Bitrise.io to a given GitHub Organization: | ||
|
||
1. Open [https://github.com](https://github.com) | ||
2. In the top right corner click your user / avatar | ||
3. In the list select [Settings](https://github.com/settings/profile) | ||
4. On the left side select [Authorized applications](https://github.com/settings/applications) | ||
5. In the list click __Bitrise__ | ||
6. On the sub page, go to the __Organization access__ section, | ||
locate the Organization you want to grant access to, and click the `Grant access` button. | ||
|
||
You can now go back to [bitrise.io](https://www.bitrise.io) and you | ||
should see the organization / repository on the Add New App page. | ||
|
||
__If there's no `Grant access` button for the organization in the _Organization access_ section__ | ||
and instead you see a red cross icon, that means that the access was previously granted but then it was revoked. | ||
You can fix this by selecting the organization on the left side, in the | ||
__Organization settings__ section, then on the _Organization settings_ | ||
page select __Third-party access__, locate `Bitrise`, click the __pencil icon__, | ||
and click the `Grant access` button there. | ||
|
||
!!! note "In case the repository is a fork of another private repository" | ||
In case the repository is a fork of another private repository which belongs to **(another) organization** you | ||
have to repeat these steps and grant access for Bitrise for the orgianization _which owns the original repository_. | ||
|
||
This is a GitHub limitation, in order to be able to access a private repository fork | ||
__you have to grant access for the service (Bitrise) in both repositories__; | ||
in the fork and in the original repository/organization too. |
4 changes: 4 additions & 0 deletions
4
docs/faq/i-cant-see-my-github-organization-repository-on-the-add-new-app-page.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Most likely you did not grant access to [bitrise.io](https://www.bitrise.io) when you authenticated | ||
with GitHub to access the organization (or a repository owned by the organization). | ||
|
||
To fix this you should follow this guide: [Grant access to a GitHub Organization](/faq/grant-access-to-github-organization). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
If no builds are triggered automatically when you push code into your repository, | ||
you should __make sure your webhook is properly set on the git hosting | ||
service you use (GitHub, Bitbucket, GitLab, ...)__. | ||
|
||
You can find the webhook related setup and troubleshooting guides | ||
in the [Webhooks section of the DevCenter](/webhooks/). | ||
|
||
If the webhook is present on the git hosting service, you should | ||
check the [Troubleshooting section of the Webhooks docs](/webhooks/troubleshooting). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
First of all, if you registered your app on [bitrise.io](https://www.bitrise.io) a while ago (especially | ||
if before 2016 Sept.) you should check the webhook URL registered on the git hosting service you use (GitHub, Bitbucket, ...). | ||
|
||
__New trigger feature__ (like [skip ci](https://bitrise-io.github.io/devcenter/tips-and-tricks/skip-a-build/) or tag based triggering) | ||
__are only available if you use the new `hooks.bitrise.io` webhook URL!__ | ||
|
||
_Initially we had a non open source `bitrise.io/hooks` endpoint for webhooks, | ||
but every new project registered should now get the new `hooks.bitrise.io` webhook URL automatically._ | ||
|
||
__If your webhook would still be a `bitrise.io/hooks` URL, please replace it with the new `hooks.bitrise.io/` URL - you can find this on the `Code` tab of your app!__ | ||
|
||
__Debugging - what happens with webhooks related to un-mapped branches__ | ||
|
||
You can't limit Webhooks by branch in most of the source code hosting services, | ||
so [bitrise.io](https://www.bitrise.io) will still receive a webhook call for every code push of other branches, | ||
but it won't start a build unless it finds a matching filter in the `trigger_map`, | ||
which specifies a `workflow` to be selected for the build. | ||
_This is also true if you use the __Build Trigger API__ directly._ | ||
|
||
You can see all the ignored calls on your [Activity page on bitrise.io](http://www.bitrise.io/activity). | ||
This means that if you think a given event should have started a build but it did not, | ||
you should check your `Activity` page (or your source code hosting service's Webhook history - more info a bit below) | ||
to find out why it did not trigger a build. | ||
|
||
An ignored build call entry in the Activity list looks like: | ||
|
||
``` | ||
Build trigger failed: trigger-pattern (push_branch:) (pr_source_branch:prtest/t1) (pr_target_branch:develop) did not match any defined workflow in trigger_map | ||
PROJECT-NAME - Run triggered with params: push-branch: , pr-source-branch: prtest/t1, pr-target-branch: develop, but no matching workflow found | ||
``` | ||
|
||
__Bitrise also returns the reason to the source code hosting service__ (the service which sent the webhook, e.g. GitHub) too, | ||
so if your service has a webhook history (e.g. GitHub, Bitbucket, ...) | ||
you can see the reason why a given webhook did not trigger a build there too! | ||
|
||
Simply open the webhook history on your source code hosting service, | ||
and check the response Bitrise returned. It will be something like: | ||
|
||
``` | ||
{"success_responses":[],"failed_responses":[{"status":"error","message":"trigger pattern did not match any defined mapping: Run triggered with params: push-branch: , pr-source-branch: prtest/t1, pr-target-branch: develop, but no matching workflow found","service":"bitrise","slug":"...","build_slug":"","build_number":0,"build_url":"","triggered_workflow":""}]} | ||
``` | ||
|
||
___These detailed responses are only generated if you use | ||
the new [hooks.bitrise.io](https://hooks.bitrise.io) webhook URL!__ | ||
Initially we had a non open source `bitrise.io/hooks` endpoint | ||
for webhooks, but every new project registered should now get the new | ||
`hooks.bitrise.io` webhook URL automatically. If your webhook | ||
would still be a `bitrise.io/hook` URL, please replace it with the new | ||
`hooks.bitrise.io/` URL - you can find this on the `Code` tab of your app!_ | ||
|
||
## Local debugging | ||
|
||
You can also test which workflow will be selected for a trigger | ||
using our [open source, Bitrise CLI](https://www.bitrise.io/cli). | ||
|
||
To simulate a code push, you can run: | ||
|
||
``` | ||
bitrise trigger-check --push-branch master | ||
``` | ||
|
||
To simulate a Pull Request, you can run: | ||
|
||
``` | ||
bitrise trigger-check --pr-source-branch=feature/a --pr-target-branch=master | ||
``` | ||
|
||
To simulate a tag push, you can run: | ||
|
||
``` | ||
bitrise trigger-check --tag 1.0.0 | ||
``` | ||
|
||
For more information and options run: | ||
|
||
``` | ||
bitrise trigger-check --help | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters