Can you configure an automatic pull using windows task scheduler?

Asked

Viewed 64 times

0

I’m trying to find a way to update a local system on a server using git versioning to have better security and control in my project, but I’m still pretty naive about it. Turns out I wanted to find a way to synchronize the local machine, the github and the server more automatically, whereas the server is not on the same local network the solution I thought was to create a remote repository for the project and set up a script in the server task scheduler to pull at a specific day and time. Then there are some questions:

How do I create a script to run commands in git? Is there a better way to do this? What if there were several other servers that I had to update?

1 answer

0

Yes, there is a better way to do this, and it is through a practice known as Continuous Delivery!

The practice of continuous delivery, in Portuguese, or simply CD, is responsible for executing the deploy in the necessary environments thus performing the delivery of the application. Usually there are development environments (DEV), homologation (HMG) or production (PRD), or only DEV and PRD, or only PRD but with use of slots, common in Azure when using Webapp,... Or in the case of mobile application your last environment can be the very store where you will make the app available to users. Whatever the amount and purpose of your environments you need an orchestration between them to make this deployment, or installation.

When you’re developing, you’ll want any commit in the repository to be installed in the DEV environment. Already in approval only when you have some ready, functional Feature. And in production only when the customer approves or is approved. For this process to work it is necessary to orchestrate the deploy between these environments. Several tools can do this, including some also the code integration step, where compilation or transpilation is done, unit tests are run, and whatever else is needed to generate an installable artifact.

Suggestions:

  1. Azure Devops, works not only with Azure, but aws and with local
  2. Github Actions, latest, but if your code is already on Github, it might be a good alternative
  3. Relate the item, you must install or run from a container, you can even run it on some cloud

Browser other questions tagged

You are not signed in. Login or sign up in order to post.