namelesscoder/typo3-repository-gizzle
Composer 安装命令:
composer require namelesscoder/typo3-repository-gizzle
包简介
GitHub Webhook Listener which releases TYPO3 extensions to TER when tags are created
README 文档
README
This project allows any GitHub-hosted repository containing a TYPO3 CMS extension to be released to the official TYPO3 Extension Repository (hereafter referred to as TER) by adding a very simple GitHub web hook.
The official endpoint of this service is https://release.namelesscoder.net
but you are welcome to install this package on your own and use that
installation location as endpoint.
The project uses Gizzle to listen for GitHub events and uses Gizzle TYPO3 plugins to do the actual uploading. Internally, the Gizzle TYPO3 plugins use the TYPO3 Repository Client.
- https://github.com/NamelessCoder/gizzle
- https://github.com/NamelessCoder/gizzle-typo3-plugins
- https://github.com/NamelessCoder/typo3-repository-client
Requirements
- A public GitHub repository containing your extension's source code.
- For custom endpoints only: access to the
gitandphpCLI commands as well as some way to serve theweb/index.phpfile through HTTP/HTTPS.
Installation
- Edit the settings of your repository and locate "Webhooks & services".
- Click "Add webhook" to create a new hook.
- In "Payload URL", fill in the endpoint URL you wish to use. The default
URL is
https://release.namelesscoder.net - Add your unique credentials and information to the URL. There are two
possible URL formats:
- If your GitHub repository name is not the same as your TER extension
key, a URL like
https://release.namelesscoder.net/my_extension/user:password. must be used - which will release the repository as keymy_extension. - If your GitHub repository is already named the same as your extension
key you can leave out that part of the URL and use a shorter URL like
https://release.namelesscoder.net/user:password. - Alternatively, if you feel more comfortable with it and the endpoint
supports it, use
https://username:password@release.namelesscoder.net/my_extension. This method only works if the server supports theauthnz_external_moduleor corresponding external authentications - see below.
- If your GitHub repository name is not the same as your TER extension
key, a URL like
- Enter a "Secret". We use a fixed secret for now - enter the text
typo3rocks. - Leave the "Which events..." selectors as-is. We only need the
pushevent.
Unfortunately there is no way to isolate an event that only gets dispatched
when you create new tags - which is why we have to listen to all pushes.
We simply ignore those that do not refer to a tag.
Security
Because your credentials are included in the URL, we are doing the following on the default endpoint and you should definitely do the same if you create one:
- The URL is protected by SSL.
- The full URL of requests is never logged.
Please note that this credentials-in-URL approach is considered temporary and is only implemented because there currently are no other ways. The end goal is to use a token solution both for the "Secret" that is currently fixed, as well as for the credentials that must be passed to TER. The former will be solved by creating an official GitHub Service but the latter will depend on work that has to be done on TER or even TYPO3 SSO itself.
If your web server supports it (Apache does via authnz_external_module) then
you can register an external authenticator (change/move the path if needed):
<IfModule authnz_external_module>
DefineExternalAuth fake environment /var/www/release.namelesscoder.net/fake-auth.sh
</IfModule>
...which goes in your virtual host or root server configuration. The fake-auth.sh
script is a dummy that allows any username and password to be authenticated -
and if done this way, this project will instead read those (fake) credentials.
This means you can specify the credentials to use when uploading to TER, as
https://username:password@release.namelesscoder.net/my_extension.
Usage
To create a new TER release from your GitHub repository simply create a new tag and push it. The uploader will then use the message of the commit you tag as the upload comment on TER. To create and push a new tag:
git tag 1.2.3
git push origin 1.2.3
Which creates a new tag called 1.2.3 and pushes it to the remote called origin.
Viewing results
The results of uploads triggered this way can be read in two different places:
- The publicly available message that the release was created gets added as a comment to the commit that was HEAD of the repository when tagging.
- The privately available debugging information can be viewed by locating the "Webhooks & services" panel as described in the installation section, and clicking the URL that was added. A short list of most recent transactions is displayed and clicking each one will allow you to read any technical errors.
Behavior
The behavior of this plugin is very easily described:
- Whenever you push to GitHub, we receive an event.
- We analyse the Payload HEAD:
- If it is not a new tag we exit.
- If it is a new tag we upload a new release.
- We set a "success" status flag on the commit you tagged.
- We add a comment to the commit you tagged, saying it was released to TER.
- We assign a bit of debugging information and send our response to GitHub.
The whole process should only take a couple of seconds, depending on how large your extension is. If at any point during the process an error occurs, it is caught and can be inspected in the web hook response as described above.
namelesscoder/typo3-repository-gizzle 适用场景与选型建议
namelesscoder/typo3-repository-gizzle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 14 次下载、GitHub Stars 达 5, 最近一次更新时间为 2017 年 03 月 23 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「plugin」 「git」 「github」 「HOOK」 「typo3」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 namelesscoder/typo3-repository-gizzle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 namelesscoder/typo3-repository-gizzle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 namelesscoder/typo3-repository-gizzle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
CakePHP 4.x AdminLTE Theme.
Easily manage git hooks in your composer config
MediaWiki extension that allows embedding external content, specified by URL, into your wiki pages
Nagios plugin to verify a git repository.
GitHub Webhook Listener with plugin-based API for creating your own triggerered actions
This project will create a WordPress base installation using wp-cli/wp-cli package and using vlucas/phpdotenv package to expose configuration values in PHP $_ENV super global.
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-03-23