stable
Clone or download
This is part of story #17178 reference my gitlab repositories in my tuleap project To test it, you have to: * Create a repository on your local gitlab * Integrate by hand this repository in your Tuleap (add data to plugin_gitlab_repository table) * Add a secret for this repository in the dedicated table (plugin_gitlab_repository_webhook_secret) * Add in your gitlab repository a post push webhook with the url like: https://tuleap-web.tuleap-aio-dev.docker/plugins/gitlab/repository/webhook where id is the id auto-generated by the MySQL. Also add the secret encrypted with symetric encryption provided by Tuleap. * Webhooks to local network must be allowed. Go to https://gitlab.local/admin/application_settings/network#js-outbound-settings and add "tuleap-web.tuleap-aio-dev.docker" in allowed local domains. * Perform a push to your gitlab repository * The last_push_date in the Tuleap plugin_gitlab_repository table must be updated For now, only the GitLab push event is handled. Change-Id: Ibe8504fe3a0848ebd05ab3c96fe13c9685f69be3
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/gitlab/db/install.sql | +5 | −0 | Go to diff View file |
M | plugins/gitlab/db/uninstall.sql | +1 | −0 | Go to diff View file |
M | plugins/gitlab/include/Repository/GitlabRepositoryDao.php | +22 | −0 | Go to diff View file |
M | plugins/gitlab/include/Repository/GitlabRepositoryFactory.php | +27 | −9 | Go to diff View file |
A | plugins/gitlab/include/Repository/GitlabRepositoryWebhookController.php | +98 | −0 | Go to diff View file |
A | plugins/gitlab/include/Repository/Webhook/EventNotAllowedException.php | +26 | −0 | Go to diff View file |
A | plugins/gitlab/include/Repository/Webhook/MissingKeyException.php | +26 | −0 | Go to diff View file |
A | plugins/gitlab/include/Repository/Webhook/RepositoryNotFoundException.php | +26 | −0 | Go to diff View file |
A | plugins/gitlab/include/Repository/Webhook/Secret/SecretDao.php | +39 | −0 | Go to diff View file |
A | plugins/gitlab/include/Repository/Webhook/Secret/SecretHeaderNotFoundException.php | +26 | −0 | Go to diff View file |
A | plugins/gitlab/include/Repository/Webhook/Secret/SecretHeaderNotMatchingException.php | +26 | −0 | Go to diff View file |
A | plugins/gitlab/include/Repository/Webhook/Secret/SecretNotDefinedException.php | +26 | −0 | Go to diff View file |
A | plugins/gitlab/include/Repository/Webhook/Secret/SecretRetriever.php | +62 | −0 | Go to diff View file |
A | plugins/gitlab/include/Repository/Webhook/WebhookDataExtractor.php | +135 | −0 | Go to diff View file |
M | plugins/gitlab/include/gitlabPlugin.php | +38 | −1 | Go to diff View file |
A | plugins/gitlab/tests/unit/Repository/Webhook/WebhookDataExtractorTest.php | +257 | −0 | Go to diff View file |