You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It was discovered that if you push a tag into your Bitbucket repo, Lagoon appears to interpret the resulting webhook payload this as a branch, and deploys it. The same with tag deletion, Lagoon will delete any non-production environment with that tag name.
To Reproduce
Steps to reproduce the behavior:
Create a new dev environment called develop, and push this branch
Wait for environment to be created
Push a new tag called develop attached to any other SHA
Wait for environment to be deployed
Notice that you deployed a tag, when this is not supported in Lagoon
Delete the tag develop
Notice how the environment is deleted, but the branch was not deleted
N.B. You cannot delete production environments through this method, as they have an added layer of protection.
Describe the bug
It was discovered that if you push a tag into your Bitbucket repo, Lagoon appears to interpret the resulting webhook payload this as a branch, and deploys it. The same with tag deletion, Lagoon will delete any non-production environment with that tag name.
To Reproduce
Steps to reproduce the behavior:
develop
, and push this branchdevelop
attached to any other SHAdevelop
N.B. You cannot delete production environments through this method, as they have an added layer of protection.
Expected behavior
Tag pushes and deletions are ignored
Documentation
The payloads can be found at https://support.atlassian.com/bitbucket-cloud/docs/event-payloads/
Lagoon code in question
https://github.com/amazeeio/lagoon/blob/master/services/webhooks2tasks/src/webhooks/projects.ts#L197-L214
The text was updated successfully, but these errors were encountered: