##// END OF EJS Templates
docs: added CI integration docs.
marcink -
r1837:a499b95c default
parent child Browse files
Show More
@@ -0,0 +1,97 b''
1 .. _integrations-ci:
2
3 CI Server integration
4 =====================
5
6
7 RhodeCode :ref:`integrations-webhook` integration is a powerfull tool to allow
8 interaction with systems like Jenkin, Bamboo, TeamCity, CircleCi or any other
9 CI server that allows triggering a build using HTTP call.
10
11 Below are few examples on how to use :ref:`integrations-webhook` to trigger
12 a CI build.
13
14
15 General Webhook
16 +++++++++++++++
17
18 :ref:`integrations-webhook` allows sending a JSON payload information to specified
19 url with GET or POST methods. There are several variables that could be used
20 in the URL greatly extending the flexibility of this type of integration.
21
22 Most of the modern CI systems such as Jenkins, TeamCity, Bamboo or CircleCi
23 allows triggering builds via GET or POST calls.
24
25 :ref:`integrations-webhook` can be either specified per each repository or
26 globally, if your CI maps directly to all your projects a global
27 :ref:`integrations-webhook` integration can be created and will trigger builds
28 for each change in projects. If only some projects allow triggering builds a
29 global integration will also work because mostly a CI system will ignore a
30 call for unspecified builds.
31
32
33 .. note::
34
35 A quick note on security. It's recommended to allow IP restrictions
36 to only allow RhodeCode server to trigger builds. If you need to
37 specify username and password this could be done by embedding it into a
38 trigger URL, e.g. `http://user:password@server.com/job/${project_id}
39
40
41 If users require to provide any custom parameters, they can be stored for each
42 project inside the :ref:`repo-xtra`. For example to migrate a current job that
43 has a numeric build id, storing this as `jenkins_build_id` key extra field
44 the url would look like that::
45
46 http://server/job/${extra:jenkins_build_id}/
47
48
49 .. note::
50
51 Please note that some variables will result in multiple calls.
52 e.g. for |HG| specifying `${branch}` will trigger as many builds as how
53 many branches the suer actually pushed. Same applies to `${commit_id}`
54 This will trigger many builds if many commits are pushed. This allows
55 triggering individual builds for each pushed commit.
56
57
58 Jenkins
59 +++++++
60
61 To use Jenkins CI with RhodeCode, a Jenkins Build with Parameters should be used.
62 Plugin details are available here: https://wiki.jenkins.io/display/JENKINS/Build+With+Parameters+Plugin
63
64 If the plugin is configured, RhodeCode can trigger builds automatically by
65 calling such example url provided in :ref:`integrations-webhook` integration::
66
67 http://server/job/${project_id}/build-branch-${branch}/buildWithParameters?token=TOKEN&PARAMETER=value&PARAMETER2=value2
68
69
70 Team City
71 +++++++++
72
73 To use TeamCity CI it's enough to call the API and provide a buildId.
74 Example url after configuring :ref:`repo-xtra` would look like that::
75
76 http://teacmtiyserver/viewType.html?buildTypeId=${extra:tc_build_id}
77
78
79 Each project can have many build configurations.
80 buildTypeId which is a unique ID for each build configuration (job).
81
82
83 CircleCi
84 ++++++++
85
86 To use CircleCi, a POST call needs to be triggered. Example build url would
87 look like this::
88
89 http://cicleCiServer/project/${repo_type}/${username}/${repo_id}/tree/${branch}
90
91
92 Circle Ci expects format of::
93
94 POST: /project/:vcs-type/:username/:project/tree/:branch
95
96
97 CircleCi API documentation can be found here: https://circleci.com/docs/api/v1-reference/
@@ -1,87 +1,87 b''
1 1 |RCM|
2 2 =====
3 3
4 4 |RCM| is a high-performance source code management and collaboration system.
5 5 It enables you to develop projects securely behind the firewall while
6 6 providing collaboration tools that work with |git|, |hg|,
7 7 and |svn| |repos|. The user interface allows you to create, edit,
8 8 and commit files and |repos| while managing their security permissions.
9 9
10 10 |RCM| provides the following features:
11 11
12 12 * Source code management.
13 13 * Extended permissions management.
14 14 * Integrated code collaboration tools.
15 15 * Integrated code review and notifications.
16 16 * Scalability provided by multi-node setup.
17 17 * Fully programmable automation API.
18 18 * Web-based hook management.
19 19 * Native |svn| support.
20 20 * Migration from existing databases.
21 21 * |RCM| SDK.
22 22 * Built-in analytics
23 * Built in integrations including: Slack, Jenkins, Webhooks, Jira, Redmine, Hipchat
23 * Built in integrations including: Slack, Webhooks (used for Jenkins/TeamCity and other CIs), Jira, Redmine, Hipchat
24 24 * Pluggable authentication system.
25 25 * Support for AD, |LDAP|, Crowd, CAS, PAM.
26 26 * Support for external authentication via Oauth Google, Github, Bitbucket, Twitter.
27 27 * Debug modes of operation.
28 28 * Private and public gists.
29 29 * Gists with limited lifetimes and within instance only sharing.
30 30 * Fully integrated code search function.
31 31 * Always on SSL connectivity.
32 32
33 33 .. only:: html
34 34
35 35 Table of Contents
36 36 -----------------
37 37
38 38 .. toctree::
39 39 :maxdepth: 1
40 40 :caption: Admin Documentation
41 41
42 42 install/quick-start
43 43 install/install-database
44 44 install/install-steps
45 45 admin/system-overview
46 46 nix/default-env
47 47 admin/system-admin
48 48 admin/user-admin
49 49 admin/setting-repo-perms
50 50 admin/security-tips
51 51 auth/auth
52 52 issue-trackers/issue-trackers
53 53 admin/lab-settings
54 54
55 55 .. toctree::
56 56 :maxdepth: 1
57 57 :caption: Feature Documentation
58 58
59 59 collaboration/collaboration
60 60 collaboration/review-notifications
61 61 collaboration/pull-requests
62 62 code-review/code-review
63 63 integrations/integrations
64 64
65 65 .. toctree::
66 66 :maxdepth: 1
67 67 :caption: Developer Documentation
68 68
69 69 api/api
70 70 tools/rhodecode-tools
71 71 extensions/extensions-hooks
72 72 contributing/contributing
73 73
74 74 .. toctree::
75 75 :maxdepth: 1
76 76 :caption: User Documentation
77 77
78 78 usage/basic-usage
79 79 tutorials/tutorials
80 80
81 81 .. toctree::
82 82 :maxdepth: 1
83 83 :caption: About
84 84
85 85 known-issues/known-issues
86 86 release-notes/release-notes
87 87 admin/glossary
@@ -1,53 +1,54 b''
1 1 .. _integrations:
2 2
3 3 Integrations
4 4 ------------
5 5
6 6 Rhodecode supports integrations with external services for various events,
7 7 such as commit pushes and pull requests. Multiple integrations of the same type
8 8 can be added at the same time; this is useful for posting different events to
9 9 different Slack channels, for example.
10 10
11 11 Supported integrations
12 12 ^^^^^^^^^^^^^^^^^^^^^^
13 13
14 14 ============================ ============ =====================================
15 15 Type/Name |RC| Edition Description
16 16 ============================ ============ =====================================
17 17 :ref:`integrations-slack` |RCCEshort| https://slack.com/
18 18 :ref:`integrations-hipchat` |RCCEshort| https://www.hipchat.com/
19 19 :ref:`integrations-webhook` |RCCEshort| POST events as `json` to a custom url
20 :ref:`integrations-email` |RCEEshort| Send repo push commits by email
20 :ref:`integrations-ci` |RCCEshort| Trigger Builds for Common CI Systems
21 :ref:`integrations-email` |RCCEshort| Send repo push commits by email
21 22 :ref:`integrations-redmine` |RCEEshort| Close/Resolve/Reference redmine issues
22 23 :ref:`integrations-jira` |RCEEshort| Close/Resolve/Reference JIRA issues
23 24 ============================ ============ =====================================
24 25
25 26 .. _creating-integrations:
26 27
27 28 Creating an Integration
28 29 ^^^^^^^^^^^^^^^^^^^^^^^
29 30
30 31 Integrations can be added globally via the admin UI:
31 32
32 33 :menuselection:`Admin --> Integrations`
33 34
34 35 or per repository in each repository's settings:
35 36
36 37 :menuselection:`Admin --> Repositories --> Edit --> Integrations`
37 38
38 39 To create an integration, select the type from the list in the *Create New
39 40 Integration* section.
40 41
41 42 The *Current Integrations* section shows existing integrations that have been
42 43 created along with their type (eg. Slack) and enabled status.
43 44
44 45 See pages specific to each type of integration for more instructions:
45 46
46 47 .. toctree::
47 48
48 49 slack
49 50 hipchat
50 51 redmine
51 52 jira
52 53 webhook
53 54 email
General Comments 0
You need to be logged in to leave comments. Login now