Versioning of Bitbucket Code

Asked

Viewed 321 times

0

Good afternoon guys, I work at a website development company and we are with the idea/need to host all the sites on github/bitbucket to stop using the old and good FTP as main "versionist" code.

The scolding is that, all sites have a specific server, after all account are separate clients and my idea is the following.

Example of actual use:

  1. Create project on github/bitbucket
  2. Import files to the project
  3. All pushes to the repository must also fall to the client-specific server.

That is, I wanted that in addition to the project being "hosted" on github/bitbucket I would like the pushes to be sent automatically to the client server.

Guys, before you judge me I’m not asking for code or for you to do it for me I’m just wondering if this is possible and if you don’t give me alternatives, links, a north for me to start studying this "functionality". thank you all!!

  • I think the ideal would be to use GIT for versioning and Jenkins to automate the "build" of websites.

  • Nilson, I don’t know Jenkins, but I’m gonna look into him right now, which means he does something like this?

  • Yes, you can, among other things, configure it to check changes in GIT and send files to FTP.

  • Perfect, I’ll study this tool!

  • You want to send as an administrator directly, without a "triage", I see a lot of people doing similar things and that’s where the problems start and make GIT almost useless, I said "almost" because you still have a minimal control, but if the team is large and everyone has the privilege to merge into master then there will be great chances of accidents. From my humble point of view, there must be a Master and then pull-request with Forks, so only the Master approves the merge or not, it seems bureaucratic, but I believe it is relative and goes from the usual use of the probably ideial way.

  • The important thing is to understand what GIT is and how to use it with a large team. But it’s all my opinion, you see that there are people who deliberately disagree with me, which is that I may be mistaken, I’m not an expert or anything. Note that if it’s a simple or small project, maybe it’s not really that much bureaucracy.

  • So William, let me explain +/- how it works here, we have 2 dev only that are 1 front and 1 backend and all our projects are on remote servers using FTP to publish the files but with this in addition to not having control over errors and things like it is also very uncomfortable to work directly with filezila, so we were looking to start using git for these issues.

  • @Developmentodesites as I said, if it’s something simple, really maybe it’s a lot of bureaucracy, then everyone is "Masters", the dev front and the back will be no problem at all, this control does not depend on the software but on configuring in your GIT server, depends a lot on the server you are using if it will be Github or Bitbucket, just to be sure Bitbucket has private option.

  • Exactly William, I’m opting for the bitbucket exactly because it is private.

  • Then learn the basics of Git and on the site register both devs as "master", then both can submit the updates and still have a rollback control

Show 5 more comments

2 answers

2


All pushes to the repository must also fall to the client-specific server.

Search by Deployment (or CD) and helper tools like Jenkins, Codeship, etc.

If you’re already familiar with Git, try Git Hooks.

You also have the option of pipelines Gitbucket which is recent and a bit more complex to configure.

  • Thanks Dipi, I had not seen yet the Pipelinis option of Bitbucket, I went in search and managed to perform exactly what I wanted.

1

There are several tools that you can use for this your scenario, which I indicate is the Visual Studio Team Services (VSTS).

Well, what’s the VSTS? It’s a Devops platform, where you find many features to "improve" your life in a scenario just like this.

Some of the functions are:

  • Versioning, using GIT or TFVC repositories;
  • Agile Planning, Managing all your tasks, your Kanban, etc
  • Automated builds to ensure the quality and integrity of your application
  • Deployment Automatizado

As you can see, you can do a lot there.. To suit this your idea, you can while performing a push to the master, trigger a build process that will perform the validations as if there is no broken code, automated tests, quality, etc, and after that you can start your deployment process and deploy your application to your clients' server.

VSTS is a free tool for teams with up to 5 developers, you also get free 240 minutes per month of build/Deployment for your applications.

Although the tool’s name is Visual Studio Team Services, it doesn’t just work with . Net, you may well use your project in Java for example, since build and deploy agents also run on linux machines, i.e., VSTS is multi-platform.

If you want to know more about VSTS, I have some videos on my channel

Browser other questions tagged

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