Compare commits
296 Commits
Author | SHA1 | Date |
---|---|---|
Girish Ramakrishnan | e76784cb8f | |
Girish Ramakrishnan | 64d8d5b661 | |
Girish Ramakrishnan | bf30c8e13b | |
Girish Ramakrishnan | 381562f347 | |
Girish Ramakrishnan | ffa9d52206 | |
Girish Ramakrishnan | 7d0d52ceae | |
Girish Ramakrishnan | f19465b3d6 | |
Girish Ramakrishnan | 662cfae820 | |
Renovate Bot | e365f033d1 | |
Renovate Bot | b8e5fcc22d | |
Girish Ramakrishnan | a176ab5f20 | |
Girish Ramakrishnan | 9b773524ce | |
Girish Ramakrishnan | 9c4088e812 | |
Girish Ramakrishnan | c956c27334 | |
Girish Ramakrishnan | 75aa1f09a5 | |
Johannes Zellner | 9f363fb373 | |
Johannes Zellner | e06c3d5bb5 | |
Johannes Zellner | aa7a6f9d69 | |
Girish Ramakrishnan | 56cb2ba6b2 | |
Girish Ramakrishnan | 08868f64d4 | |
Girish Ramakrishnan | d7c3ae38fe | |
Johannes Zellner | 9b7aedc025 | |
Johannes Zellner | 70c144095a | |
Johannes Zellner | 69df4d1e0f | |
Johannes Zellner | 07982e33aa | |
Johannes Zellner | 59266f120a | |
Johannes Zellner | c03ec98517 | |
Johannes Zellner | 885a32e340 | |
Johannes Zellner | 459646512e | |
Girish Ramakrishnan | 5d44c03115 | |
Girish Ramakrishnan | 4961b7c4c8 | |
Girish Ramakrishnan | cfc5ab5a37 | |
Johannes Zellner | 6259356ae2 | |
Johannes Zellner | 813f32d310 | |
Johannes Zellner | 162054ef99 | |
Johannes Zellner | 18ad051734 | |
Johannes Zellner | ea6a6b84d9 | |
Johannes Zellner | ab0ab3c11c | |
Johannes Zellner | 84c505ad43 | |
Johannes Zellner | 366e8560b0 | |
Johannes Zellner | 0a81a63829 | |
Girish Ramakrishnan | 4fc500fca6 | |
Girish Ramakrishnan | 8393426612 | |
Johannes Zellner | a08dd3ee47 | |
Johannes Zellner | 63fce06157 | |
Johannes Zellner | d0c1e65913 | |
Johannes Zellner | 88732c63c9 | |
Johannes Zellner | d62cca74cc | |
Johannes Zellner | f96533530f | |
Johannes Zellner | 3e95af2256 | |
Johannes Zellner | 90693772de | |
Johannes Zellner | 092f2089f2 | |
Johannes Zellner | 16ffe8295f | |
Girish Ramakrishnan | 61d2691859 | |
Girish Ramakrishnan | 19c4b2a7ff | |
Girish Ramakrishnan | 5c7c228ff4 | |
Johannes Zellner | 62b03b02d5 | |
Johannes Zellner | 7dd4447091 | |
Girish Ramakrishnan | d23339e2e3 | |
Girish Ramakrishnan | 32daf79b3b | |
Girish Ramakrishnan | 2d0a1f14e6 | |
Vladimir D | bbae02fa50 | |
Vladimir D | e176d6c705 | |
Johannes Zellner | dd44f81d04 | |
Johannes Zellner | a4b0af1f02 | |
Girish Ramakrishnan | 4b15736f81 | |
Girish Ramakrishnan | 8876fedd40 | |
Girish Ramakrishnan | 65df2c54da | |
Girish Ramakrishnan | 245b93ea02 | |
Johannes Zellner | 8596073c51 | |
Johannes Zellner | 6a85b0cea2 | |
Girish Ramakrishnan | 5205ba5e83 | |
Girish Ramakrishnan | f668f4f3ab | |
Girish Ramakrishnan | 7eca682cec | |
Girish Ramakrishnan | f9f867ca89 | |
Girish Ramakrishnan | 9580ece3a1 | |
Girish Ramakrishnan | f2818dc4f9 | |
Girish Ramakrishnan | 35ac25e140 | |
Girish Ramakrishnan | 3cb4caaeac | |
Girish Ramakrishnan | 55d2b0d320 | |
Girish Ramakrishnan | 8f55a89978 | |
Girish Ramakrishnan | 5240330992 | |
Girish Ramakrishnan | 95fc696bcd | |
Girish Ramakrishnan | 77b3e2b033 | |
Johannes Zellner | 5fbd69679c | |
Johannes Zellner | 2c837eeb8f | |
Girish Ramakrishnan | 040fcf3386 | |
Girish Ramakrishnan | 58298a6b20 | |
Girish Ramakrishnan | 6b2e221264 | |
Girish Ramakrishnan | 1e9964fe49 | |
Girish Ramakrishnan | 23fa45cbc8 | |
Girish Ramakrishnan | 572226155c | |
Girish Ramakrishnan | 50ec10f0ae | |
Girish Ramakrishnan | a99dfc8e2a | |
Girish Ramakrishnan | 6bbea49e07 | |
Girish Ramakrishnan | f53e024f69 | |
Johannes Zellner | 68fe1f97d0 | |
Johannes Zellner | 896336f7c2 | |
Johannes Zellner | ea91e676cf | |
Johannes Zellner | 94e9181ced | |
Johannes Zellner | 8808e8c0b2 | |
Johannes Zellner | d00238c1ad | |
Girish Ramakrishnan | 07442c675c | |
Girish Ramakrishnan | ed1846cd28 | |
Girish Ramakrishnan | e10793d421 | |
Girish Ramakrishnan | 9eea9fe0be | |
Girish Ramakrishnan | 298cb33e86 | |
Johannes Zellner | 89240fc070 | |
Johannes Zellner | 6b2af3eab4 | |
Johannes Zellner | 32eebcff8f | |
Girish Ramakrishnan | 166dac9b12 | |
Girish Ramakrishnan | 26db0254c7 | |
Girish Ramakrishnan | 35e3edaa6c | |
Girish Ramakrishnan | 93370fa502 | |
Girish Ramakrishnan | 3398da164d | |
Girish Ramakrishnan | 6ce20e9e75 | |
Johannes Zellner | cb14653680 | |
Johannes Zellner | 46982e68f7 | |
Johannes Zellner | a2d2edabaf | |
Johannes Zellner | 7261adc546 | |
Johannes Zellner | a338dc215a | |
Girish Ramakrishnan | a12cf5f70b | |
Girish Ramakrishnan | 730611229e | |
Girish Ramakrishnan | fcb4caff89 | |
Girish Ramakrishnan | 200dc7676f | |
Girish Ramakrishnan | 320fbf86d9 | |
Girish Ramakrishnan | 04d857e88b | |
Girish Ramakrishnan | e2f6fb52b3 | |
Johannes Zellner | 4224cc9692 | |
Johannes Zellner | d416ec0dc7 | |
Johannes Zellner | ea5ff4e574 | |
Girish Ramakrishnan | 27720786bf | |
Girish Ramakrishnan | f48a4c4d72 | |
Johannes Zellner | 65fbb9cb7d | |
Johannes Zellner | 63bfe621d1 | |
Johannes Zellner | a6688ede57 | |
Johannes Zellner | 7f2646bfb3 | |
Johannes Zellner | aafc1968ec | |
Girish Ramakrishnan | 2f85d288e0 | |
Girish Ramakrishnan | e5296ab5ee | |
Girish Ramakrishnan | 77e05f56bf | |
Girish Ramakrishnan | 4eab21379e | |
Girish Ramakrishnan | 1da61b548f | |
Girish Ramakrishnan | 76df0b0113 | |
Girish Ramakrishnan | d9fa8399fe | |
Johannes Zellner | aa0b00cd1e | |
Johannes Zellner | 8999bc9112 | |
Johannes Zellner | a7734d29fb | |
Johannes Zellner | b667082cec | |
Johannes Zellner | 9abcb0c5ec | |
Johannes Zellner | 3f6593c676 | |
Johannes Zellner | 5f7b0457db | |
Johannes Zellner | 7adfed915b | |
Johannes Zellner | 2af74e6817 | |
Johannes Zellner | 57ad6d200a | |
Girish Ramakrishnan | 4df53960f5 | |
Girish Ramakrishnan | 2fb28433fb | |
Girish Ramakrishnan | 6874ea9d46 | |
Girish Ramakrishnan | 2c284d36fa | |
Girish Ramakrishnan | 83da665570 | |
Girish Ramakrishnan | a427a098fe | |
Girish Ramakrishnan | eb4f29375b | |
Mark Stenglein | 05dcb14e8d | |
Johannes Zellner | 5a03ee8f27 | |
Johannes Zellner | e62f99643d | |
Johannes Zellner | 73027148c6 | |
Johannes Zellner | 67a138be41 | |
Johannes Zellner | 2c32dcf6bd | |
Girish Ramakrishnan | dc7f7e2f4e | |
Girish Ramakrishnan | 9a03f268cb | |
Girish Ramakrishnan | fde6dfa485 | |
Johannes Zellner | 8b16de1dcd | |
Johannes Zellner | 1074999c40 | |
Johannes Zellner | 0cfe7fea88 | |
Johannes Zellner | a3bb9db92e | |
Johannes Zellner | 8c84f905e7 | |
Johannes Zellner | 0008351e7c | |
Johannes Zellner | 0aab01b926 | |
Johannes Zellner | 2877b4e599 | |
Girish Ramakrishnan | f5f690ebd9 | |
Girish Ramakrishnan | 4a5bf98d60 | |
Girish Ramakrishnan | 3e84ab8730 | |
Johannes Zellner | c0d7b41a77 | |
Johannes Zellner | df77df2347 | |
Johannes Zellner | f18b11626c | |
Johannes Zellner | 75917ed6e1 | |
Johannes Zellner | 8033a4f001 | |
Girish Ramakrishnan | 6c2c00a53a | |
Girish Ramakrishnan | 86e13642e6 | |
Girish Ramakrishnan | 257b51d226 | |
Johannes Zellner | 37544c8e9b | |
Johannes Zellner | a04656847a | |
Johannes Zellner | 5e8950ec86 | |
Johannes Zellner | 2637ef1b4b | |
Johannes Zellner | 0bea878d12 | |
Johannes Zellner | bed765a1e4 | |
Johannes Zellner | 1e38bd58c6 | |
Johannes Zellner | a0f8607250 | |
Johannes Zellner | 4c0e49def0 | |
Johannes Zellner | c9937d6134 | |
Johannes Zellner | 3d51637daf | |
Johannes Zellner | 65a87ede58 | |
Johannes Zellner | 11800518cb | |
Johannes Zellner | 731be1ccf8 | |
Girish Ramakrishnan | 32c5507674 | |
Girish Ramakrishnan | 1deeedfc87 | |
Girish Ramakrishnan | 86a0949b14 | |
Johannes Zellner | 1aee702ada | |
Johannes Zellner | 6833bcd31b | |
Girish Ramakrishnan | 1a433ecee0 | |
Girish Ramakrishnan | c1f261592e | |
Girish Ramakrishnan | 282eed291e | |
Johannes Zellner | 43900e7897 | |
Johannes Zellner | 5ff6e0a410 | |
Johannes Zellner | 3b9989fcf0 | |
Johannes Zellner | 8b92a4feb4 | |
Johannes Zellner | f510244950 | |
Johannes Zellner | 8744b525cd | |
Johannes Zellner | 172c5f7307 | |
Girish Ramakrishnan | 48299030e6 | |
Girish Ramakrishnan | 8e84cf4817 | |
Johannes Zellner | c263876cdd | |
Johannes Zellner | 6429ca8909 | |
Johannes Zellner | 0cf326f08f | |
Johannes Zellner | 2cc40fffef | |
Johannes Zellner | 9a3c9338c3 | |
Johannes Zellner | 58a6351ab2 | |
Girish Ramakrishnan | ef557e98d7 | |
Girish Ramakrishnan | 2a17c1717d | |
Girish Ramakrishnan | 62f9860bf5 | |
Girish Ramakrishnan | 522923dbee | |
Girish Ramakrishnan | b117af4511 | |
Johannes Zellner | dc2987aafb | |
Johannes Zellner | 50a2444e76 | |
Johannes Zellner | ea72f04000 | |
Johannes Zellner | 2759c0d852 | |
Johannes Zellner | 7b0ec195e6 | |
Johannes Zellner | a677369189 | |
Girish Ramakrishnan | 2e8b2c637f | |
Girish Ramakrishnan | 07d07b342a | |
Girish Ramakrishnan | 93fa56da6b | |
Girish Ramakrishnan | e68a0333a9 | |
Girish Ramakrishnan | 5ed9ee9284 | |
Girish Ramakrishnan | a94c165c34 | |
Girish Ramakrishnan | 1b053028a0 | |
Girish Ramakrishnan | 5e7a1b2a37 | |
Girish Ramakrishnan | cc63133f85 | |
Girish Ramakrishnan | 08cbfbb9d4 | |
Girish Ramakrishnan | 9944104273 | |
Girish Ramakrishnan | 076dd3946b | |
Girish Ramakrishnan | 2885c388e8 | |
Johannes Zellner | 8693f77352 | |
Johannes Zellner | 5a0d2ea12e | |
Johannes Zellner | 3fbe8140a7 | |
Girish Ramakrishnan | ac4eecf92b | |
Girish Ramakrishnan | 3fc5685027 | |
Johannes Zellner | 9320ee11ad | |
Johannes Zellner | 664677527a | |
Johannes Zellner | b1f8b8cb9a | |
Johannes Zellner | b72d7ad682 | |
Johannes Zellner | 5b625519c1 | |
Girish Ramakrishnan | 9551b31c8e | |
Girish Ramakrishnan | 4514b6fc9b | |
Girish Ramakrishnan | 783cce292c | |
Girish Ramakrishnan | 538f3fdead | |
Girish Ramakrishnan | b2b86f170f | |
Girish Ramakrishnan | 4301fd5117 | |
Girish Ramakrishnan | 7aebe88c3e | |
Girish Ramakrishnan | 91cc96705e | |
Girish Ramakrishnan | 6fe012f901 | |
Girish Ramakrishnan | 29197622fc | |
Girish Ramakrishnan | 3adbf0b442 | |
Girish Ramakrishnan | 6c0a2ab20b | |
Girish Ramakrishnan | 1943723dd3 | |
Johannes Zellner | 2d15227f2e | |
Johannes Zellner | cbc0bfb222 | |
Johannes Zellner | 10df3c6ba9 | |
Johannes Zellner | 047ec295bc | |
Johannes Zellner | 31b8a17230 | |
Girish Ramakrishnan | ebb46bb7ac | |
Girish Ramakrishnan | 53f180ef95 | |
Girish Ramakrishnan | d89fc6a0ec | |
Girish Ramakrishnan | 1039d32995 | |
Girish Ramakrishnan | 6b25bb66c7 | |
Girish Ramakrishnan | e566c94b43 | |
Girish Ramakrishnan | 0d2e1cfff0 | |
Girish Ramakrishnan | f830faac79 | |
Girish Ramakrishnan | 319e6d275c | |
Girish Ramakrishnan | 9128339000 | |
Girish Ramakrishnan | f7ca27425a | |
Johannes Zellner | 9907d1c9cd | |
Girish Ramakrishnan | 8d16e4d734 | |
Girish Ramakrishnan | 150d490801 | |
Johannes Zellner | 4a4e4ff4f1 | |
Girish Ramakrishnan | 24e9499d9c | |
Girish Ramakrishnan | 8c66d9ed76 |
288
CHANGELOG
288
CHANGELOG
|
@ -1,288 +0,0 @@
|
||||||
[0.1.0]
|
|
||||||
* Initial package (forked from Gogs app)
|
|
||||||
|
|
||||||
[0.1.1]
|
|
||||||
* Removed reference to Gogs
|
|
||||||
|
|
||||||
[0.1.2]
|
|
||||||
* Updated description
|
|
||||||
|
|
||||||
[0.1.3]
|
|
||||||
* Updated to version 1.1.2
|
|
||||||
|
|
||||||
[1.0.0]
|
|
||||||
* Update to version 1.1.3
|
|
||||||
|
|
||||||
[1.0.1]
|
|
||||||
* Update Git to v2.7.4-0ubuntu1.2
|
|
||||||
* Fixes critical security issue that allows remote command execution in git
|
|
||||||
* https://people.canonical.com/~ubuntu-security/cve/2017/CVE-2017-1000117.html
|
|
||||||
|
|
||||||
[1.0.2]
|
|
||||||
* Preserve SECRET_KEY across updates and restarts
|
|
||||||
|
|
||||||
[1.0.3]
|
|
||||||
* Update to version 1.1.4
|
|
||||||
|
|
||||||
[1.1.0]
|
|
||||||
* Update to version 1.2.0
|
|
||||||
* New logo!
|
|
||||||
* SECURITY: Sanitation fix from Gogs (#1461)
|
|
||||||
* Status-API
|
|
||||||
* Implement GPG api
|
|
||||||
* https://github.com/go-gitea/gitea/releases/tag/v1.2.0
|
|
||||||
|
|
||||||
[1.1.1]
|
|
||||||
* Update to version 1.2.1
|
|
||||||
* Fix PR, milestone and label functionality if issue unit is disabled (#2710) (#2714)
|
|
||||||
* Fix plain readme didn't render correctly on repo home page (#2705) (#2712)
|
|
||||||
* Fix so that user can still fork his own repository to his organizations (#2699) (#2707)
|
|
||||||
* Fix .netrc authentication (#2700) (#2708)
|
|
||||||
* Fix slice out of bounds error in mailer (#2479) (#2696)
|
|
||||||
|
|
||||||
[1.1.2]
|
|
||||||
* Update to version 1.2.2
|
|
||||||
* Add checks for commits with missing author and time (#2771) (#2785)
|
|
||||||
* Fix sending mail with a non-latin display name (#2559) (#2783)
|
|
||||||
* Sync MaxGitDiffLineCharacters with conf/app.ini (#2779) (#2780)
|
|
||||||
* Update vendor git (#2765) (#2772)
|
|
||||||
* Fix emojify image URL (#2769) (#2773)
|
|
||||||
|
|
||||||
[1.1.3]
|
|
||||||
* Update to version 1.2.3
|
|
||||||
* Only require one email when validating GPG key (#2266, #2467, #2663) (#2788)
|
|
||||||
* Fix order of comments (#2835) (#2839)
|
|
||||||
|
|
||||||
[1.2.0]
|
|
||||||
* Update to version 1.3.0
|
|
||||||
|
|
||||||
[1.3.0]
|
|
||||||
* Update to version 1.3.1
|
|
||||||
* Add documentationUrl
|
|
||||||
* Sanitize logs for mirror sync (#3057, #3082) (#3078)
|
|
||||||
* Fix missing branch in release bug (#3108) (#3117)
|
|
||||||
* Fix repo indexer and submodule bug (#3107) (#3110)
|
|
||||||
* Fix legacy URL redirects (#3100) (#3106)
|
|
||||||
* Fix redis session failed (#3086) (#3089)
|
|
||||||
* Fix issue list branch link broken (#3061) (#3070)
|
|
||||||
* Fix missing password length check when change password (#3039) (#3071)
|
|
||||||
|
|
||||||
[1.3.1]
|
|
||||||
* Update Gitea to 1.3.2
|
|
||||||
* Fix run web with -p push failed (#3154) (#3179)
|
|
||||||
* Fix source download link when no code unit allowed (#3166) (#3169)
|
|
||||||
* Allow adding collaborators with (fullname) (#3103) (#3168)
|
|
||||||
* Fix repo links (#3093) (#3163)
|
|
||||||
* Fix Uninitialized variable in ParsePatch (#3156) (#3162)
|
|
||||||
* Fix migration order v1.3 (#3157)
|
|
||||||
* Fix avatar URLs (#3069) (#3143)
|
|
||||||
|
|
||||||
[1.4.0]
|
|
||||||
* Fix email sending (use SMTPS)
|
|
||||||
|
|
||||||
[1.4.1]
|
|
||||||
* Update Gitea to 1.3.3
|
|
||||||
* Security fixes
|
|
||||||
* Fix escaping changed title in comments (#3530) (#3535)
|
|
||||||
* Escape search query display (#3486) (#3489)
|
|
||||||
* Bug fixes
|
|
||||||
* Fix repo-transfer-and-team-repo-count bug (#3241) (#3244)
|
|
||||||
* Open external tracker in blank window, consistently with wiki (#3227) (#3228)
|
|
||||||
* Change SSL Mode from checkbox to string in admin page (#3208) (#3211)
|
|
||||||
|
|
||||||
[1.5.0]
|
|
||||||
* Update Gitea to 1.4.0
|
|
||||||
|
|
||||||
[1.5.1]
|
|
||||||
* Update Gitea to 1.4.1
|
|
||||||
* Add “error” as reserved username (#3882) (#3886)
|
|
||||||
* Do not allow inactive users to access repositories using private key (#3887) (#3889)
|
|
||||||
* Fix path cleanup in file editor, when initilizing new repository and LFS oids (#3871) (#3873)
|
|
||||||
* Remove unnecessary allowed safe HTML (#3778) (#3779)
|
|
||||||
* Correctly check http git access rights for reverse proxy authorized users (#3721) (#3743)
|
|
||||||
* Fix to use only needed columns from tables to get repository git paths (#3870) (#3883)
|
|
||||||
* Fix GPG expire time display when time is zero (#3584) (#3884)
|
|
||||||
* Fix to update only issue last update time when adding a comment (#3855) (#3860)
|
|
||||||
* Fix repository star count after deleting user (#3781) (#3783)
|
|
||||||
* Use the active branch for the code tab (#3720) (#3776)
|
|
||||||
* Set default branch name on first push (#3715) (#3723)
|
|
||||||
* Show clipboard button if disable HTTP of git protocol (#3773) (#3774)
|
|
||||||
|
|
||||||
[1.5.2]
|
|
||||||
* Update Gitea to 1.4.2
|
|
||||||
* Adjust z-index for floating labels (#3939) (#3950)
|
|
||||||
* Add missing token validation on application settings page (#3976) #3978
|
|
||||||
* Webhook and hook_task clean up (#4006)
|
|
||||||
* Fix webhook bug of response info is not displayed in UI (#4023)
|
|
||||||
* Fix writer cannot read bare repo guide (#4033) (#4039)
|
|
||||||
* Don't force due date to current time (#3830) (#4057)
|
|
||||||
* Fix wiki redirects (#3919) (#4065)
|
|
||||||
* Fix attachment ENABLED (#4064) (#4066)
|
|
||||||
* Added deletion of an empty line at the end of file (#4054) (#4074)
|
|
||||||
* Use ResolveReference instead of path.Join (#4073)
|
|
||||||
* Fix #4081 Check for leading / in base before removing it (#4083)
|
|
||||||
* Respository's home page not updated after first push (#4075)
|
|
||||||
|
|
||||||
[1.5.2-1]
|
|
||||||
* Rebuild Gitea package because of https://github.com/go-gitea/gitea/issues/4167
|
|
||||||
* Adjust z-index for floating labels (#3939) (#3950)
|
|
||||||
* Add missing token validation on application settings page (#3976) #3978
|
|
||||||
* Webhook and hook_task clean up (#4006)
|
|
||||||
* Fix webhook bug of response info is not displayed in UI (#4023)
|
|
||||||
* Fix writer cannot read bare repo guide (#4033) (#4039)
|
|
||||||
* Don't force due date to current time (#3830) (#4057)
|
|
||||||
* Fix wiki redirects (#3919) (#4065)
|
|
||||||
* Fix attachment ENABLED (#4064) (#4066)
|
|
||||||
* Added deletion of an empty line at the end of file (#4054) (#4074)
|
|
||||||
* Use ResolveReference instead of path.Join (#4073)
|
|
||||||
* Fix #4081 Check for leading / in base before removing it (#4083)
|
|
||||||
* Respository's home page not updated after first push (#4075)
|
|
||||||
|
|
||||||
[1.5.3]
|
|
||||||
* Update Gitea to 1.4.3
|
|
||||||
* SECURITY
|
|
||||||
* HTML-escape plain-text READMEs (#4192) (#4214)
|
|
||||||
* Fix open redirect vulnerability on login screen (#4312) (#4312)
|
|
||||||
* BUGFIXES
|
|
||||||
* Fix broken monitoring page when running processes are shown (#4203) (#4208)
|
|
||||||
* Fix delete comment bug (#4216) (#4228)
|
|
||||||
* Delete reactions added to issues and comments when deleting repository (#4232) (#4237)
|
|
||||||
* Fix wiki URL encoding bug (#4091) (#4254)
|
|
||||||
* Fix code tab link when viewing tags (#3908) (#4263)
|
|
||||||
* Fix webhook type conflation (#4285) (#4285)
|
|
||||||
|
|
||||||
[1.5.4]
|
|
||||||
* Allow customization using gitea's custom data directory
|
|
||||||
|
|
||||||
[1.6.0]
|
|
||||||
* Update Gitea to 1.5.0
|
|
||||||
* Security
|
|
||||||
* Check that repositories can only be migrated to own user or organizations (#4366) (#4370)
|
|
||||||
* Limit uploaded avatar image-size to 4096px x 3072px by default (#4353)
|
|
||||||
* Do not allow to reuse TOTP passcode (#3878)
|
|
||||||
* Features
|
|
||||||
* Add cli commands to regen hooks & keys (#3979)
|
|
||||||
* Add support for FIDO U2F (#3971)
|
|
||||||
* Added user language setting (#3875)
|
|
||||||
* Add topic support (#3711)
|
|
||||||
* Multiple assignees (#3705)
|
|
||||||
* Add protected branch whitelists for merging (#3689)
|
|
||||||
* Global code search support (#3664)
|
|
||||||
* Add label descriptions (#3662)
|
|
||||||
* Add issue search via API (#3612)
|
|
||||||
* Add repository setting to enable/disable health checks (#3607)
|
|
||||||
* Emoji Autocomplete (#3433)
|
|
||||||
* Implements generator cli for secrets (#3531)
|
|
||||||
|
|
||||||
[1.6.1]
|
|
||||||
* Update Gitea to 1.5.1
|
|
||||||
* Security
|
|
||||||
* Don't disclose emails of all users when sending out emails (#4784)
|
|
||||||
* Improve URL validation for external wiki and external issues (#4710) (#4740)
|
|
||||||
* Make cookies HttpOnly and obey COOKIE_SECURE flag (#4706) (#4707)
|
|
||||||
* Bugfixes
|
|
||||||
* Fix missing release title in webhook (#4783) (#4800)
|
|
||||||
* Make sure to reset commit count in the cache on mirror syncing (#4770)
|
|
||||||
* Fixed bug where team with admin privelege type doesn't get any unit (#4759)
|
|
||||||
* Fix failure on creating pull request with assignees (#4583) (#4727)
|
|
||||||
* Hide org/create menu item in Dashboard if user has no rights (#4678) (#4686)
|
|
||||||
|
|
||||||
[1.7.0]
|
|
||||||
* Update base image
|
|
||||||
|
|
||||||
[1.7.1]
|
|
||||||
* Update Gitea to 1.5.2
|
|
||||||
|
|
||||||
[1.7.2]
|
|
||||||
* Update Gitea to 1.5.3
|
|
||||||
* Security
|
|
||||||
* Fix remote command execution vulnerability in upstream library (#5177) (#5196)
|
|
||||||
|
|
||||||
[1.8.0]
|
|
||||||
* Update Gitea to 1.6.0
|
|
||||||
|
|
||||||
[1.8.1]
|
|
||||||
* Update Gitea to 1.6.1
|
|
||||||
|
|
||||||
[1.8.2]
|
|
||||||
* Update Gitea to 1.6.2
|
|
||||||
* SECURITY
|
|
||||||
* Sanitize uploaded file names (#5571) (#5573)
|
|
||||||
* HTMLEncode user added text (#5570) (#5575)
|
|
||||||
* BUGFIXES
|
|
||||||
* Fix indexer reindex bug when gitea restart (#5563) (#5564)
|
|
||||||
* Fix bug when a read perm user to edit his issue (#5516) (#5534)
|
|
||||||
* Detect force push failure on deletion of protected branches (#5522) (#5531)
|
|
||||||
* Fix forgot deletion of notification when delete repository (#5506) (#5514)
|
|
||||||
* Fix undeleted content when deleting user (#5429) (#5509)
|
|
||||||
* Fix empty wiki (#5504) (#5508)
|
|
||||||
|
|
||||||
[1.8.3]
|
|
||||||
* Update Gitea to 1.6.3
|
|
||||||
* SECURITY: Prevent DeleteFilePost doing arbitrary deletion (#5631)
|
|
||||||
* BUGFIX: Fix wrong text getting saved on editing second comment on an issue (#5608)
|
|
||||||
|
|
||||||
[1.8.4]
|
|
||||||
* Update Gitea to 1.6.4
|
|
||||||
* Fix SSH key now can be reused as public key after deleting as deploy key (#5671) (#5685)
|
|
||||||
* When redirecting clean the path to avoid redirecting to external site (#5669) (#5703)
|
|
||||||
* Fix to use correct value for "MSpan Structures Obtained" (#5706) (#5715)
|
|
||||||
|
|
||||||
[1.9.0]
|
|
||||||
* Update Gitea to 1.7.0
|
|
||||||
|
|
||||||
[1.9.1]
|
|
||||||
* Update Gitea to 1.7.1
|
|
||||||
* [Changelog](https://github.com/go-gitea/gitea/releases/tag/v1.7.1)
|
|
||||||
* Disable redirect for i18n (#5910) (#5916)
|
|
||||||
* Only allow local login if password is non-empty (#5906) (#5908)
|
|
||||||
* Fix go-get URL generation (#5905) (#5907)
|
|
||||||
* Fix TLS errors when using acme/autocert for local connections (#5820) (#5826)
|
|
||||||
* Request for public keys only if LDAP attribute is set (#5816) (#5819)
|
|
||||||
* Fix delete correct temp directory (#5840) (#5839)
|
|
||||||
* Fix an error while adding a dependency via UI (#5862) (#5876)
|
|
||||||
* Fix null pointer in attempt to Sudo if not logged in (#5872) (#5884)
|
|
||||||
* When creating new repository fsck option should be enabled (#5817) (#5885)
|
|
||||||
* Prevent nil dereference in mailIssueCommentToParticipants (#5891) (#5895) (#5894)
|
|
||||||
* Fix bug when read public repo lfs file (#5913) (#5912)
|
|
||||||
* Respect value of REQUIRE_SIGNIN_VIEW (#5901) (#5915)
|
|
||||||
* Fix compare button on upstream repo leading to 404 (#5877) (#5914)
|
|
||||||
|
|
||||||
[1.9.2]
|
|
||||||
* Update Gitea to 1.7.2
|
|
||||||
* Remove all CommitStatus when a repo is deleted (#5940) (#5941)
|
|
||||||
* Fix notifications on pushing with deploy keys by setting hook environment variables (#5935) (#5944)
|
|
||||||
* Silence console logger in gitea serv (#5887) (#5943)
|
|
||||||
* Handle milestone webhook events for issues and PR (#5947) (#5955)
|
|
||||||
* Show user who created the repository instead of the organization in action feed (#5948) (#5956)
|
|
||||||
* Fix ssh deploy and user key constraints (#1357) (#5939) (#5966)
|
|
||||||
* Fix bug when deleting a linked account will removed all (#5989) (#5990)
|
|
||||||
* Fix empty ssh key importing in ldap (#5984) (#6009)
|
|
||||||
* Fix metrics auth token detection (#6006) (#6017)
|
|
||||||
* Create repository on organisation by default on its dashboard (#6026) (#6048)
|
|
||||||
* Make sure labels are actually returned in API (#6053) (#6059)
|
|
||||||
* Switch to more recent build of xgo (#6070) (#6072)
|
|
||||||
* In basic auth check for tokens before call UserSignIn (#5725) (#6083)
|
|
||||||
|
|
||||||
[1.9.3]
|
|
||||||
* Update Gitea to 1.7.3
|
|
||||||
* Fix server 500 when trying to migrate to an already existing repository (#6188) (#6197)
|
|
||||||
* Load Issue attributes for API /repos/{owner}/{repo}/issues/{index} (#6122) (#6185)
|
|
||||||
* Fix bug whereby user could change private repository to public when force private enabled. (#6156) (#6165)
|
|
||||||
* Fix bug when update owner team then visit team's repo return 404 (#6119) (#6166)
|
|
||||||
* Fix heatmap and repository menu display in Internet Explorer 9+ (#6117) (#6137)
|
|
||||||
* Fix prohibit login check on authorization (#6106) (#6115)
|
|
||||||
* Fix LDAP protocol error regression by moving to ldap.v3 (#6105) (#6107)
|
|
||||||
* Fix deadlock in webhook PullRequest (#6102) (#6104)
|
|
||||||
* Fix redirect loop when password change is required and Gitea is installed as a suburl (#5965) (#6101)
|
|
||||||
* Fix compare button regression (#5929) (#6098)
|
|
||||||
* Recover panic in orgmode.Render if bad orgfile (#4982) (#5903) (#6097)
|
|
||||||
|
|
||||||
[1.9.4]
|
|
||||||
* Update Gitea to 1.7.4
|
|
||||||
* Fix potential XSS vulnerability in repository description. (#6306) (#6308)
|
|
||||||
* Fix wrong release commit id (#6224) (#6300)
|
|
||||||
* Fix panic on empty signed commits (#6292) (#6300)
|
|
||||||
* Fix organization dropdown not being scrollable when using mouse wheel (#5988) (#6246)
|
|
||||||
* Fix displaying dashboard even if required to change password (#6214) (#6215)
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -4,14 +4,16 @@
|
||||||
"author": "Gitea developers",
|
"author": "Gitea developers",
|
||||||
"description": "file://DESCRIPTION.md",
|
"description": "file://DESCRIPTION.md",
|
||||||
"tagline": "A painless self-hosted Git Service",
|
"tagline": "A painless self-hosted Git Service",
|
||||||
"version": "1.9.4",
|
"version": "1.33.3",
|
||||||
"healthCheckPath": "/healthcheck",
|
"upstreamVersion": "1.22.3",
|
||||||
|
"healthCheckPath": "/explore",
|
||||||
"httpPort": 3000,
|
"httpPort": 3000,
|
||||||
|
"memoryLimit": 536870912,
|
||||||
"addons": {
|
"addons": {
|
||||||
"mysql": { },
|
"mysql": { },
|
||||||
"sendmail": { },
|
"sendmail": { "supportsDisplayName": true },
|
||||||
"localstorage": { },
|
"localstorage": { },
|
||||||
"ldap": { }
|
"oidc": { "loginRedirectUri": "/user/oauth2/cloudron/callback" }
|
||||||
},
|
},
|
||||||
"tcpPorts": {
|
"tcpPorts": {
|
||||||
"SSH_PORT": {
|
"SSH_PORT": {
|
||||||
|
@ -20,20 +22,22 @@
|
||||||
"defaultValue": 29418
|
"defaultValue": 29418
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"manifestVersion": 1,
|
"manifestVersion": 2,
|
||||||
"website": "https://gitea.io",
|
"website": "https://gitea.io",
|
||||||
"contactEmail": "apps@cloudron.io",
|
"contactEmail": "apps@cloudron.io",
|
||||||
"icon": "file://logo.png",
|
"icon": "file://logo.png",
|
||||||
|
"optionalSso": true,
|
||||||
"mediaLinks": [
|
"mediaLinks": [
|
||||||
"https://s3.amazonaws.com/cloudron-app-screenshots/io.gitea.cloudronapp/f89a2ab8d49094c80589f69a2d60bef63b2dbb62/1.png",
|
"https://screenshots.cloudron.io/io.gitea.cloudronapp/1.png",
|
||||||
"https://s3.amazonaws.com/cloudron-app-screenshots/io.gitea.cloudronapp/f89a2ab8d49094c80589f69a2d60bef63b2dbb62/2.png",
|
"https://screenshots.cloudron.io/io.gitea.cloudronapp/2.png",
|
||||||
"https://s3.amazonaws.com/cloudron-app-screenshots/io.gitea.cloudronapp/f89a2ab8d49094c80589f69a2d60bef63b2dbb62/3.png",
|
"https://screenshots.cloudron.io/io.gitea.cloudronapp/3.png",
|
||||||
"https://s3.amazonaws.com/cloudron-app-screenshots/io.gitea.cloudronapp/f89a2ab8d49094c80589f69a2d60bef63b2dbb62/4.png",
|
"https://screenshots.cloudron.io/io.gitea.cloudronapp/4.png",
|
||||||
"https://s3.amazonaws.com/cloudron-app-screenshots/io.gitea.cloudronapp/f89a2ab8d49094c80589f69a2d60bef63b2dbb62/5.png"
|
"https://screenshots.cloudron.io/io.gitea.cloudronapp/5.png"
|
||||||
],
|
],
|
||||||
"tags": [ "version control", "git", "code hosting", "development" ],
|
"tags": [ "version control", "git", "code hosting", "development", "github", "bitbucket", "gitlab" ],
|
||||||
"changelog": "file://CHANGELOG",
|
"changelog": "file://CHANGELOG.md",
|
||||||
"postInstallMessage": "file://POSTINSTALL.md",
|
"postInstallMessage": "file://POSTINSTALL.md",
|
||||||
"minBoxVersion": "1.10.0",
|
"minBoxVersion": "7.5.1",
|
||||||
"documentationUrl": "https://cloudron.io/documentation/apps/gitea/"
|
"forumUrl": "https://forum.cloudron.io/category/19/gitea",
|
||||||
|
"documentationUrl": "https://docs.cloudron.io/apps/gitea/"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
This app packages Gitea <upstream>1.7.4</upstream>
|
|
||||||
|
|
||||||
Gitea is a painless self-hosted Git service. It is similar to GitHub, Bitbucket or Gitlab.
|
Gitea is a painless self-hosted Git service. It is similar to GitHub, Bitbucket or Gitlab.
|
||||||
|
|
||||||
### Purpose
|
### Purpose
|
||||||
|
|
15
Dockerfile
15
Dockerfile
|
@ -1,9 +1,10 @@
|
||||||
FROM cloudron/base:1.0.0@sha256:147a648a068a2e746644746bbfb42eb7a50d682437cead3c67c933c546357617
|
FROM cloudron/base:4.2.0@sha256:46da2fffb36353ef714f97ae8e962bd2c212ca091108d768ba473078319a47f4
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y openssh-server git && \
|
apt-get install -y openssh-server git asciidoctor pandoc && \
|
||||||
rm -rf /etc/ssh_host_* && \
|
rm -rf /etc/ssh_host_* && \
|
||||||
rm -r /var/cache/apt /var/lib/apt/lists
|
rm -r /var/cache/apt /var/lib/apt/lists
|
||||||
|
RUN pip3 install jupyter
|
||||||
|
|
||||||
ADD supervisor/ /etc/supervisor/conf.d/
|
ADD supervisor/ /etc/supervisor/conf.d/
|
||||||
|
|
||||||
|
@ -13,7 +14,15 @@ RUN adduser --disabled-login --gecos 'Gitea' git
|
||||||
RUN passwd -d git
|
RUN passwd -d git
|
||||||
|
|
||||||
RUN mkdir -p /home/git/gitea
|
RUN mkdir -p /home/git/gitea
|
||||||
RUN curl -L https://dl.gitea.io/gitea/1.7.4/gitea-1.7.4-linux-amd64 -o /home/git/gitea/gitea \
|
WORKDIR /home/git
|
||||||
|
|
||||||
|
# for autosign feature
|
||||||
|
ENV GNUPGHOME="/app/data/gnupg"
|
||||||
|
|
||||||
|
# renovate: datasource=github-releases depName=go-gitea/gitea versioning=semver extractVersion=^v(?<version>.+)$
|
||||||
|
ARG GITEA_VERSION=1.22.3
|
||||||
|
|
||||||
|
RUN curl -L https://dl.gitea.io/gitea/${GITEA_VERSION}/gitea-${GITEA_VERSION}-linux-amd64 -o /home/git/gitea/gitea \
|
||||||
&& chmod +x /home/git/gitea/gitea
|
&& chmod +x /home/git/gitea/gitea
|
||||||
|
|
||||||
# setup config paths
|
# setup config paths
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
This app integrates with the Cloudron SSO. Admins on Cloudron automatically
|
This app is pre-setup with an admin account. The initial credentials are:
|
||||||
become admins on Gitea.
|
|
||||||
|
|
||||||
If you want to disable Cloudron SSO, do the following:
|
**Username**: root<br/>
|
||||||
|
**Password**: changeme<br/>
|
||||||
|
|
||||||
* Admin Panel -> Authentication -> 'cloudron' -> Uncheck 'This authentication is activated'
|
Please change the admin password immediately.
|
||||||
* Admin Panel -> Users -> Change Authentication Source to 'Local' and also give a password
|
|
||||||
|
|
||||||
You can edit `/app/data/app.ini` and add any custom configuration. See the
|
|
||||||
[configuration cheat sheet](https://docs.gitea.io/en-us/config-cheat-sheet)
|
|
||||||
for more information.
|
|
||||||
|
|
||||||
|
<sso>
|
||||||
|
Use the `Local` authentication source for logging in as admin.
|
||||||
|
</sso>
|
||||||
|
|
|
@ -48,23 +48,31 @@ ENABLED = true
|
||||||
; APP_DATA_PATH/attachments
|
; APP_DATA_PATH/attachments
|
||||||
PATH =
|
PATH =
|
||||||
|
|
||||||
|
[oauth2_client]
|
||||||
|
ENABLE_AUTO_REGISTRATION = true
|
||||||
|
USERNAME = sub
|
||||||
|
UPDATE_AVATAR = false
|
||||||
|
ACCOUNT_LINKING = auto
|
||||||
|
|
||||||
[mailer]
|
[mailer]
|
||||||
ENABLED = true
|
ENABLED = true
|
||||||
|
|
||||||
; those settings are protected and can't be modified
|
; those settings are protected and can't be modified
|
||||||
HOST = ##MAIL_SERVER:##MAIL_PORT
|
SMTP_ADDR = ##MAIL_SERVER
|
||||||
|
SMTP_PORT = ##MAIL_PORT
|
||||||
USER = ##MAIL_SMTP_USERNAME
|
USER = ##MAIL_SMTP_USERNAME
|
||||||
PASSWD = ##MAIL_SMTP_PASSWORD
|
PASSWD = ##MAIL_SMTP_PASSWORD
|
||||||
FROM = ##MAIL_FROM
|
FROM = ##MAIL_FROM
|
||||||
SKIP_VERIFY = true
|
PROTOCOL = smtps
|
||||||
|
FORCE_TRUST_SERVER_CERT = true
|
||||||
|
|
||||||
|
|
||||||
[security]
|
[security]
|
||||||
; those settings are protected and can't be modified
|
; those settings are protected and can't be modified
|
||||||
INSTALL_LOCK = true
|
INSTALL_LOCK = true
|
||||||
SECRET_KEY = ##SECRET_KEY
|
SECRET_KEY = ##SECRET_KEY
|
||||||
|
REVERSE_PROXY_LIMIT = 1
|
||||||
|
REVERSE_PROXY_TRUSTED_PROXIES = *
|
||||||
|
|
||||||
[service]
|
[service]
|
||||||
DISABLE_REGISTRATION = false
|
DISABLE_REGISTRATION = false
|
||||||
|
@ -95,3 +103,32 @@ PATH =
|
||||||
[indexer]
|
[indexer]
|
||||||
; this setting is protected and can't be modified
|
; this setting is protected and can't be modified
|
||||||
ISSUE_INDEXER_PATH = /app/data/appdata/indexers/issues.bleve
|
ISSUE_INDEXER_PATH = /app/data/appdata/indexers/issues.bleve
|
||||||
|
|
||||||
|
[session]
|
||||||
|
PROVIDER = file
|
||||||
|
PROVIDER_CONFIG = /run/gitea/sessions
|
||||||
|
COOKIE_SECURE = true
|
||||||
|
COOKIE_NAME = cloudron_gitea
|
||||||
|
GC_INTERVAL_TIME = 2592000
|
||||||
|
|
||||||
|
[markup.asciidoc]
|
||||||
|
ENABLED = true
|
||||||
|
FILE_EXTENSIONS = .adoc,.asciidoc
|
||||||
|
RENDER_COMMAND = "asciidoctor -s -a showtitle --out-file=- -"
|
||||||
|
; Input is not a standard input but a file
|
||||||
|
IS_INPUT_FILE = false
|
||||||
|
|
||||||
|
[markup.restructuredtext]
|
||||||
|
ENABLED = true
|
||||||
|
FILE_EXTENSIONS = .rst
|
||||||
|
RENDER_COMMAND = "timeout 30s pandoc +RTS -M512M -RTS -f rst"
|
||||||
|
IS_INPUT_FILE = false
|
||||||
|
|
||||||
|
[markup.jupyter]
|
||||||
|
ENABLED = true
|
||||||
|
FILE_EXTENSIONS = .ipynb
|
||||||
|
RENDER_COMMAND = "jupyter nbconvert --stdin --stdout --to html --template basic"
|
||||||
|
IS_INPUT_FILE = false
|
||||||
|
|
||||||
|
[markup.sanitizer.jupyter.img]
|
||||||
|
ALLOW_DATA_URI_IMAGES = true
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"extends": ["local>devops/renovator//default.renovate.json5"]
|
||||||
|
}
|
|
@ -5,6 +5,7 @@
|
||||||
Port 29418
|
Port 29418
|
||||||
# Use these options to restrict which interfaces/protocols sshd will bind to
|
# Use these options to restrict which interfaces/protocols sshd will bind to
|
||||||
ListenAddress 0.0.0.0
|
ListenAddress 0.0.0.0
|
||||||
|
ListenAddress ::
|
||||||
Protocol 2
|
Protocol 2
|
||||||
# HostKeys for protocol version 2
|
# HostKeys for protocol version 2
|
||||||
HostKey /app/data/sshd/ssh_host_rsa_key
|
HostKey /app/data/sshd/ssh_host_rsa_key
|
||||||
|
|
94
start.sh
94
start.sh
|
@ -2,29 +2,49 @@
|
||||||
|
|
||||||
set -eu -o pipefail
|
set -eu -o pipefail
|
||||||
|
|
||||||
mkdir -p /run/gitea/tmp/uploads /run/sshd
|
mkdir -p /run/gitea/tmp/uploads /run/sshd /run/gitea/sessions
|
||||||
|
|
||||||
setup_ldap_source() {
|
setup_oidc_source() {
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
# Wait for gitea to finish db setup, before we insert ldap source in db
|
echo "==> Setup OIDC source"
|
||||||
while ! curl --fail http://localhost:3000/healthcheck; do
|
|
||||||
echo "Waiting for gitea to come up"
|
now=$(date +%s)
|
||||||
|
mysql -u"${CLOUDRON_MYSQL_USERNAME}" -p"${CLOUDRON_MYSQL_PASSWORD}" -h mysql --database="${CLOUDRON_MYSQL_DATABASE}" -e \
|
||||||
|
"REPLACE INTO login_source (id, type, name, is_active, cfg, created_unix, updated_unix) VALUES (1,6,'cloudron', 1,'{\"Provider\":\"openidConnect\",\"ClientID\":\"${CLOUDRON_OIDC_CLIENT_ID}\",\"ClientSecret\":\"${CLOUDRON_OIDC_CLIENT_SECRET}\",\"OpenIDConnectAutoDiscoveryURL\":\"${CLOUDRON_OIDC_ISSUER}/.well-known/openid-configuration\",\"CustomURLMapping\":null,\"IconURL\":\"\",\"Scopes\":[\"openid email profile\"],\"RequiredClaimName\":\"\",\"RequiredClaimValue\":\"\",\"GroupClaimName\":\"\",\"AdminGroup\":\"\",\"GroupTeamMap\":\"\",\"GroupTeamMapRemoval\":false,\"RestrictedGroup\":\"\"}','${now}','${now}')"
|
||||||
|
}
|
||||||
|
|
||||||
|
setup_root_user() {
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
if sudo -H -u git /home/git/gitea/gitea admin user create --username root --password changeme --email admin@cloudron.local --admin -c /run/gitea/app.ini; then
|
||||||
|
echo "==> root user added"
|
||||||
|
else
|
||||||
|
echo "==> Failed to add root user"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
setup_auth() {
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
# Wait for gitea to finish db setup, before we do any db operations
|
||||||
|
while ! curl --fail http://localhost:3000/explore; do
|
||||||
|
echo "==> Waiting for gitea to come up"
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
||||||
now=$(date +%s)
|
echo "==> Gitea is up, setting up auth"
|
||||||
|
|
||||||
# Get the existing LDAP source status. This allows the user to disable LDAP
|
if [[ -n "${CLOUDRON_OIDC_ISSUER:-}" ]]; then
|
||||||
ldap_status=$(mysql -u"${MYSQL_USERNAME}" -p"${MYSQL_PASSWORD}" -h mysql --database="${MYSQL_DATABASE}" -N -B -e "select is_actived from login_source WHERE name='cloudron';")
|
setup_oidc_source
|
||||||
[[ -z "${ldap_status}" ]] && ldap_status="1"
|
fi
|
||||||
|
|
||||||
if mysql -u"${MYSQL_USERNAME}" -p"${MYSQL_PASSWORD}" -h mysql --database="${MYSQL_DATABASE}" \
|
user_count=$(mysql -u"${CLOUDRON_MYSQL_USERNAME}" -p"${CLOUDRON_MYSQL_PASSWORD}" -h mysql --database="${CLOUDRON_MYSQL_DATABASE}" -N -B -e "SELECT count(*) FROM user")
|
||||||
-e "REPLACE INTO login_source (id, type, name, is_actived, cfg, created_unix, updated_unix) VALUES (1,2,'cloudron',${ldap_status},'{\"Name\":\"cloudron\",\"Host\":\"${LDAP_SERVER}\",\"Port\":${LDAP_PORT},\"UseSSL\":false,\"SkipVerify\":true,\"BindDN\":\"${LDAP_BIND_DN}\",\"BindPassword\":\"${LDAP_BIND_PASSWORD}\",\"UserBase\":\"${LDAP_USERS_BASE_DN}\",\"AttributeUsername\":\"username\",\"AttributeName\":\"displayname\",\"AttributeSurname\":\"\",\"AttributeMail\":\"mail\",\"Filter\":\"(\\\\u007C(mail=%[1]s)(username=%[1]s))\",\"AdminFilter\":\"(memberof=cn=admins,${LDAP_GROUPS_BASE_DN})\"}','${now}','${now}');"; then
|
# be careful, not to create root user for existing LDAP based installs
|
||||||
echo "LDAP Authentication was setup with status ${ldap_status}"
|
if [[ "${user_count}" == "0" ]]; then
|
||||||
else
|
echo "==> Setting up root user for first run"
|
||||||
echo "Failed to setup LDAP authentication"
|
setup_root_user
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,30 +72,26 @@ chmod 0644 /app/data/sshd/*.pub
|
||||||
|
|
||||||
sed -e "s/^Port .*/Port ${SSH_PORT}/" /etc/ssh/sshd_config > /run/gitea/sshd_config
|
sed -e "s/^Port .*/Port ${SSH_PORT}/" /etc/ssh/sshd_config > /run/gitea/sshd_config
|
||||||
|
|
||||||
cp /home/git/app.ini.template "/run/gitea/app.ini"
|
if [[ ! -f /app/data/app.ini ]]; then
|
||||||
|
echo -e "; Add customizations here - https://docs.gitea.io/en-us/config-cheat-sheet/" > /app/data/app.ini
|
||||||
|
|
||||||
# create default user config file
|
echo "==> Generating new SECRET_KEY"
|
||||||
if ! [ -f /app/data/app.ini ]; then
|
|
||||||
cp /home/git/app.ini.template /app/data/app.ini
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$(crudini --get /app/data/app.ini security SECRET_KEY)" == "##SECRET_KEY" ]; then
|
|
||||||
echo "Generating new SECRET_KEY"
|
|
||||||
crudini --set "/app/data/app.ini" security SECRET_KEY $(pwgen -1 -s)
|
crudini --set "/app/data/app.ini" security SECRET_KEY $(pwgen -1 -s)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# merge user config file
|
# merge user config file
|
||||||
|
cp /home/git/app.ini.template "/run/gitea/app.ini"
|
||||||
crudini --merge "/run/gitea/app.ini" < "/app/data/app.ini"
|
crudini --merge "/run/gitea/app.ini" < "/app/data/app.ini"
|
||||||
|
|
||||||
# override important values
|
# override important values
|
||||||
crudini --set "/run/gitea/app.ini" database DB_TYPE mysql
|
crudini --set "/run/gitea/app.ini" database DB_TYPE mysql
|
||||||
crudini --set "/run/gitea/app.ini" database HOST "${MYSQL_HOST}:${MYSQL_PORT}"
|
crudini --set "/run/gitea/app.ini" database HOST "${CLOUDRON_MYSQL_HOST}:${CLOUDRON_MYSQL_PORT}"
|
||||||
crudini --set "/run/gitea/app.ini" database NAME "${MYSQL_DATABASE}"
|
crudini --set "/run/gitea/app.ini" database NAME "${CLOUDRON_MYSQL_DATABASE}"
|
||||||
crudini --set "/run/gitea/app.ini" database USER "${MYSQL_USERNAME}"
|
crudini --set "/run/gitea/app.ini" database USER "${CLOUDRON_MYSQL_USERNAME}"
|
||||||
crudini --set "/run/gitea/app.ini" database PASSWD "${MYSQL_PASSWORD}"
|
crudini --set "/run/gitea/app.ini" database PASSWD "${CLOUDRON_MYSQL_PASSWORD}"
|
||||||
crudini --set "/run/gitea/app.ini" database SSL_MODE "disable"
|
crudini --set "/run/gitea/app.ini" database SSL_MODE "disable"
|
||||||
crudini --set "/run/gitea/app.ini" server PROTOCOL "http"
|
crudini --set "/run/gitea/app.ini" server PROTOCOL "http"
|
||||||
crudini --set "/run/gitea/app.ini" server DOMAIN "${APP_DOMAIN}"
|
crudini --set "/run/gitea/app.ini" server DOMAIN "${CLOUDRON_APP_DOMAIN}"
|
||||||
crudini --set "/run/gitea/app.ini" server ROOT_URL "https://%(DOMAIN)s/"
|
crudini --set "/run/gitea/app.ini" server ROOT_URL "https://%(DOMAIN)s/"
|
||||||
crudini --set "/run/gitea/app.ini" server HTTP_ADDR ""
|
crudini --set "/run/gitea/app.ini" server HTTP_ADDR ""
|
||||||
crudini --set "/run/gitea/app.ini" server HTTP_PORT "3000"
|
crudini --set "/run/gitea/app.ini" server HTTP_PORT "3000"
|
||||||
|
@ -84,21 +100,25 @@ crudini --set "/run/gitea/app.ini" server SSH_PORT "${SSH_PORT}"
|
||||||
crudini --set "/run/gitea/app.ini" server APP_DATA_PATH "/app/data/appdata"
|
crudini --set "/run/gitea/app.ini" server APP_DATA_PATH "/app/data/appdata"
|
||||||
crudini --set "/run/gitea/app.ini" repository ROOT "/app/data/repository"
|
crudini --set "/run/gitea/app.ini" repository ROOT "/app/data/repository"
|
||||||
crudini --set "/run/gitea/app.ini" repository.upload TEMP_PATH "/run/gitea/tmp/uploads"
|
crudini --set "/run/gitea/app.ini" repository.upload TEMP_PATH "/run/gitea/tmp/uploads"
|
||||||
crudini --set "/run/gitea/app.ini" mailer HOST "${MAIL_SMTP_SERVER}:${MAIL_SMTPS_PORT}"
|
crudini --set "/run/gitea/app.ini" mailer SMTP_ADDR "${CLOUDRON_MAIL_SMTP_SERVER}"
|
||||||
crudini --set "/run/gitea/app.ini" mailer USER "${MAIL_SMTP_USERNAME}"
|
crudini --set "/run/gitea/app.ini" mailer SMTP_PORT "${CLOUDRON_MAIL_SMTPS_PORT}"
|
||||||
crudini --set "/run/gitea/app.ini" mailer PASSWD "${MAIL_SMTP_PASSWORD}"
|
crudini --set "/run/gitea/app.ini" mailer PROTOCOL smtps
|
||||||
crudini --set "/run/gitea/app.ini" mailer FROM "${MAIL_FROM}"
|
crudini --set "/run/gitea/app.ini" mailer USER "${CLOUDRON_MAIL_SMTP_USERNAME}"
|
||||||
crudini --set "/run/gitea/app.ini" mailer SKIP_VERIFY "true"
|
crudini --set "/run/gitea/app.ini" mailer PASSWD "${CLOUDRON_MAIL_SMTP_PASSWORD}"
|
||||||
|
crudini --set "/run/gitea/app.ini" mailer FROM "${CLOUDRON_MAIL_FROM_DISPLAY_NAME:-Gitea} <${CLOUDRON_MAIL_FROM}>"
|
||||||
|
crudini --set "/run/gitea/app.ini" mailer FORCE_TRUST_SERVER_CERT "true"
|
||||||
crudini --set "/run/gitea/app.ini" security INSTALL_LOCK "true"
|
crudini --set "/run/gitea/app.ini" security INSTALL_LOCK "true"
|
||||||
|
crudini --set "/run/gitea/app.ini" security REVERSE_PROXY_LIMIT 1
|
||||||
|
crudini --set "/run/gitea/app.ini" security REVERSE_PROXY_TRUSTED_PROXIES "*"
|
||||||
crudini --set "/run/gitea/app.ini" log MODE "console"
|
crudini --set "/run/gitea/app.ini" log MODE "console"
|
||||||
crudini --set "/run/gitea/app.ini" log ROOT_PATH "/run/gitea"
|
crudini --set "/run/gitea/app.ini" log ROOT_PATH "/run/gitea"
|
||||||
crudini --set "/run/gitea/app.ini" indexer ISSUE_INDEXER_PATH "/app/data/appdata/indexers/issues.bleve"
|
crudini --set "/run/gitea/app.ini" indexer ISSUE_INDEXER_PATH "/app/data/appdata/indexers/issues.bleve"
|
||||||
|
|
||||||
mkdir -p /app/data/repository /app/data/ssh /app/data/custom
|
echo "==> Creating dirs and changing permissions"
|
||||||
|
mkdir -p /app/data/repository /app/data/ssh /app/data/custom /app/data/gnupg
|
||||||
chown -R git:git /app/data /run/gitea
|
chown -R git:git /app/data /run/gitea
|
||||||
|
|
||||||
( setup_ldap_source ) &
|
# this expects app.ini to be available
|
||||||
|
( setup_auth ) &
|
||||||
|
|
||||||
exec /usr/bin/supervisord --configuration /etc/supervisor/supervisord.conf --nodaemon -i Gitea
|
exec /usr/bin/supervisord --configuration /etc/supervisor/supervisord.conf --nodaemon -i Gitea
|
||||||
|
|
||||||
|
|
|
@ -8,4 +8,3 @@ stdout_logfile=/dev/stdout
|
||||||
stdout_logfile_maxbytes=0
|
stdout_logfile_maxbytes=0
|
||||||
stderr_logfile=/dev/stderr
|
stderr_logfile=/dev/stderr
|
||||||
stderr_logfile_maxbytes=0
|
stderr_logfile_maxbytes=0
|
||||||
|
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
|
|
||||||
readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
ssh -o IdentitiesOnly=yes -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ${SCRIPT_DIR}/id_rsa "$@"
|
ssh -o IdentitiesOnly=yes -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ${SCRIPT_DIR}/id_ed25519 "$@"
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
-----BEGIN OPENSSH PRIVATE KEY-----
|
||||||
|
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
|
||||||
|
QyNTUxOQAAACDECyFdxcmgOemNvs0wUhkgzfj9IS2OTG6bU5AXfNkXfgAAAJAoNQg/KDUI
|
||||||
|
PwAAAAtzc2gtZWQyNTUxOQAAACDECyFdxcmgOemNvs0wUhkgzfj9IS2OTG6bU5AXfNkXfg
|
||||||
|
AAAEC9nIZlzus9hn/b99E/cnSE2Vpycx0invItrrzgOX9qwMQLIV3FyaA56Y2+zTBSGSDN
|
||||||
|
+P0hLY5MbptTkBd82Rd+AAAADW5lYnVsb25AbHVuYXI=
|
||||||
|
-----END OPENSSH PRIVATE KEY-----
|
|
@ -0,0 +1 @@
|
||||||
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMQLIV3FyaA56Y2+zTBSGSDN+P0hLY5MbptTkBd82Rd+ nebulon@lunar
|
27
test/id_rsa
27
test/id_rsa
|
@ -1,27 +0,0 @@
|
||||||
-----BEGIN RSA PRIVATE KEY-----
|
|
||||||
MIIEowIBAAKCAQEA14L+HdwPXRHC2A+fyRv1FTsRE/OPl0Z0KnEigzIIdA65CzTy
|
|
||||||
l3m3ATNFI1o/Ies7RW6rsr9UHuLLufNVg1NwIBdns8sPE4pSZSjfdPnznifIIs7y
|
|
||||||
wL/vn2D3JEhpA8EOasSy0c+z+6X23evsLB3D81y7ICsBc16Q147WZ6D+QMUP+A4b
|
|
||||||
wlmEcy0hAoPx/jnnPlRDVOK1ZnBvuAaHBkcBh+sA272BhB6Kv13MBu0wctDjKw5w
|
|
||||||
cNmgVWbzBBtK1L8BZVMDKmKWZ2PKP4GkkpnAvkD0+4sdARe148faV8HHigAKKNN7
|
|
||||||
vt+njs6nHuS4ksJL1E9cKGHdBJudJc3p24iI7QIDAQABAoIBABm5ojnQPek/KIIA
|
|
||||||
A3PPKYc6QMSf60EEgPNcA+GjRE0OQNpsnJSmS8kR5KvepvCWksGr/0Tb/9+b9POi
|
|
||||||
b0+40waRpKhakdckSMeYhGwDNihn2UUGbQXDI4hj27xyBE8VaXInPq063OIqInjF
|
|
||||||
I7D0cKKJLDEf0RGDdUi13TQLjK4QX78W/9S8d5ClznAVi4wUBb1urs7fAoVetn/i
|
|
||||||
PnlEj9KZHio4mCg28djTudAoWzjzUikRqKRYY5QNEJ13abVoLqIRSRHC1DzwpxVv
|
|
||||||
Y88l4hmm6IcmWGo0O9lpu5IJFvEmngfpmyaVbeLE0fhLPFWcEHARw37SThTZVQeY
|
|
||||||
Tx1816UCgYEA9j5dyNbFcC4YL9i9DQyut658bYziY2vsAvZNMMf249IJGbZOxlZK
|
|
||||||
ylB00zlbO/2uNh12Y9z6BN2hO2lER3O3SM75tCnvXR0+qG+xmfjLcRVczEkU10+r
|
|
||||||
8UxKBgg7Sf9uvfeONefEYPwiwzFoWgdaFSrR2sCmuoHPwfc9i+PSp+8CgYEA4Azq
|
|
||||||
DToKdv6VBWPlNXT6OW3+HUPeHF087Ve03+3orCckZ+d2DImEOvWdt+pDeGQJJcq+
|
|
||||||
o+SzZk9FjFOIiQehuA44OFrvcbag9YAlm1JQYYrRTdZEJz3iSucXCzJH/P5TrB84
|
|
||||||
BHvzgCklZzZ0IpEFxzMe8oNS6XfJmilh6I98YOMCgYBybOy7xUGeLW1D3p2LENen
|
|
||||||
t0dOyObyeFYF0lpwTpulphZgglz8wWCjvttqw/5nVCy+LNa09RyhYjPoHbSC13zW
|
|
||||||
MofKdqoqRMq3DqAjAn/XHqwuqc8rdnRZ/q9vOigC7NWTJRRKbFbPEps8xRrOqxfr
|
|
||||||
OiimVFul02ito6xP8yAStQKBgQDHbPdPup/h9wzx9U7p3Ct1vt/3cJddK+i1YeIP
|
|
||||||
iBYYVebjzXSYCDd4u3MdZxmTKYey6dnyy/ibUmgXVassPWzHBXEpSFflIaf3nY7b
|
|
||||||
x9LgX82ZuOSFAWJRRYyPXLwTBtW3WTplU2cUZotyaVfKBMfd3TToq9e7E/KQk9Eg
|
|
||||||
Tcdp/QKBgCyKD1gGU/H1bsQOuWHuFR1v7v82V1DLVjyn5kllej0tlfTLO/5uUsEE
|
|
||||||
SIjGHfTHxgpww9HN9BPyy8xdQMAc6p7UyvJAIyhg679AQBrMLLvhE5niaGu4jQOa
|
|
||||||
ZVY6nZUQNCwgxJwnUkFnOyXDYjzjyxZOCAWPxghYbS+IEl1GzhZU
|
|
||||||
-----END RSA PRIVATE KEY-----
|
|
|
@ -1 +0,0 @@
|
||||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDXgv4d3A9dEcLYD5/JG/UVOxET84+XRnQqcSKDMgh0DrkLNPKXebcBM0UjWj8h6ztFbquyv1Qe4su581WDU3AgF2ezyw8TilJlKN90+fOeJ8gizvLAv++fYPckSGkDwQ5qxLLRz7P7pfbd6+wsHcPzXLsgKwFzXpDXjtZnoP5AxQ/4DhvCWYRzLSECg/H+Oec+VENU4rVmcG+4BocGRwGH6wDbvYGEHoq/XcwG7TBy0OMrDnBw2aBVZvMEG0rUvwFlUwMqYpZnY8o/gaSSmcC+QPT7ix0BF7Xjx9pXwceKAAoo03u+36eOzqce5LiSwkvUT1woYd0Em50lzenbiIjt girish@beast
|
|
File diff suppressed because it is too large
Load Diff
|
@ -8,18 +8,11 @@
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"devDependencies": {
|
|
||||||
"ejs": "^2.3.4",
|
|
||||||
"expect.js": "^0.3.1",
|
|
||||||
"mkdirp": "^0.5.1",
|
|
||||||
"mocha": "^2.3.4",
|
|
||||||
"rimraf": "^2.4.4",
|
|
||||||
"superagent": "^1.4.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chromedriver": "^2.38.2",
|
"chromedriver": "^129.0.2",
|
||||||
"selenium-server-standalone-jar": "^3.3.1",
|
"expect.js": "^0.3.1",
|
||||||
"selenium-webdriver": "^3.3.0",
|
"mocha": "^10.7.3",
|
||||||
"superagent": "^1.8.5"
|
"selenium-webdriver": "^4.25.0",
|
||||||
|
"superagent": "^10.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
497
test/test.js
497
test/test.js
|
@ -1,317 +1,225 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
/* jslint node:true */
|
/* jshint esversion: 8 */
|
||||||
/* global it:false */
|
/* global it, xit, describe, before, after, afterEach */
|
||||||
/* global xit:false */
|
|
||||||
/* global describe:false */
|
|
||||||
/* global before:false */
|
|
||||||
/* global after:false */
|
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
require('chromedriver');
|
require('chromedriver');
|
||||||
|
|
||||||
var execSync = require('child_process').execSync,
|
const execSync = require('child_process').execSync,
|
||||||
ejs = require('ejs'),
|
|
||||||
expect = require('expect.js'),
|
expect = require('expect.js'),
|
||||||
fs = require('fs'),
|
fs = require('fs'),
|
||||||
mkdirp = require('mkdirp'),
|
|
||||||
path = require('path'),
|
path = require('path'),
|
||||||
rimraf = require('rimraf'),
|
|
||||||
superagent = require('superagent'),
|
superagent = require('superagent'),
|
||||||
webdriver = require('selenium-webdriver');
|
{ Builder, By, until } = require('selenium-webdriver'),
|
||||||
|
{ Options } = require('selenium-webdriver/chrome');
|
||||||
|
|
||||||
var by = require('selenium-webdriver').By,
|
if (!process.env.USERNAME || !process.env.PASSWORD || !process.env.EMAIL) {
|
||||||
until = require('selenium-webdriver').until,
|
console.log('USERNAME, PASSWORD and EMAIL env vars need to be set');
|
||||||
Builder = require('selenium-webdriver').Builder;
|
process.exit(1);
|
||||||
|
}
|
||||||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
|
||||||
|
|
||||||
describe('Application life cycle test', function () {
|
describe('Application life cycle test', function () {
|
||||||
this.timeout(0);
|
this.timeout(0);
|
||||||
var server, browser = new Builder().forBrowser('chrome').build();
|
|
||||||
var LOCATION = 'test';
|
|
||||||
var SSH_PORT = 29420;
|
|
||||||
var repodir = '/tmp/testrepo';
|
|
||||||
var app, reponame = 'testrepo';
|
|
||||||
var username = process.env.USERNAME;
|
|
||||||
var password = process.env.PASSWORD;
|
|
||||||
var TIMEOUT = parseInt(process.env.TIMEOUT, 10) || 5000;
|
|
||||||
var email, token;
|
|
||||||
|
|
||||||
before(function (done) {
|
const TIMEOUT = parseInt(process.env.TIMEOUT, 10) || 5000;
|
||||||
if (!process.env.USERNAME) return done(new Error('USERNAME env var not set'));
|
const EXEC_ARGS = { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' };
|
||||||
if (!process.env.PASSWORD) return done(new Error('PASSWORD env var not set'));
|
const LOCATION = process.env.LOCATION || 'test';
|
||||||
|
const SSH_PORT = 29420;
|
||||||
|
|
||||||
var seleniumJar= require('selenium-server-standalone-jar');
|
let app, browser;
|
||||||
var SeleniumServer = require('selenium-webdriver/remote').SeleniumServer;
|
let athenticated_by_oidc = false;
|
||||||
server = new SeleniumServer(seleniumJar.path, { port: 4444 });
|
|
||||||
server.start();
|
|
||||||
|
|
||||||
done();
|
const repodir = '/tmp/testrepo';
|
||||||
|
const reponame = 'testrepo';
|
||||||
|
|
||||||
|
const username = process.env.USERNAME;
|
||||||
|
const password = process.env.PASSWORD;
|
||||||
|
|
||||||
|
before(function () {
|
||||||
|
const chromeOptions = new Options().windowSize({ width: 1280, height: 1024 });
|
||||||
|
if (process.env.CI) chromeOptions.addArguments('no-sandbox', 'disable-dev-shm-usage', 'headless');
|
||||||
|
browser = new Builder().forBrowser('chrome').setChromeOptions(chromeOptions).build();
|
||||||
|
if (!fs.existsSync('./screenshots')) fs.mkdirSync('./screenshots');
|
||||||
});
|
});
|
||||||
|
|
||||||
after(function (done) {
|
after(function () {
|
||||||
browser.quit();
|
browser.quit();
|
||||||
server.stop();
|
fs.rmSync(repodir, { recursive: true, force: true });
|
||||||
rimraf.sync(repodir);
|
|
||||||
done();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function waitForUrl(url, done) {
|
afterEach(async function () {
|
||||||
browser.wait(function () {
|
if (!process.env.CI || !app) return;
|
||||||
return browser.getCurrentUrl().then(function (currentUrl) {
|
|
||||||
return currentUrl === url;
|
const currentUrl = await browser.getCurrentUrl();
|
||||||
});
|
if (!currentUrl.includes(app.domain)) return;
|
||||||
}, TIMEOUT).then(function () { done(); });
|
expect(this.currentTest.title).to.be.a('string');
|
||||||
}
|
|
||||||
|
const screenshotData = await browser.takeScreenshot();
|
||||||
|
fs.writeFileSync(`./screenshots/${new Date().getTime()}-${this.currentTest.title.replaceAll(' ', '_')}.png`, screenshotData, 'base64');
|
||||||
|
});
|
||||||
|
|
||||||
function getAppInfo() {
|
function getAppInfo() {
|
||||||
var inspect = JSON.parse(execSync('cloudron inspect'));
|
const inspect = JSON.parse(execSync('cloudron inspect'));
|
||||||
|
app = inspect.apps.filter(function (a) { return a.location.indexOf(LOCATION) === 0; })[0];
|
||||||
app = inspect.apps.filter(function (a) { return a.location === LOCATION; })[0];
|
|
||||||
|
|
||||||
expect(app).to.be.an('object');
|
expect(app).to.be.an('object');
|
||||||
}
|
}
|
||||||
|
|
||||||
function setAvatarOld(done) {
|
async function waitForElement(elem) {
|
||||||
browser.get('https://' + app.fqdn + '/user/settings/avatar').then(function () {
|
await browser.wait(until.elementLocated(elem), TIMEOUT);
|
||||||
return browser.findElement(by.xpath('//input[@type="file" and @name="avatar"]')).sendKeys(path.resolve(__dirname, '../logo.png'));
|
await browser.wait(until.elementIsVisible(browser.findElement(elem)), TIMEOUT);
|
||||||
}).then(function () {
|
|
||||||
return browser.findElement(by.xpath('//button[contains(text(), "Update Avatar Setting")]')).click();
|
|
||||||
}).then(function () {
|
|
||||||
if (app.manifest.version === '1.0.3') {
|
|
||||||
return browser.wait(until.elementLocated(by.xpath('//p[contains(text(),"updated successfully")]')), TIMEOUT);
|
|
||||||
} else {
|
|
||||||
return browser.wait(until.elementLocated(by.xpath('//p[contains(text(),"Your avatar setting has been updated.")]')), TIMEOUT);
|
|
||||||
}
|
|
||||||
}).then(function () {
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setAvatar(done) {
|
function sleep(millis) {
|
||||||
if (app.manifest.version === '1.5.4') return setAvatarOld(done);
|
return new Promise(resolve => setTimeout(resolve, millis));
|
||||||
|
|
||||||
browser.get('https://' + app.fqdn + '/user/settings').then(function () {
|
|
||||||
var button = browser.findElement(by.xpath('//label[contains(text(), "Use Custom Avatar")]'));
|
|
||||||
return browser.executeScript('arguments[0].scrollIntoView(false)', button);
|
|
||||||
}).then(function () {
|
|
||||||
return browser.findElement(by.xpath('//label[contains(text(), "Use Custom Avatar")]')).click();
|
|
||||||
}).then(function () {
|
|
||||||
return browser.findElement(by.xpath('//input[@type="file" and @name="avatar"]')).sendKeys(path.resolve(__dirname, '../logo.png'));
|
|
||||||
}).then(function () {
|
|
||||||
return browser.findElement(by.xpath('//button[contains(text(), "Update Avatar")]')).click();
|
|
||||||
}).then(function () {
|
|
||||||
return browser.wait(until.elementLocated(by.xpath('//p[contains(text(),"Your avatar has been updated.")]')), TIMEOUT);
|
|
||||||
}).then(function () {
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkAvatar(done) {
|
async function setAvatar() {
|
||||||
return done();
|
await browser.get('https://' + app.fqdn + '/user/settings');
|
||||||
superagent.get('https://' + app.fqdn + '/avatars/a3e6f3316fc1738e29d621e6a26e93d3').end(function (error, result) {
|
|
||||||
expect(error).to.be(null);
|
var button = await browser.findElement(By.xpath('//label[contains(text(), "Use Custom Avatar")]'));
|
||||||
expect(result.statusCode).to.be(200);
|
await browser.executeScript('arguments[0].scrollIntoView(false)', button);
|
||||||
done();
|
await browser.findElement(By.xpath('//label[contains(text(), "Use Custom Avatar")]')).click();
|
||||||
});
|
await browser.findElement(By.xpath('//input[@type="file" and @name="avatar"]')).sendKeys(path.resolve(__dirname, '../logo.png'));
|
||||||
|
await browser.findElement(By.xpath('//button[contains(text(), "Update Avatar")]')).click();
|
||||||
|
await browser.wait(until.elementLocated(By.xpath('//p[contains(text(),"Your avatar has been updated.")]')), TIMEOUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
function editFile(done) {
|
async function checkAvatar() {
|
||||||
browser.get('https://' + app.fqdn + '/' + username + '/' + reponame + '/_edit/master/newfile').then(function () {
|
await browser.get(`https://${app.fqdn}/${username}`);
|
||||||
var cm = browser.findElement(by.xpath('//div[contains(@class,"CodeMirror")]'));
|
|
||||||
var text = 'yo';
|
const avatarSrc = await browser.findElement(By.xpath('//div[@id="profile-avatar"]/a/img')).getAttribute('src');
|
||||||
return browser.executeScript('arguments[0].CodeMirror.setValue("' + text + '");', cm);
|
|
||||||
}).then(function () {
|
const response = await superagent.get(avatarSrc);
|
||||||
return browser.findElement(by.xpath('//input[@name="commit_summary"]')).sendKeys('Dummy edit');
|
expect(response.statusCode).to.equal(200);
|
||||||
}).then(function () {
|
|
||||||
return browser.findElement(by.xpath('//button[contains(text(), "Commit Changes")]')).click();
|
|
||||||
}).then(function () {
|
|
||||||
waitForUrl('https://' + app.fqdn + '/' + username + '/' + reponame + '/src/branch/master/newfile', done);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function login(done) {
|
async function login(username, password) {
|
||||||
browser.get('https://' + app.fqdn + '/user/login').then(function () {
|
await browser.get('https://' + app.fqdn + '/user/login');
|
||||||
return browser.findElement(by.id('user_name')).sendKeys(username);
|
|
||||||
}).then(function () {
|
await browser.findElement(By.id('user_name')).sendKeys(username);
|
||||||
return browser.findElement(by.id('password')).sendKeys(password);
|
await browser.findElement(By.id('password')).sendKeys(password);
|
||||||
}).then(function () {
|
await browser.findElement(By.xpath('//form[@action="/user/login"]//button')).click();
|
||||||
return browser.findElement(by.tagName('form')).submit();
|
await browser.wait(until.elementLocated(By.xpath('//img[contains(@class, "avatar")]')), TIMEOUT);
|
||||||
}).then(function () {
|
|
||||||
return browser.wait(until.elementLocated(by.linkText('Dashboard')), TIMEOUT);
|
|
||||||
}).then(function () {
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function addPublicKey(done) {
|
async function adminLogin() {
|
||||||
var publicKey = fs.readFileSync(__dirname + '/id_rsa.pub', 'utf8');
|
await login('root', 'changeme');
|
||||||
|
|
||||||
const sshPage = 'https://' + app.fqdn + '/user/settings/keys';
|
|
||||||
|
|
||||||
browser.get(sshPage).then(function () {
|
|
||||||
return browser.findElement(by.xpath('//div[text()="Add Key"]')).click();
|
|
||||||
}).then(function () {
|
|
||||||
return browser.findElement(by.id('ssh-key-title')).sendKeys('testkey');
|
|
||||||
}).then(function () {
|
|
||||||
return browser.findElement(by.id('ssh-key-content')).sendKeys(publicKey.trim()); // #3480
|
|
||||||
}).then(function () {
|
|
||||||
var button = browser.findElement(by.xpath('//button[contains(text(), "Add Key")]'));
|
|
||||||
return browser.executeScript('arguments[0].scrollIntoView(false)', button);
|
|
||||||
}).then(function () {
|
|
||||||
return browser.findElement(by.xpath('//button[contains(text(), "Add Key")]')).click();
|
|
||||||
}).then(function () {
|
|
||||||
if (app.manifest.version === '1.0.3') {
|
|
||||||
return browser.wait(until.elementLocated(by.xpath('//p[contains(text(), "added successfully!")]')), TIMEOUT);
|
|
||||||
} else {
|
|
||||||
return browser.wait(until.elementLocated(by.xpath('//p[contains(text(), "has been added.")]')), TIMEOUT);
|
|
||||||
}
|
|
||||||
}).then(function () {
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function createRepo(done) {
|
async function loginOIDC(username, password) {
|
||||||
var getRepoPage;
|
browser.manage().deleteAllCookies();
|
||||||
if (app.manifest.version === '1.0.3') {
|
await browser.get(`https://${app.fqdn}/user/login`);
|
||||||
getRepoPage = browser.get('https://' + app.fqdn).then(function () {
|
await browser.sleep(2000);
|
||||||
return browser.findElement(by.linkText('New Repository')).click();
|
|
||||||
}).then(function () {
|
|
||||||
return browser.wait(until.elementLocated(by.xpath('//*[contains(text(), "New Repository")]')), TIMEOUT);
|
await browser.findElement(By.xpath('//a[contains(@class, "openidConnect") and contains(., "Sign in with cloudron")]')).click();
|
||||||
});
|
await browser.sleep(2000);
|
||||||
} else {
|
|
||||||
getRepoPage = browser.get('https://' + app.fqdn + '/repo/create');
|
if (!athenticated_by_oidc) {
|
||||||
|
await waitForElement(By.xpath('//input[@name="username"]'));
|
||||||
|
await browser.findElement(By.xpath('//input[@name="username"]')).sendKeys(username);
|
||||||
|
await browser.findElement(By.xpath('//input[@name="password"]')).sendKeys(password);
|
||||||
|
await browser.sleep(2000);
|
||||||
|
await browser.findElement(By.id('loginSubmitButton')).click();
|
||||||
|
await browser.sleep(2000);
|
||||||
|
|
||||||
|
athenticated_by_oidc = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
getRepoPage.then(function () {
|
await waitForElement(By.xpath('//img[contains(@class, "avatar")]'));
|
||||||
return browser.findElement(by.id('repo_name')).sendKeys(reponame);
|
|
||||||
}).then(function () {
|
|
||||||
var button = browser.findElement(by.xpath('//button[contains(text(), "Create Repository")]'));
|
|
||||||
return browser.executeScript('arguments[0].scrollIntoView(true)', button);
|
|
||||||
}).then(function () {
|
|
||||||
return browser.findElement(by.id('auto-init')).click();
|
|
||||||
}).then(function () {
|
|
||||||
return browser.findElement(by.xpath('//button[contains(text(), "Create Repository")]')).click();
|
|
||||||
}).then(function () {
|
|
||||||
browser.wait(function () {
|
|
||||||
return browser.getCurrentUrl().then(function (url) {
|
|
||||||
return url === 'https://' + app.fqdn + '/' + username + '/' + reponame;
|
|
||||||
});
|
|
||||||
}, TIMEOUT);
|
|
||||||
}).then(function () {
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkCloneUrl(done) {
|
async function logout() {
|
||||||
browser.get('https://' + app.fqdn + '/' + username + '/' + reponame).then(function () {
|
await browser.get('https://' + app.fqdn);
|
||||||
return browser.findElement(by.id('repo-clone-ssh')).click();
|
|
||||||
}).then(function () {
|
await browser.findElement(By.xpath('//img[contains(@class, "avatar")]')).click();
|
||||||
return browser.findElement(by.id('repo-clone-url')).getAttribute('value');
|
await sleep(2000);
|
||||||
}).then(function (cloneUrl) {
|
await browser.findElement(By.xpath('//a[@data-url="/user/logout"]')).click();
|
||||||
expect(cloneUrl).to.be(`ssh://git@${app.fqdn}:${SSH_PORT}/${username}/${reponame}.git`);
|
await sleep(2000);
|
||||||
done();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cloneRepo(done) {
|
async function addPublicKey() {
|
||||||
rimraf.sync(repodir);
|
const publicKey = fs.readFileSync(__dirname + '/id_ed25519.pub', 'utf8');
|
||||||
|
execSync(`chmod g-rw,o-rw ${__dirname}/id_ed25519`); // ssh will complain about perms later
|
||||||
|
|
||||||
|
await browser.get('https://' + app.fqdn + '/user/settings/keys');
|
||||||
|
|
||||||
|
await browser.wait(until.elementLocated(By.id('add-ssh-button')), TIMEOUT);
|
||||||
|
await browser.findElement(By.id('add-ssh-button')).click();
|
||||||
|
await browser.findElement(By.id('ssh-key-title')).sendKeys('testkey');
|
||||||
|
await browser.findElement(By.id('ssh-key-content')).sendKeys(publicKey.trim()); // #3480
|
||||||
|
var button = browser.findElement(By.xpath('//button[contains(text(), "Add Key")]'));
|
||||||
|
await browser.executeScript('arguments[0].scrollIntoView(false)', button);
|
||||||
|
await browser.findElement(By.xpath('//form//button[contains(text(),"Add Key")]')).click();
|
||||||
|
|
||||||
|
await browser.wait(until.elementLocated(By.xpath('//p[contains(text(), "has been added.")]')), TIMEOUT);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function createRepo() {
|
||||||
|
await browser.get(`https://${app.fqdn}/repo/create`);
|
||||||
|
await browser.wait(until.elementLocated(By.id('repo_name')));
|
||||||
|
await browser.findElement(By.id('repo_name')).sendKeys(reponame);
|
||||||
|
var button = browser.findElement(By.xpath('//button[contains(text(), "Create Repository")]'));
|
||||||
|
await browser.executeScript('arguments[0].scrollIntoView(true)', button);
|
||||||
|
await browser.findElement(By.id('auto-init')).click();
|
||||||
|
await browser.findElement(By.xpath('//button[contains(text(), "Create Repository")]')).click();
|
||||||
|
|
||||||
|
await browser.wait(function () {
|
||||||
|
return browser.getCurrentUrl().then(function (url) {
|
||||||
|
return url === 'https://' + app.fqdn + '/' + username + '/' + reponame;
|
||||||
|
});
|
||||||
|
}, TIMEOUT);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function checkCloneUrl() {
|
||||||
|
await browser.get('https://' + app.fqdn + '/' + username + '/' + reponame);
|
||||||
|
await browser.findElement(By.id('repo-clone-ssh')).click();
|
||||||
|
|
||||||
|
var cloneUrl = await browser.findElement(By.id('repo-clone-url')).getAttribute('value');
|
||||||
|
expect(cloneUrl).to.be(`ssh://git@${app.fqdn}:${SSH_PORT}/${username}/${reponame}.git`);
|
||||||
|
}
|
||||||
|
|
||||||
|
function cloneRepo() {
|
||||||
|
fs.rmSync(repodir, { recursive: true, force: true });
|
||||||
var env = Object.create(process.env);
|
var env = Object.create(process.env);
|
||||||
env.GIT_SSH = __dirname + '/git_ssh_wrapper.sh';
|
env.GIT_SSH = __dirname + '/git_ssh_wrapper.sh';
|
||||||
execSync(`git clone ssh://git@${app.fqdn}:${SSH_PORT}/${username}/${reponame}.git ${repodir}`, { env: env });
|
execSync(`git clone ssh://git@${app.fqdn}:${SSH_PORT}/${username}/${reponame}.git ${repodir}`, { env: env });
|
||||||
done();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function pushFile(done) {
|
function pushFile() {
|
||||||
var env = Object.create(process.env);
|
const env = Object.create(process.env);
|
||||||
env.GIT_SSH = __dirname + '/git_ssh_wrapper.sh';
|
env.GIT_SSH = __dirname + '/git_ssh_wrapper.sh';
|
||||||
execSync(`touch newfile && git add newfile && git commit -a -mx && git push ssh://git@${app.fqdn}:${SSH_PORT}/${username}/${reponame} master`,
|
execSync(`touch newfile && git add newfile && git commit -a -mx && git push ssh://git@${app.fqdn}:${SSH_PORT}/${username}/${reponame} main`,
|
||||||
{ env: env, cwd: repodir });
|
{ env: env, cwd: repodir });
|
||||||
rimraf.sync('/tmp/testrepo');
|
fs.rmSync(repodir, { recursive: true, force: true });
|
||||||
done();
|
|
||||||
}
|
|
||||||
|
|
||||||
function addCustomFile(done) {
|
|
||||||
fs.writeFileSync('/tmp/customfile.txt', 'GOGS TEST', 'utf8');
|
|
||||||
execSync(`cloudron exec --app ${app.id} -- mkdir -p /app/data/custom/public`);
|
|
||||||
execSync(`cloudron push --app ${app.id} /tmp/customfile.txt /app/data/custom/public/customfile.txt`);
|
|
||||||
fs.unlinkSync('/tmp/customfile.txt');
|
|
||||||
done();
|
|
||||||
}
|
|
||||||
|
|
||||||
function checkCustomFile(done) {
|
|
||||||
superagent.get('https://' + app.fqdn + '/customfile.txt').end(function (error, result) {
|
|
||||||
if (error) return done(error);
|
|
||||||
|
|
||||||
expect(result.text).to.contain('GOGS TEST');
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function fileExists() {
|
function fileExists() {
|
||||||
expect(fs.existsSync(repodir + '/newfile')).to.be(true);
|
expect(fs.existsSync(repodir + '/newfile')).to.be(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendMail(done) {
|
async function sendMail() {
|
||||||
browser.get(`https://${app.fqdn}/admin/config`).then(function () {
|
await browser.get(`https://${app.fqdn}/admin/config`);
|
||||||
var button = browser.findElement(by.xpath('//button[@id="test-mail-btn"]'));
|
|
||||||
return browser.executeScript('arguments[0].scrollIntoView(true)', button);
|
var button = await browser.findElement(By.xpath('//button[contains(text(), "Send")]'));
|
||||||
}).then(function () {
|
await browser.executeScript('arguments[0].scrollIntoView(true)', button);
|
||||||
return browser.findElement(by.xpath('//input[@name="email"]')).sendKeys('test@cloudron.io');
|
await browser.findElement(By.xpath('//input[@name="email"]')).sendKeys('test@cloudron.io');
|
||||||
}).then(function () {
|
await browser.findElement(By.xpath('//button[contains(text(), "Send")]')).click();
|
||||||
return browser.findElement(by.xpath('//button[@id="test-mail-btn"]')).click();
|
await browser.wait(until.elementLocated(By.xpath('//p[contains(text(), "A testing email has been sent")]')), TIMEOUT);
|
||||||
}).then(function () {
|
|
||||||
return browser.wait(until.elementLocated(by.xpath('//p[contains(text(),"A testing email has been sent to \'test@cloudron.io\'")]')), TIMEOUT);
|
|
||||||
}).then(function () {
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
xit('build app', function () {
|
xit('build app', function () { execSync('cloudron build', EXEC_ARGS); });
|
||||||
execSync('cloudron build', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
it('install app', function () { execSync(`cloudron install --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, EXEC_ARGS); });
|
||||||
});
|
|
||||||
|
|
||||||
it('can login', function (done) {
|
|
||||||
var inspect = JSON.parse(execSync('cloudron inspect'));
|
|
||||||
|
|
||||||
superagent.post(`https://${inspect.apiEndpoint}/api/v1/developer/login`).send({
|
|
||||||
username: username,
|
|
||||||
password: password
|
|
||||||
}).end(function (error, result) {
|
|
||||||
if (error) return done(error);
|
|
||||||
if (result.statusCode !== 200) return done(new Error('Login failed with status ' + result.statusCode));
|
|
||||||
|
|
||||||
token = result.body.accessToken;
|
|
||||||
|
|
||||||
superagent.get(`https://${inspect.apiEndpoint}/api/v1/profile`)
|
|
||||||
.query({ access_token: token }).end(function (error, result) {
|
|
||||||
if (error) return done(error);
|
|
||||||
if (result.statusCode !== 200) return done(new Error('Get profile failed with status ' + result.statusCode));
|
|
||||||
|
|
||||||
email = result.body.email;
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('install app', function () {
|
|
||||||
execSync(`cloudron install --new --wait --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
||||||
});
|
|
||||||
|
|
||||||
it('can get app information', getAppInfo);
|
it('can get app information', getAppInfo);
|
||||||
it('can get the main page', function (done) {
|
|
||||||
superagent.get('https://' + app.fqdn).end(function (error, result) {
|
|
||||||
expect(error).to.be(null);
|
|
||||||
expect(result.status).to.eql(200);
|
|
||||||
|
|
||||||
done();
|
it('can admin login', adminLogin);
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('can login', login);
|
|
||||||
it('can send mail', sendMail);
|
it('can send mail', sendMail);
|
||||||
|
it('can logout', logout);
|
||||||
|
|
||||||
|
it('can login', loginOIDC.bind(null, username, password));
|
||||||
it('can set avatar', setAvatar);
|
it('can set avatar', setAvatar);
|
||||||
it('can get avatar', checkAvatar);
|
it('can get avatar', checkAvatar);
|
||||||
|
|
||||||
|
@ -324,87 +232,60 @@ return done();
|
||||||
it('can clone the url', cloneRepo);
|
it('can clone the url', cloneRepo);
|
||||||
|
|
||||||
it('can add and push a file', pushFile);
|
it('can add and push a file', pushFile);
|
||||||
it('can edit file', editFile);
|
|
||||||
|
|
||||||
it('can add custom file', addCustomFile);
|
it('can restart app', function () { execSync('cloudron restart --app ' + app.id); });
|
||||||
it('can check custom file', checkCustomFile);
|
|
||||||
|
|
||||||
it('can restart app', function (done) {
|
xit('can login', loginOIDC.bind(null, username, password)); // no need to relogin since session persists
|
||||||
execSync('cloudron restart --wait --app ' + app.id);
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('can login', login);
|
|
||||||
it('displays correct clone url', checkCloneUrl);
|
it('displays correct clone url', checkCloneUrl);
|
||||||
it('can clone the url', cloneRepo);
|
it('can clone the url', cloneRepo);
|
||||||
it('file exists in repo', fileExists);
|
it('file exists in repo', fileExists);
|
||||||
|
|
||||||
it('backup app', function () {
|
it('backup app', function () { execSync('cloudron backup create --app ' + app.id, EXEC_ARGS); });
|
||||||
execSync('cloudron backup create --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
it('restore app', function () { execSync('cloudron restore --app ' + app.id, EXEC_ARGS); });
|
||||||
});
|
|
||||||
|
|
||||||
it('restore app', function () {
|
it('can login', loginOIDC.bind(null, username, password));
|
||||||
execSync('cloudron restore --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
||||||
});
|
|
||||||
|
|
||||||
it('can login', login);
|
|
||||||
it('can get avatar', checkAvatar);
|
it('can get avatar', checkAvatar);
|
||||||
it('can clone the url', cloneRepo);
|
it('can clone the url', cloneRepo);
|
||||||
it('file exists in repo', function () { expect(fs.existsSync(repodir + '/newfile')).to.be(true); });
|
it('file exists in repo', function () { expect(fs.existsSync(repodir + '/newfile')).to.be(true); });
|
||||||
|
|
||||||
it('move to different location', function (done) {
|
it('move to different location', async function () {
|
||||||
//browser.manage().deleteAllCookies(); // commented because of error "'Network.deleteCookie' wasn't found"
|
//browser.manage().deleteAllCookies(); // commented because of error "'Network.deleteCookie' wasn't found"
|
||||||
// ensure we don't hit NXDOMAIN in the mean time
|
// ensure we don't hit NXDOMAIN in the mean time
|
||||||
browser.get('about:blank').then(function () {
|
await browser.get('about:blank');
|
||||||
execSync('cloudron configure --wait --location ' + LOCATION + '2 --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
||||||
var inspect = JSON.parse(execSync('cloudron inspect'));
|
|
||||||
app = inspect.apps.filter(function (a) { return a.location === LOCATION + '2'; })[0];
|
|
||||||
expect(app).to.be.an('object');
|
|
||||||
|
|
||||||
done();
|
execSync('cloudron configure --location ' + LOCATION + '2 --app ' + app.id, EXEC_ARGS);
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
it('can get app information', getAppInfo);
|
||||||
|
|
||||||
it('can login', login);
|
it('can login', loginOIDC.bind(null, username, password));
|
||||||
it('can get avatar', checkAvatar);
|
it('can get avatar', checkAvatar);
|
||||||
it('displays correct clone url', checkCloneUrl);
|
it('displays correct clone url', checkCloneUrl);
|
||||||
it('can clone the url', cloneRepo);
|
it('can clone the url', cloneRepo);
|
||||||
it('file exists in repo', function () { expect(fs.existsSync(repodir + '/newfile')).to.be(true); });
|
it('file exists in repo', function () { expect(fs.existsSync(repodir + '/newfile')).to.be(true); });
|
||||||
|
|
||||||
it('uninstall app', function (done) {
|
it('uninstall app', async function () {
|
||||||
// ensure we don't hit NXDOMAIN in the mean time
|
// ensure we don't hit NXDOMAIN in the mean time
|
||||||
browser.get('about:blank').then(function () {
|
await browser.get('about:blank');
|
||||||
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS);
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// check if the _first_ login via email succeeds
|
// No SSO
|
||||||
it('can login via email', function (done) {
|
it('install app (no sso)', function () { execSync(`cloudron install --no-sso --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, EXEC_ARGS); });
|
||||||
execSync(`cloudron install --new --wait --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
||||||
var inspect = JSON.parse(execSync('cloudron inspect'));
|
|
||||||
|
|
||||||
app = inspect.apps.filter(function (a) { return a.location === LOCATION; })[0];
|
it('can get app information', getAppInfo);
|
||||||
expect(app).to.be.an('object');
|
it('can admin login (no sso)', adminLogin);
|
||||||
|
it('can logout', logout);
|
||||||
|
|
||||||
login(function (error) {
|
it('uninstall app (no sso)', async function () {
|
||||||
if (error) return done(error);
|
await browser.get('about:blank');
|
||||||
|
execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS);
|
||||||
// ensure we don't hit NXDOMAIN in the mean time
|
|
||||||
browser.get('about:blank').then(function () {
|
|
||||||
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// test update
|
// test update
|
||||||
it('can install app', function () {
|
it('can install app', function () { execSync(`cloudron install --appstore-id ${app.manifest.id} --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, EXEC_ARGS); });
|
||||||
execSync(`cloudron install --new --wait --appstore-id ${app.manifest.id} --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
||||||
});
|
|
||||||
|
|
||||||
it('can get app information', getAppInfo);
|
it('can get app information', getAppInfo);
|
||||||
it('can login', login);
|
it('can login', loginOIDC.bind(null, username, password));
|
||||||
it('can set avatar', setAvatar);
|
it('can set avatar', setAvatar);
|
||||||
it('can get avatar', checkAvatar);
|
it('can get avatar', checkAvatar);
|
||||||
it('can add public key', addPublicKey);
|
it('can add public key', addPublicKey);
|
||||||
|
@ -412,21 +293,21 @@ return done();
|
||||||
it('can clone the url', cloneRepo);
|
it('can clone the url', cloneRepo);
|
||||||
it('can add and push a file', pushFile);
|
it('can add and push a file', pushFile);
|
||||||
|
|
||||||
it('can update', function () {
|
it('can update', function () { execSync('cloudron update --app ' + app.id, EXEC_ARGS); });
|
||||||
execSync('cloudron install --wait --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
it('can get app information', getAppInfo);
|
||||||
});
|
|
||||||
|
|
||||||
it('can login', login);
|
it('can admin login', adminLogin);
|
||||||
it('can send mail', sendMail);
|
it('can send mail', sendMail);
|
||||||
|
it('can logout', logout);
|
||||||
|
|
||||||
|
it('can login', loginOIDC.bind(null, username, password));
|
||||||
it('can get avatar', checkAvatar);
|
it('can get avatar', checkAvatar);
|
||||||
it('can clone the url', cloneRepo);
|
it('can clone the url', cloneRepo);
|
||||||
it('file exists in cloned repo', fileExists);
|
it('file exists in cloned repo', fileExists);
|
||||||
|
|
||||||
it('uninstall app', function (done) {
|
it('uninstall app', async function () {
|
||||||
// ensure we don't hit NXDOMAIN in the mean time
|
// ensure we don't hit NXDOMAIN in the mean time
|
||||||
browser.get('about:blank').then(function () {
|
await browser.get('about:blank');
|
||||||
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS);
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue