Skip to content
This repository has been archived by the owner on Apr 26, 2020. It is now read-only.

[slack] No branch or commit name #215

Closed
andrey-helldar opened this issue Feb 22, 2019 · 2 comments
Closed

[slack] No branch or commit name #215

andrey-helldar opened this issue Feb 22, 2019 · 2 comments

Comments

@andrey-helldar
Copy link

Q A
Issue Type Bug
Deployer Version 6.4.3
Recipes Version 6.2.1
Local Machine OS windows 10
Remote Machine OS centos 7 on production and ubuntu 18 on deployment

Description

In the sent message in the slak there is no name of the branch or commit

Steps to reproduce

php artisan deploy --revision=$CI_COMMIT_SHA

photo_2019-02-22_09-54-36

@pedroresende
Copy link

exactly the same problem with --tag

@pedroresende
Copy link

pedroresende commented Feb 5, 2020

@andrey-helldar found a work around for this.

In your deploy.php file, add the following

set('revision', function() {
    return runLocally('git rev-parse HEAD');
});
set('slack_text', 'Deploying `{{revision}}` to *{{stage}}*');

for the case of the tag,

set('tag', function() {
    return runLocally('git describe --tags');
});
set('slack_text', 'Deploying `{{tag}}` to *{{stage}}*');

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants