-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: switch continuous integration system to Drone CI #4
Conversation
I think using the Also test failures I will keep looking into it |
Hi nodiscc, awesome progress here, you're really a gem for Shaarli! 😍 The Shaarli org could have a drone-ci-base repo which could build the image needed for the CI ( The repo could also rebuild that docker image with cron trigger periodically to get other package updates (eg. openssl) if that's a concern. |
Nice work! Yes using the I agree with Immanuel here. We create our PHP CI image with the dependencies we need and we should be fine. It shouldn't require too much support, only when Shaarli changes its dependencies or once a year when a new major PHP version is released. Regarding the errors, they all seem related to the filesystem: writing file without permission to write does not raise exception. I'd guess it might be because tests are running as root; or it might be something specific with that image. |
Shaarli is probably used on several platforms, as in regular x86 servers, RPis, etc. it might be sooner or later requested to provide Docker images to some of them. Lately, I got a request to provide a multi-platform image for one of my projects built with Drone. As Drone's Original ticket with some links to Drone docs: immanuelfodor/kube-karp#2 |
@nodiscc I've initialized a Drone config file based on yours and jsonnet extension for the netscape bookmark parser. It currently hits the same permission issues as this PR. https://github.com/ArthurHoaro/netscape-bookmark-parser/pull/1/files |
The permission problem should be resolved. You need multiple things:
|
|
ok everything appears to be working except
@ArthurHoaro any idea? Edit: https://stackoverflow.com/questions/50435632/iconv-return-incorrect-string-in-phpunit may be related |
You should try to explicitly install related locales (de_DE her).
I guess |
For extensions, I haved successfully used this in the past which made things way easier: https://github.com/mlocati/docker-php-extension-installer/ |
When we try to access the atom feed and have no bookmarks, it raised the following exception : ``` Call to a member function reorder() on array /webroot/application/bookmark/BookmarkFileService.php:143 #0 /webroot/application/feed/FeedBuilder.php(106): Shaarli\Bookmark\BookmarkFileService->search(Array, 'public', false, false, true) #1 /webroot/application/front/controller/visitor/FeedController.php(47): Shaarli\Feed\FeedBuilder->buildData('atom', Array) #2 /webroot/application/front/controller/visitor/FeedController.php(20): Shaarli\Front\Controller\Visitor\FeedController->processRequest('atom', Object(Slim\Http\Request), Object(Slim\Http\Response)) #3 [internal function]: Shaarli\Front\Controller\Visitor\FeedController->atom(Object(Slim\Http\Request), Object(Slim\Http\Response), Array) #4 /webroot/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(40): call_user_func(Array, Object(Slim\Http\Request), Object(Slim\Http\Response), Array) #5 /webroot/vendor/slim/slim/Slim/Route.php(281): Slim\Handlers\Strategies\RequestResponse->__invoke(Array, Object(Slim\Http\Request), Object(Slim\Http\Response), Array) #6 /webroot/application/front/ShaarliMiddleware.php(55): Slim\Route->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response)) #7 [internal function]: Shaarli\Front\ShaarliMiddleware->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route)) #8 /webroot/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Array, Array) #9 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route)) #10 /webroot/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route)) #11 /webroot/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->Slim\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response)) #12 /webroot/vendor/slim/slim/Slim/Route.php(268): Slim\Route->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response)) #13 /webroot/vendor/slim/slim/Slim/App.php(503): Slim\Route->run(Object(Slim\Http\Request), Object(Slim\Http\Response)) #14 /webroot/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response)) #15 /webroot/vendor/slim/slim/Slim/App.php(392): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response)) #16 /webroot/vendor/slim/slim/Slim/App.php(297): Slim\App->process(Object(Slim\Http\Request), Object(Slim\Http\Response)) #17 /webroot/index.php(177): Slim\App->run(true) #18 {main} ```
95603ed
to
8ae1bd1
Compare
php/node pipelines are implemented https://cloud.drone.io/nodiscc/Shaarli/168. ~10s faster than previous Travis suite.
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires pubsubhubbub/publisher dev-master -> satisfiable by pubsubhubbub/publisher[dev-master].
- pubsubhubbub/publisher dev-master requires php ~5.4 || ~7.0 -> your php version (8.0; overridden via config.platform, actual: 8.0.3) does not satisfy that requirement.```
|
I haven't tried this plugin yet but maybe the cache miss is related to one of these issues?
Btw 14-20s of build time is pretty neat anyways! 🏆 |
fixed
@ArthurHoaro pubsubhubbub/publisher explicitly requires php 5.6 or 7.0, I can add |
I'll submit a PR there to fix that. In the meantime, if the UT are passing it's fine, |
351157a
to
c23b4af
Compare
d60b42b
to
d622b83
Compare
- add .drone.yml, reimplement tasks from .travis.yml (php/node/python test suites) - ref. shaarli#1649 - https://www.drone.io/enterprise/opensource/ - https://cloud.drone.io/shaarli/Shaarli/settings - https://docs.drone.io/pipeline/docker/syntax/steps/ - https://docs.drone.io/pipeline/docker/syntax/cloning/ - https://docs.drone.io/pipeline/environment/reference/ - https://docs.drone.io/pipeline/configuration/ - https://docs.drone.io/pipeline/overview/ - https://docs.drone.io/pipeline/docker/syntax/volumes/ - https://docs.drone.io/pipeline/docker/syntax/volumes/temporary/ - disable builtin drone clone action since it only supports cloning as root (drone/drone-git#23, https://docs.drone.io/pipeline/docker/syntax/cloning/) + use shallow git clone - php: use custom php base images with prebuilt PHP extensions and composer (speed up build process) (https://hub.docker.com/r/shaarli/drone-ci-base, https://www.github.com/shaarli/drone-ci-base, https://hub.docker.com/repository/docker/shaarli/drone-ci-base/builds) - no need to port $PATH update command, the default node:10 image already has the correct $PATH - don't force pull of latest images to speed up builds - the default is to use a local/cached image when the image is not tagged :latest - https://docs.drone.io/pipeline/docker/syntax/parallelism/ - https://docs.drone.io/pipeline/environment/reference/drone-git-http-url/ - ignore PHP version requirements for https://packagist.org/packages/pubsubhubbub/publisher, pending merge of pubsubhubbub/php-publisher#11 - closes shaarli#1649
- use cloud.drone.io badges for builds on the master branch - stable/0.x badges will need to be updated when the next stable/0.x release is published
There was a stray Moved to shaarli#1741 |
https://cloud.drone.io/nodiscc/Shaarli