##// END OF EJS Templates
docs: small rst fixes.
marcink -
r1856:25c48cf5 stable
parent child Browse files
Show More
@@ -1,134 +1,135 b''
1 Nginx Configuration Example
1 Nginx Configuration Example
2 ---------------------------
2 ---------------------------
3
3
4 Use the following example to configure Nginx as a your web server.
4 Use the following example to configure Nginx as a your web server.
5
5
6
6
7 .. code-block:: nginx
7 .. code-block:: nginx
8
8 ## rate limiter for certain pages to prevent brute force attacks
9 ## rate limiter for certain pages to prevent brute force attacks
9 limit_req_zone $binary_remote_addr zone=dl_limit:10m rate=1r/s;
10 limit_req_zone $binary_remote_addr zone=dl_limit:10m rate=1r/s;
10
11
11 ## custom log format
12 ## custom log format
12 log_format log_custom '$remote_addr - $remote_user [$time_local] '
13 log_format log_custom '$remote_addr - $remote_user [$time_local] '
13 '"$request" $status $body_bytes_sent '
14 '"$request" $status $body_bytes_sent '
14 '"$http_referer" "$http_user_agent" '
15 '"$http_referer" "$http_user_agent" '
15 '$request_time $upstream_response_time $pipe';
16 '$request_time $upstream_response_time $pipe';
16
17
17 ## define upstream (local RhodeCode instance) to connect to
18 ## define upstream (local RhodeCode instance) to connect to
18 upstream rc {
19 upstream rc {
19 # Url to running RhodeCode instance.
20 # Url to running RhodeCode instance.
20 # This is shown as `- URL:` in output from rccontrol status.
21 # This is shown as `- URL:` in output from rccontrol status.
21 server 127.0.0.1:10002;
22 server 127.0.0.1:10002;
22
23
23 # add more instances for load balancing
24 # add more instances for load balancing
24 # server 127.0.0.1:10003;
25 # server 127.0.0.1:10003;
25 # server 127.0.0.1:10004;
26 # server 127.0.0.1:10004;
26 }
27 }
27
28
28 ## HTTP to HTTPS rewrite
29 ## HTTP to HTTPS rewrite
29 server {
30 server {
30 listen 80;
31 listen 80;
31 server_name rhodecode.myserver.com;
32 server_name rhodecode.myserver.com;
32
33
33 if ($http_host = rhodecode.myserver.com) {
34 if ($http_host = rhodecode.myserver.com) {
34 rewrite (.*) https://rhodecode.myserver.com$1 permanent;
35 rewrite (.*) https://rhodecode.myserver.com$1 permanent;
35 }
36 }
36 }
37 }
37
38
38 ## Optional gist alias server, for serving nicer GIST urls.
39 ## Optional gist alias server, for serving nicer GIST urls.
39 server {
40 server {
40 listen 443;
41 listen 443;
41 server_name gist.myserver.com;
42 server_name gist.myserver.com;
42 access_log /var/log/nginx/gist.access.log log_custom;
43 access_log /var/log/nginx/gist.access.log log_custom;
43 error_log /var/log/nginx/gist.error.log;
44 error_log /var/log/nginx/gist.error.log;
44
45
45 ssl on;
46 ssl on;
46 ssl_certificate gist.rhodecode.myserver.com.crt;
47 ssl_certificate gist.rhodecode.myserver.com.crt;
47 ssl_certificate_key gist.rhodecode.myserver.com.key;
48 ssl_certificate_key gist.rhodecode.myserver.com.key;
48
49
49 ssl_session_timeout 5m;
50 ssl_session_timeout 5m;
50
51
51 ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
52 ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
52 ssl_prefer_server_ciphers on;
53 ssl_prefer_server_ciphers on;
53 ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
54 ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
54
55
55 # strict http prevents from https -> http downgrade
56 # strict http prevents from https -> http downgrade
56 add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
57 add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
57
58
58 # Diffie-Hellman parameter for DHE ciphersuites, recommended 2048 bits
59 # Diffie-Hellman parameter for DHE ciphersuites, recommended 2048 bits
59 #ssl_dhparam /etc/nginx/ssl/dhparam.pem;
60 #ssl_dhparam /etc/nginx/ssl/dhparam.pem;
60
61
61 rewrite ^/(.+)$ https://rhodecode.myserver.com/_admin/gists/$1;
62 rewrite ^/(.+)$ https://rhodecode.myserver.com/_admin/gists/$1;
62 rewrite (.*) https://rhodecode.myserver.com/_admin/gists;
63 rewrite (.*) https://rhodecode.myserver.com/_admin/gists;
63 }
64 }
64
65
65
66
66 ## MAIN SSL enabled server
67 ## MAIN SSL enabled server
67 server {
68 server {
68 listen 443 ssl;
69 listen 443 ssl;
69 server_name rhodecode.myserver.com;
70 server_name rhodecode.myserver.com;
70
71
71 access_log /var/log/nginx/rhodecode.access.log log_custom;
72 access_log /var/log/nginx/rhodecode.access.log log_custom;
72 error_log /var/log/nginx/rhodecode.error.log;
73 error_log /var/log/nginx/rhodecode.error.log;
73
74
74 ssl on;
75 ssl on;
75 ssl_certificate rhodecode.myserver.com.crt;
76 ssl_certificate rhodecode.myserver.com.crt;
76 ssl_certificate_key rhodecode.myserver.com.key;
77 ssl_certificate_key rhodecode.myserver.com.key;
77
78
78 ssl_session_timeout 5m;
79 ssl_session_timeout 5m;
79
80
80 ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
81 ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
81 ssl_prefer_server_ciphers on;
82 ssl_prefer_server_ciphers on;
82 ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
83 ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
83
84
84 # Diffie-Hellman parameter for DHE ciphersuites, recommended 2048 bits
85 # Diffie-Hellman parameter for DHE ciphersuites, recommended 2048 bits
85 #ssl_dhparam /etc/nginx/ssl/dhparam.pem;
86 #ssl_dhparam /etc/nginx/ssl/dhparam.pem;
86
87
87 include /etc/nginx/proxy.conf;
88 include /etc/nginx/proxy.conf;
88
89
89 ## serve static files by Nginx, recommended for performance
90 ## serve static files by Nginx, recommended for performance
90 # location /_static/rhodecode {
91 # location /_static/rhodecode {
91 # alias /path/to/.rccontrol/enterprise-1/static;
92 # alias /path/to/.rccontrol/enterprise-1/static;
92 # }
93 # }
93
94
94 ## channelstream websocket handling
95 ## channelstream websocket handling
95 location /_channelstream {
96 location /_channelstream {
96 rewrite /_channelstream/(.*) /$1 break;
97 rewrite /_channelstream/(.*) /$1 break;
97
98
98 proxy_pass http://127.0.0.1:9800;
99 proxy_pass http://127.0.0.1:9800;
99
100
100 proxy_connect_timeout 10;
101 proxy_connect_timeout 10;
101 proxy_send_timeout 10m;
102 proxy_send_timeout 10m;
102 proxy_read_timeout 10m;
103 proxy_read_timeout 10m;
103 tcp_nodelay off;
104 tcp_nodelay off;
104 proxy_set_header Host $host;
105 proxy_set_header Host $host;
105 proxy_set_header X-Real-IP $remote_addr;
106 proxy_set_header X-Real-IP $remote_addr;
106 proxy_set_header X-Url-Scheme $scheme;
107 proxy_set_header X-Url-Scheme $scheme;
107 proxy_set_header X-Forwarded-Proto $scheme;
108 proxy_set_header X-Forwarded-Proto $scheme;
108 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
109 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
109 gzip off;
110 gzip off;
110 proxy_http_version 1.1;
111 proxy_http_version 1.1;
111 proxy_set_header Upgrade $http_upgrade;
112 proxy_set_header Upgrade $http_upgrade;
112 proxy_set_header Connection "upgrade";
113 proxy_set_header Connection "upgrade";
113 }
114 }
114
115
115 location /_admin/login {
116 location /_admin/login {
116 ## rate limit this endpoint
117 ## rate limit this endpoint
117 limit_req zone=dl_limit burst=10 nodelay;
118 limit_req zone=dl_limit burst=10 nodelay;
118 try_files $uri @rhode;
119 try_files $uri @rhode;
119 }
120 }
120
121
121 location / {
122 location / {
122 try_files $uri @rhode;
123 try_files $uri @rhode;
123 }
124 }
124
125
125 location @rhode {
126 location @rhode {
126 proxy_pass http://rc;
127 proxy_pass http://rc;
127 }
128 }
128
129
129 ## custom 502 error page
130 ## custom 502 error page
130 error_page 502 /502.html;
131 error_page 502 /502.html;
131 location = /502.html {
132 location = /502.html {
132 root /path/to/.rccontrol/enterprise-1/static;
133 root /path/to/.rccontrol/enterprise-1/static;
133 }
134 }
134 } No newline at end of file
135 }
@@ -1,77 +1,77 b''
1 .. _deprecated-methods-ref:
1 .. _deprecated-methods-ref:
2
2
3 deprecated methods
3 deprecated methods
4 ==================
4 ==================
5
5
6 changeset_comment
6 changeset_comment
7 -----------------
7 -----------------
8
8
9 .. py:function:: changeset_comment(apiuser, repoid, revision, message, userid=<Optional:<OptionalAttr:apiuser>>, status=<Optional:None>)
9 .. py:function:: changeset_comment(apiuser, repoid, revision, message, userid=<Optional:<OptionalAttr:apiuser>>, status=<Optional:None>)
10
10
11 .. deprecated:: 3.4.0
11 .. deprecated:: 3.4.0
12
12
13 Please use method `comment_commit` instead.
13 Please use method `comment_commit` instead.
14
14
15
15
16 Set a changeset comment, and optionally change the status of the
16 Set a changeset comment, and optionally change the status of the
17 changeset.
17 changeset.
18
18
19 This command can only be run using an |authtoken| with admin
19 This command can only be run using an |authtoken| with admin
20 permissions on the |repo|.
20 permissions on the |repo|.
21
21
22 :param apiuser: This is filled automatically from the |authtoken|.
22 :param apiuser: This is filled automatically from the |authtoken|.
23 :type apiuser: AuthUser
23 :type apiuser: AuthUser
24 :param repoid: Set the repository name or repository ID.
24 :param repoid: Set the repository name or repository ID.
25 :type repoid: str or int
25 :type repoid: str or int
26 :param revision: Specify the revision for which to set a comment.
26 :param revision: Specify the revision for which to set a comment.
27 :type revision: str
27 :type revision: str
28 :param message: The comment text.
28 :param message: The comment text.
29 :type message: str
29 :type message: str
30 :param userid: Set the user name of the comment creator.
30 :param userid: Set the user name of the comment creator.
31 :type userid: Optional(str or int)
31 :type userid: Optional(str or int)
32 :param status: Set the comment status. The following are valid options:
32 :param status: Set the comment status. The following are valid options:
33 * not_reviewed
33 * not_reviewed
34 * approved
34 * approved
35 * rejected
35 * rejected
36 * under_review
36 * under_review
37 :type status: str
37 :type status: str
38
38
39 Example error output:
39 Example error output:
40
40
41 .. code-block:: json
41 .. code-block:: javascript
42
42
43 {
43 {
44 "id" : <id_given_in_input>,
44 "id" : "<id_given_in_input>",
45 "result" : {
45 "result" : {
46 "msg": "Commented on commit `<revision>` for repository `<repoid>`",
46 "msg": "Commented on commit `<revision>` for repository `<repoid>`",
47 "status_change": null or <status>,
47 "status_change": null or "<status>",
48 "success": true
48 "success": true
49 },
49 },
50 "error" : null
50 "error" : null
51 }
51 }
52
52
53
53
54 get_locks
54 get_locks
55 ---------
55 ---------
56
56
57 .. py:function:: get_locks(apiuser, userid=<Optional:<OptionalAttr:apiuser>>)
57 .. py:function:: get_locks(apiuser, userid=<Optional:<OptionalAttr:apiuser>>)
58
58
59 .. deprecated:: 4.0.0
59 .. deprecated:: 4.0.0
60
60
61 Please use method `get_user_locks` instead.
61 Please use method `get_user_locks` instead.
62
62
63 None
63 None
64
64
65
65
66 show_ip
66 show_ip
67 -------
67 -------
68
68
69 .. py:function:: show_ip(apiuser, userid=<Optional:<OptionalAttr:apiuser>>)
69 .. py:function:: show_ip(apiuser, userid=<Optional:<OptionalAttr:apiuser>>)
70
70
71 .. deprecated:: 4.0.0
71 .. deprecated:: 4.0.0
72
72
73 Please use method `get_ip` instead.
73 Please use method `get_ip` instead.
74
74
75 None
75 None
76
76
77
77
@@ -1,21 +1,26 b''
1 .. _contributing:
1 .. _contributing:
2
2
3 Contributing to RhodeCode
3 Contributing to RhodeCode
4 =========================
4 =========================
5
5
6
6
7
7
8 Welcome to the contribution guides and development docs of RhodeCode.
8 Welcome to the contribution guides and development docs of RhodeCode.
9
9
10
10
11
11
12 .. toctree::
12 .. toctree::
13 :maxdepth: 1
13 :maxdepth: 1
14
14
15 overview
15 overview
16 testing/index
16 testing/index
17 dev-setup
17 dev-setup
18 db-schema
18 db-schema
19 dev-settings
19 dev-settings
20 api
20 api
21 dependencies
21 dependencies
22 checklist-tickets
23 checklist-pull-request
24 frontend
25 standards
26
@@ -1,97 +1,97 b''
1 .. _integrations-ci:
1 .. _integrations-ci:
2
2
3 CI Server integration
3 CI Server integration
4 =====================
4 =====================
5
5
6
6
7 RhodeCode :ref:`integrations-webhook` integration is a powerfull tool to allow
7 RhodeCode :ref:`integrations-webhook` integration is a powerfull tool to allow
8 interaction with systems like Jenkin, Bamboo, TeamCity, CircleCi or any other
8 interaction with systems like Jenkin, Bamboo, TeamCity, CircleCi or any other
9 CI server that allows triggering a build using HTTP call.
9 CI server that allows triggering a build using HTTP call.
10
10
11 Below are few examples on how to use :ref:`integrations-webhook` to trigger
11 Below are few examples on how to use :ref:`integrations-webhook` to trigger
12 a CI build.
12 a CI build.
13
13
14
14
15 General Webhook
15 General Webhook
16 +++++++++++++++
16 +++++++++++++++
17
17
18 :ref:`integrations-webhook` allows sending a JSON payload information to specified
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
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.
20 in the URL greatly extending the flexibility of this type of integration.
21
21
22 Most of the modern CI systems such as Jenkins, TeamCity, Bamboo or CircleCi
22 Most of the modern CI systems such as Jenkins, TeamCity, Bamboo or CircleCi
23 allows triggering builds via GET or POST calls.
23 allows triggering builds via GET or POST calls.
24
24
25 :ref:`integrations-webhook` can be either specified per each repository or
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
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
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
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
29 global integration will also work because mostly a CI system will ignore a
30 call for unspecified builds.
30 call for unspecified builds.
31
31
32
32
33 .. note::
33 .. note::
34
34
35 A quick note on security. It's recommended to allow IP restrictions
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
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
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}
38 trigger URL, e.g. `http://user:password@server.com/job/${project_id}`
39
39
40
40
41 If users require to provide any custom parameters, they can be stored for each
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
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
43 has a numeric build id, storing this as `jenkins_build_id` key extra field
44 the url would look like that::
44 the url would look like that::
45
45
46 http://server/job/${extra:jenkins_build_id}/
46 http://server/job/${extra:jenkins_build_id}/
47
47
48
48
49 .. note::
49 .. note::
50
50
51 Please note that some variables will result in multiple calls.
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
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}`
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
54 This will trigger many builds if many commits are pushed. This allows
55 triggering individual builds for each pushed commit.
55 triggering individual builds for each pushed commit.
56
56
57
57
58 Jenkins
58 Jenkins
59 +++++++
59 +++++++
60
60
61 To use Jenkins CI with RhodeCode, a Jenkins Build with Parameters should be used.
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
62 Plugin details are available here: https://wiki.jenkins.io/display/JENKINS/Build+With+Parameters+Plugin
63
63
64 If the plugin is configured, RhodeCode can trigger builds automatically by
64 If the plugin is configured, RhodeCode can trigger builds automatically by
65 calling such example url provided in :ref:`integrations-webhook` integration::
65 calling such example url provided in :ref:`integrations-webhook` integration::
66
66
67 http://server/job/${project_id}/build-branch-${branch}/buildWithParameters?token=TOKEN&PARAMETER=value&PARAMETER2=value2
67 http://server/job/${project_id}/build-branch-${branch}/buildWithParameters?token=TOKEN&PARAMETER=value&PARAMETER2=value2
68
68
69
69
70 Team City
70 Team City
71 +++++++++
71 +++++++++
72
72
73 To use TeamCity CI it's enough to call the API and provide a buildId.
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::
74 Example url after configuring :ref:`repo-xtra` would look like that::
75
75
76 http://teacmtiyserver/viewType.html?buildTypeId=${extra:tc_build_id}
76 http://teacmtiyserver/viewType.html?buildTypeId=${extra:tc_build_id}
77
77
78
78
79 Each project can have many build configurations.
79 Each project can have many build configurations.
80 buildTypeId which is a unique ID for each build configuration (job).
80 buildTypeId which is a unique ID for each build configuration (job).
81
81
82
82
83 CircleCi
83 CircleCi
84 ++++++++
84 ++++++++
85
85
86 To use CircleCi, a POST call needs to be triggered. Example build url would
86 To use CircleCi, a POST call needs to be triggered. Example build url would
87 look like this::
87 look like this::
88
88
89 http://cicleCiServer/project/${repo_type}/${username}/${repo_id}/tree/${branch}
89 http://cicleCiServer/project/${repo_type}/${username}/${repo_id}/tree/${branch}
90
90
91
91
92 Circle Ci expects format of::
92 Circle Ci expects format of::
93
93
94 POST: /project/:vcs-type/:username/:project/tree/:branch
94 POST: /project/:vcs-type/:username/:project/tree/:branch
95
95
96
96
97 CircleCi API documentation can be found here: https://circleci.com/docs/api/v1-reference/
97 CircleCi API documentation can be found here: https://circleci.com/docs/api/v1-reference/
@@ -1,54 +1,55 b''
1 .. _integrations:
1 .. _integrations:
2
2
3 Integrations
3 Integrations
4 ------------
4 ------------
5
5
6 Rhodecode supports integrations with external services for various events,
6 Rhodecode supports integrations with external services for various events,
7 such as commit pushes and pull requests. Multiple integrations of the same type
7 such as commit pushes and pull requests. Multiple integrations of the same type
8 can be added at the same time; this is useful for posting different events to
8 can be added at the same time; this is useful for posting different events to
9 different Slack channels, for example.
9 different Slack channels, for example.
10
10
11 Supported integrations
11 Supported integrations
12 ^^^^^^^^^^^^^^^^^^^^^^
12 ^^^^^^^^^^^^^^^^^^^^^^
13
13
14 ============================ ============ =====================================
14 ============================ ============ =====================================
15 Type/Name |RC| Edition Description
15 Type/Name |RC| Edition Description
16 ============================ ============ =====================================
16 ============================ ============ =====================================
17 :ref:`integrations-slack` |RCCEshort| https://slack.com/
17 :ref:`integrations-slack` |RCCEshort| https://slack.com/
18 :ref:`integrations-hipchat` |RCCEshort| https://www.hipchat.com/
18 :ref:`integrations-hipchat` |RCCEshort| https://www.hipchat.com/
19 :ref:`integrations-webhook` |RCCEshort| POST events as `json` to a custom url
19 :ref:`integrations-webhook` |RCCEshort| POST events as `json` to a custom url
20 :ref:`integrations-ci` |RCCEshort| Trigger Builds for Common CI Systems
20 :ref:`integrations-ci` |RCCEshort| Trigger Builds for Common CI Systems
21 :ref:`integrations-email` |RCCEshort| Send repo push commits by email
21 :ref:`integrations-email` |RCCEshort| Send repo push commits by email
22 :ref:`integrations-redmine` |RCEEshort| Close/Resolve/Reference redmine issues
22 :ref:`integrations-redmine` |RCEEshort| Close/Resolve/Reference redmine issues
23 :ref:`integrations-jira` |RCEEshort| Close/Resolve/Reference JIRA issues
23 :ref:`integrations-jira` |RCEEshort| Close/Resolve/Reference JIRA issues
24 ============================ ============ =====================================
24 ============================ ============ =====================================
25
25
26 .. _creating-integrations:
26 .. _creating-integrations:
27
27
28 Creating an Integration
28 Creating an Integration
29 ^^^^^^^^^^^^^^^^^^^^^^^
29 ^^^^^^^^^^^^^^^^^^^^^^^
30
30
31 Integrations can be added globally via the admin UI:
31 Integrations can be added globally via the admin UI:
32
32
33 :menuselection:`Admin --> Integrations`
33 :menuselection:`Admin --> Integrations`
34
34
35 or per repository in each repository's settings:
35 or per repository in each repository's settings:
36
36
37 :menuselection:`Admin --> Repositories --> Edit --> Integrations`
37 :menuselection:`Admin --> Repositories --> Edit --> Integrations`
38
38
39 To create an integration, select the type from the list in the *Create New
39 To create an integration, select the type from the list in the *Create New
40 Integration* section.
40 Integration* section.
41
41
42 The *Current Integrations* section shows existing integrations that have been
42 The *Current Integrations* section shows existing integrations that have been
43 created along with their type (eg. Slack) and enabled status.
43 created along with their type (eg. Slack) and enabled status.
44
44
45 See pages specific to each type of integration for more instructions:
45 See pages specific to each type of integration for more instructions:
46
46
47 .. toctree::
47 .. toctree::
48
48
49 slack
49 slack
50 hipchat
50 hipchat
51 redmine
51 redmine
52 jira
52 jira
53 webhook
53 webhook
54 email
54 email
55 ci
@@ -1,66 +1,65 b''
1 .. _api-ex:
1 .. _api-ex:
2
2
3 API Example Usage
3 API Example Usage
4 =================
4 =================
5
5
6 Use the following example uses of the |RCE| API to carry out work on your
6 Use the following example uses of the |RCE| API to carry out work on your
7 instances, or |repo| maintanence on the server. For the complete API
7 instances, or |repo| maintanence on the server. For the complete API
8 documentation, see the :ref:`api` section.
8 documentation, see the :ref:`api` section.
9
9
10 .. _api-strip:
10 .. _api-strip:
11
11
12 Stripping Commits
12 Stripping Commits
13 -----------------
13 -----------------
14
14
15 The strip command is useful for removing commits on the server, allowing
15 The strip command is useful for removing commits on the server, allowing
16 you to push changes without using force. To strip commits on the server, use
16 you to push changes without using force. To strip commits on the server, use
17 the following steps:
17 the following steps:
18
18
19 1. Install |RCT|, as explained in the :ref:`install-tools` section.
19 1. Install |RCT|, as explained in the :ref:`install-tools` section.
20 2. Configure the :file:`~/.rhoderc` file with the API connection details, as
20 2. Configure the :file:`~/.rhoderc` file with the API connection details, as
21 explained in the :ref:`config-rhoderc` section.
21 explained in the :ref:`config-rhoderc` section.
22 3. Check the |RCE| changelog and see from which revision onwards you wish to
22 3. Check the |RCE| changelog and see from which revision onwards you wish to
23 strip commits. This will also strip all descendants.
23 strip commits. This will also strip all descendants.
24
24
25 .. image:: ../images/pre-strip.png
25 .. image:: ../images/pre-strip.png
26
26
27
27
28 4. Enter your |RCT| virtual environment, using the following example:
28 4. Enter your |RCT| virtual environment, using the following example:
29
29
30 .. code-block:: bash
30 .. code-block:: bash
31
31
32 $ . venv/bin/activate
32 $ . venv/bin/activate
33 (venv)$
33 (venv)$
34
34
35 5. Use the API to strip a commit, or number of commits from a |repo|. In this
35 5. Use the API to strip a commit, or number of commits from a |repo|. In this
36 example I am stripping the top two commits from ``ad1e0523a4ab`` onwards.
36 example I am stripping the top two commits from ``ad1e0523a4ab`` onwards.
37
37
38 .. note::
38 .. note::
39
39
40 Repositories in |repo| groups require the |repo| group to be passed as
40 Repositories in |repo| groups require the |repo| group to be passed as
41 part of the ``repoid``.
41 part of the ``repoid``.
42
42
43 .. code-block:: bash
43 .. code-block:: bash
44
44
45 # Run the Strip API call
45 # Run the Strip API call
46 $ rhodecode-api --instance-name=instance-id strip \
46 $ rhodecode-api --instance-name=instance-id strip \
47 repoid:repo-group/repo-name revision:ad1e0523a4ab branch:stable
47 repoid:repo-group/repo-name revision:ad1e0523a4ab branch:stable
48
48
49 # Check the JSON-RPC verification
49 # Check the JSON-RPC verification
50
50
51 .. code-block:: jsonld
51 .. code-block:: javascript
52
52
53 {
53 {
54 "error": null,
54 "error": null,
55 "id": 5960,
55 "id": 5960,
56 "result": {
56 "result": {
57 "msg": "Stripped commit ad1e0523a4ab from
57 "msg": "Stripped commit ad1e0523a4ab from repo `repo-group/repo-name`",
58 repo `repo-group/repo-name`",
59 "repository": "repo-group/repo-name"
58 "repository": "repo-group/repo-name"
60 }
59 }
61 }
60 }
62
61
63 6. Once the commits are stripped, you can verify that they are
62 6. Once the commits are stripped, you can verify that they are
64 stripped on the web interface.
63 stripped on the web interface.
65
64
66 .. image:: ../images/post-strip.png
65 .. image:: ../images/post-strip.png
General Comments 0
You need to be logged in to leave comments. Login now