Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/novaway/deployer-release-check-list
A simple recipe for Deployer to manage a release check-list using Gitlab issues
https://github.com/novaway/deployer-release-check-list
Last synced: about 5 hours ago
JSON representation
A simple recipe for Deployer to manage a release check-list using Gitlab issues
- Host: GitHub
- URL: https://github.com/novaway/deployer-release-check-list
- Owner: novaway
- Created: 2020-01-15T13:19:44.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-02T08:22:31.000Z (about 4 years ago)
- Last Synced: 2024-11-14T21:42:40.111Z (5 days ago)
- Language: PHP
- Size: 84 KB
- Stars: 1
- Watchers: 9
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Release check-list for Deployer
A simple recipe for [Deployer](https://github.com/deployphp/deployer) to manage a release check-list using Gitlab issues.
The idea is to handle a list of mandatory (and non-blocking) tasks for a release.
This is made possible using a Gitlab issue (with its tasks system), with specific title and label (customisable).
## Installation```bash
composer require novaway/deployer-release-check-list
```## Configuration
```php
// deploy.php
getOption('tag')`.
```php
set('rcl_release_version', get('my_release_version'));
```### Examples
In case of an uncompleted mandatory task:
![Uncompleted task](docs/mandatory_task.png "Mandatory task")Reminder for `post-release` tasks:
![Post-release task](docs/reminder.png "Reminder")### Bonus
Get a slack notification for uncompleted post-release tasks (considering you already configured the slack recipe):
```php
// deploy.php
use Deployer\Task\Context;
use Deployer\Utility\Httpie;task('rcl:post-release-slack-reminder', function() {
if (!get('slack_webhook', false)) {
return;
}$pendingPostReleaseTasks = get('rcl_pending_post_release_tasks', []);
if (count($pendingPostReleaseTasks) === 0) {
return;
}$text = implode(PHP_EOL, array_map(function($item) {
return '- '.$item[1];
}, $pendingPostReleaseTasks));$host = Context::get()->getHost()->getHostname();
$attachment = [
'title' => sprintf('[%s][%s] Pending post-release tasks:', $host, get('release_version')),
'text' => $text,
'color' => get('slack_color'),
'mrkdwn_in' => ['text'],
];Httpie::post(get('slack_webhook'))->body(['attachments' => [$attachment]])->send();
});after('success', 'rcl:post-release-slack-reminder');
```