ci/woodpecker/push/woodpecker Pipeline was successfulDetails
checking if payment is already fulfilled
DESCRIPTION
Invoice generation is dependent on instance_name. Deleting a VM
doesn't delete the corresponding payments record since payment
receipts should be preserved for accounting purposes.
But being heavily dependent on instance_name, without taking deleted
VMs into account produces incorrect behavior under certain
circumstances: if a VM named 'foo' is paid for and is deleted before
its billing cycle is competed and a new VM is created with the same
name, either by the same user or a different user, invoice won't be
generated for the new VM since a payment record already exists for
that billing cycle for the VM named 'foo'.
Marking deleted VMs' payment records unsuitable for checking if a VM
is already paid for will result in correct behavior.
fixes: https://gitea.hostea.org/Hostea/dashboard/issues/38
SUMMARY
The hostnames are partially generated by the Dashboard and
enough.community.
The stuff between angle brackets(`<>`) are substituted and filled-in
by the Dashboard and the stuff between parenthesis(`{}`) are
substituted and filled-in by enough.
URI FORMAT
Gitea URI
<vm-name>.{{ domain }}
Woodpecker URI
<vm-name>-ci.{{ domain }}
Where domain is agreed to be equal to HOSTEA_DOMAIN
fixes: https://gitea.hostea.org/Hostea/dashboard/issues/11
SUMMARY
Commands are now tolerant to being invoked twice.
Command: vm create
Doesn't fail if VM of same name exists with the same
configuration
Doesn't fail if VM of the same name and different configuration
exist. Updates configuration and deploys(pushes to Hostea/fleet
repository) new configuration.
Command: vm delete
Doesn't fail if VM of given name doesn't exist