1

Codemagic is a build service for flutter applications it has built in support for bitbucket, github, etc. However it also supports linking repositories from other sources. To set this up you they ask you for a specificish format. URL should be in the following format: https://example.com/username/repo.git or git@example.com/username/repo.git.

I'm trying to figure out how to provide a url for my google cloud source repo in this format. I've tried this https://source.developers.google.com/p/[project-name]/r/[repo-name/ but then it complains about credentials. If I use the 'git@source.developers.google.com/.....' format I get an option to load an ssh key to authenticate and that passes verification but it doesn't correctly register/see the repo at the endpoint so something is off.

Anyone ever done this before. I've seen something about signed urls with google cloud and thought maybe I could use the https: format both make a signed url though everything i've seen with signed urls has to do with cloud storage and not cloud source.

user2561417
  • 295
  • 4
  • 13

2 Answers2

3

I was able to add Google Cloud Source Repo to Codemagic using next link

ssh://mikhail@example.com@source.developers.google.com:2022/p/woven-voyage-xxxxx/r/test

You need also register your SSH key https://source.cloud.google.com/user/ssh_keys?register=true

Mikhail Tokarev
  • 2,843
  • 1
  • 14
  • 35
  • Thank you. I already had my ssh keys setup it was just a syntax issue with the url. ssh://mikhail@example.com was the part I was missing. – user2561417 Jan 25 '20 at 22:53
  • This worked. But, build is not get triggered when I push the code to the "test" branch(which is my target branch to trigger a build). I'm sure I followed all the steps in setting up the trigger. Any idea? – Soorya Aug 10 '20 at 08:14
0

In addition to @Mikhil Tokarev's answer, You need to add a webhook manually after adding the Google source repository. Please see my answer detailed instruction in this thread https://stackoverflow.com/a/63362923/11082769

Soorya
  • 641
  • 9
  • 16