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

Sentry recipe fails when there's no .git directory #227

Closed
atymic opened this issue Jul 12, 2019 · 2 comments
Closed

Sentry recipe fails when there's no .git directory #227

atymic opened this issue Jul 12, 2019 · 2 comments
Assignees

Comments

@atymic
Copy link
Contributor

atymic commented Jul 12, 2019

Deployer version: 6.4.5
PHP version: 7.3

When using the sentry recipe, if there's no .git folder the deployment fails. This is because my deployment is run from gitlab CI, inside a docker container.

When using the following:

set('sentry', [
    'organization' => 'org',
    'project' => 'project',
    'token' => 'token...',
    'version' => getenv('CI_COMMIT_SHA'),
]);

I get the error:

The command "cd /path/releases/8 && (git rev-parse HEAD)" failed.  

I tried overriding the commits option to a blank array, but this fails the validation.

set('sentry', [
    'organization' => 'org',
    'project' => 'project',
    'token' => 'token...',
    'version' => getenv('CI_COMMIT_SHA'),
    'commits' => [],
]);

I'd be happy to create a PR to add a check, and skip adding commits if .git isn't present.

@antonmedv
Copy link
Member

PR will be cool.

@atymic
Copy link
Contributor Author

atymic commented Jul 14, 2019

PR open in #228 😄

@atymic atymic closed this as completed Jul 20, 2019
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

2 participants