Question

How to change source from github to gitlab for exisiting production application for app platform?

I migrated from github to gitlab because it has option to set protected branches on free tier.

Can someone please suggest how to change the source from github to gitlab for exsiting applications.


Submit an answer
Answer a question...

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Greg M
DigitalOcean Employee
DigitalOcean Employee badge
July 19, 2022

Hello! You can change the source on the app spec from github to gitlab via the UI or API.

For the UI, you just download your app spec in the settings tab, edit the component spec from github to gitlab, and upload the spec yaml back to the UI.

This will create a deployment using your app spec.

From the API, the process is similar, you just upload the app spec using doctl apps update or use the http api.

You may run into an error due to your gitlab account not being associated with your DO account. If that happens you should go to the apps creation page (you won’t need to actually create an app), configure your gitlab access by clicking the gitlab radio button, then hitting manage access (and following the steps to allow DigitalOcean to access your gitlab account).

After that, try updating your app component’s source again by re-uploading the app spec.

Bobby Iliev
Site Moderator
Site Moderator badge
July 19, 2022

Hi there,

One way to do this would be to change your App Spec and specify the new source of your project:

https://docs.digitalocean.com/products/app-platform/reference/app-spec/

You can change the source accordingly and then do a standard deployment with the new app specification.

Hope that this helps!

Best,

Bobby

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.