GIT & Wappler Targets - how do they work?

Hey all,

So it looks like there is one local GIT, that we can then push to a remote, yet we have multiple targets.

Our dev target uses a local DB etc. whereas our prod target uses remote DB’s and different Stripe credentials etc.

Can someone explain how the local git works specifically in relation to targets to make sure that when we push to remote git (When then is what we are intending to use for deployment) we only push the production target?

Thanks!

Does this help at all?

Git Remote Repositories

Repository (Clone)

Usually when you want to start working with a remote git repository, you want to copy its contents to a local repository copy. This is also called “clone”

In Wappler this is easily done, by just making a blank new Wappler project.

etcetera etcetera follows –

and then for further info

[Note: You can use HTTPS urls or special SSH urls for remote repositories. See https://help.github.com/en/articles/which-remote-url-should-i-use](Note: You can use HTTPS urls or special SSH urls for remote repositories. See https://help.github.com/en/articles/which-remote-url-should-i-use)

Thanks for the reply NewMedia.

Unfortunately not, I’m fine connecting/managing GIT from within Wappler - what I’m trying to understand is how the repository, local and then remote work with the different Wappler Targets as information in my prod target is different to local - and I’m not sure the remote git would know the difference.

Gotcha – there’s the generic instructions & then there’s the Wappler way itself, which may be modified from version to version.

I’m to keep an eye on the answers you get!

1 Like

Hey @George - I wonder if you can share some expertise/guidance here.

Looking at GitLab, they have the environments option - so you can deploy to staging/production.

https://docs.gitlab.com/ee/ci/environments/

Looking at App Platform with DO - you can it seems choose the correct environment it’ll build from (e.g. production only).

What Gitlab instructs is to edit the .gitlab-ci.yml file with the deployment environment information.

E.g:

deploy_staging:
  stage: deploy
  script:
    - echo "Deploy to staging server"
  environment:
    name: staging
    url: https://staging.example.com

However, Wappler’s implementation of Git is not specific to Gitlab so naturally no specific gitlab-ci.yml file.

Can you advise if it is possible to define git push to remote with specific targets/environments in Wappler (e.g. so App Platform only picks up our prod environment to build) ?

And if it is - how I would go about doing it. If it is not possible, that if this is something that could be implemented in Wappler at some point?

Thanks!

Little bump - would certainly appreciate some guidance from the team in how Wappler handles git + targets.

1 Like

Bump, bump. Not a small concern.

1 Like