public function getBaseUrl()

in src/TestUtils/GcloudWrapper/CloudRun.php [205:227]


    public function getBaseUrl($service = 'default')
    {
        if (!$this->deployed) {
            $this->errorLog('The app has not been deployed.');

            return false;
        }
        if ($this->url) {
            return $this->url;
        }
        $cmd = sprintf(
            'gcloud beta %s services describe %s%s --platform %s --project %s',
            self::GCLOUD_COMPONENT,
            $this->service,
            $this->region ? sprintf(' --region %s', $this->region) : '',
            $this->platform,
            $this->project
        );
        $cmd .= '| grep -m1 -oh "https:\/\/.*\.run\.app$"';
        $this->execWithRetry($cmd, 0, $output);

        return $this->url = $output[0];
    }