livecycle / preevy

Quickly deploy preview environments to the cloud!

Home Page:https://preevy.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Preevy deployment with Google cloud

eliyabar opened this issue · comments

Currently, if you'll try to deploy with the GCP driver while your branch name contains Uppercase characters, you'll get the following error

Run echo "/home/runner/work/_actions/livecycle/preevy-up-action/v1.2.0" >> $GITHUB_PATH
Run # Convert the docker-compose-yaml-paths input to an env var
Docker file paths docker-compose.yml
Running Preevy with files: -f docker-compose.yml -f docker-compose.dev.yml 
Using environment ID: preevy-saas-eliyaenvironmentsUI
- Creating Google Cloud machine
✖ Creating Google Cloud machine: Creating from existing snapshot
    Error: Invalid value for field 'resource.labels': ''. Label value 
    'preevy-saas-eliyaenvironmentsUI' violates format constraints. The value 
    can only contain lowercase letters, numeric characters, underscores and 
    dashes. The value can be at most 63 characters long. International 
    characters are allowed.
    Code: 3

Possible solution: lowercase the resource label value.

commented

A good solution might be to set the cloud-machine label to:
substr(lower(envID), 0, 56)+substr(md5(envID), 0, 7)
This would create a label that is both predictable, readable and unique