Skip to content
This repository has been archived by the owner on May 15, 2019. It is now read-only.

Deploy error from Travis. Source repository URL is invalid does not match the expected pattern #164

Closed
HarvsG opened this issue Nov 18, 2017 · 1 comment

Comments

@HarvsG
Copy link

HarvsG commented Nov 18, 2017

So my .travis.yml build usually deploys happily. But after returning to the project after a few months I am finding that I am getting the below error. Looks at the gcloud docs seems to suggest other formats for source repository builds, but I have tried these and have gotten the same error. Please help!

I can manually trigger the build using the UI!

Restarting command:
  $ gcloud --quiet beta functions deploy SpaceXFulfillment --source-url https://source.developers.google.com/p/r-spacex-ai/r/r-SpaceX-AI-google-source-repo --source-path / --trigger-http
WARNING: The --source-url flag is deprecated; use --source instead.
WARNING: The --source-path flag is deprecated; use --source instead.
ERROR: (gcloud.beta.functions.deploy) ResponseError: status=[400], code=[Bad Request], message=[The request has errors
Problems:
Source repository URL is invalid https://source.developers.google.com/p/r-spacex-ai/r/r-SpaceX-AI-google-source-repo/moveable-aliases/master// does not match the expected pattern

I have tried with several other formats!!

Environment details

  • OS: Ubuntu 14.04.5 LTS
  • Node.js version: 6.9.1
  • npm version: 3.10.8
  • @google-cloud/functions-emulator version:
Google Cloud SDK 180.0.0
bq 2.0.27
core 2017.11.10
gsutil 4.28

Steps to reproduce

  1. https://travis-ci.org/HarvsG/r-SpaceX-AI-Bot/builds/304024024
  2. I had the same problem on the CLI Emulator
  3. interestingly if I manually fill in the repository box with the URL instead of just the repo name on the GUI build interface I get the same error. (It works if I just put the repo name).
    image

Thanks!

@HarvsG
Copy link
Author

HarvsG commented Nov 19, 2017

Fixed by using the new command format as found here, although those docs are very confusing as I did not understand regex. So I did the below changes. I have noticed it is /moveable-aliases/ for branches and /fixed-aliases/ for tag. So I made the below change to my .travis.yml file.

-      - gcloud --quiet beta functions deploy SpaceXFulfillment --source-url https://source.developers.google.com/p/r-spacex-ai/r/r-SpaceX-AI-google-source-repo --source-path / --source-branch master --trigger-http
+      - gcloud --quiet beta functions deploy SpaceXFulfillment --source https://source.developers.google.com/projects/r-spacex-ai/repos/r-SpaceX-AI-google-source-repo/moveable-aliases/master --trigger-http

@HarvsG HarvsG closed this as completed Nov 19, 2017
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

1 participant