Gitlab CI transfer files to remote server (rsync)


Aichichi

I'm using SVN, but I want to continue learning Git, especially Gitlab.

I have the following structure:

MyStructure/
  customer/
    client1/
      delivery.sh
      MyFiletoSend.sh
    client2/
      delivery.sh
      MyFiletoSend2.sh

Currently, "delivery.sh" will send (rsync) the modifications of the file "MyFiletoSend.sh" to the server "client1".

Can I automatically run "delivery.sh" through Gitlab after/before git push?

example:

  • I want to make modifications to the file "MyFiletoSend.sh" from client1/
  • i make changes
  • commit and push
  • Gitlab runs "delivery.sh" on my "client1/" file.
  • Send the file "MyFiletoSend.sh" to the server of "client1" without touching "client2".
Sergio Tanaka

yes it is possible

But first, you need to understand how gitlab ci works. Read this article https://docs.gitlab.com/ee/ci/yaml/

You will create a step in your pipeline that will do what you want after you push your code (in master or any other branch/MR)

Is it work related? You have to create one, you can use this code to help you https://gist.github.com/hnlq715/6c222ba0fd868bae7e4dfd3af61bf26e

Related


Gitlab and CI server

doom I recently moved a repo from bitbucket to gitlab. I now want to use CI (travis or drone) in the repo. After some reading, I found that gitlab builds its own CI (gitlab CI), but it needs to be self-hosted and can't seem to set it up on heroku. I don't want

Gitlab CI transfer files to remote server (rsync)

Aichichi I'm using SVN, but I want to continue learning Git, especially Gitlab. I have the following structure: MyStructure/ customer/ client1/ delivery.sh MyFiletoSend.sh client2/ delivery.sh MyFiletoSend2.sh Currently, "del

rsync latest n files from remote server

John Long time reader, first time poster. I'm trying to sync the latest few log files from a remote server to my laptop. I've come close to: ssh -qx [email protected] "cd /path/to/logs && find . -mtime -1 -print0" | rsync --from0 --files-from=- -avHS "root@exam

How to move multiple files to remote server using rsync?

ice level I'm using rsync to do incremental backups in a server and have created a bash script for this: in fact, it can use ssh to copy multiple files into my local machine at once, and the syntax I'm using is: rsync -aPhv --del user@host:/home/john/files :/h

Gitlab and CI server

doom I recently moved a repo from bitbucket to gitlab. I now want to use CI (travis or drone) in the repo. After some reading, I found out that gitlab builds its own CI (gitlab CI), but it needs to be self-hosted and can't seem to set it up on heroku. I don't

Trying to setup CI with gitlab and remote server

Rajeshwar Pushing to the gitlab repository works fine. A web hook is now added in gitlab on push to call files in the remote server git pull. The PHP code present in this file is to . When I do a git pull from the terminal it works fine. but when i click on th

Transfer files from remote server to remote server

Siddharth I am trying to transfer files from Site5 to Godaddy web hosting account. This Godaddy web hosting account is the one provided for free with the domain, so there is no ssh access. sudo scp -v @:/ home // wordpress.tar -o'StrictHostKeyChecking no'@ www

Transfer files from remote server to remote server

Siddharth I am trying to transfer files from Site5 to Godaddy web hosting account. This Godaddy web hosting account is the one provided for free with the domain, so there is no ssh access. sudo scp -v @:/ home // wordpress.tar -o'StrictHostKeyChecking no'@ www

Gitlab CI transfer files to remote server (rsync)

Aichichi I'm using SVN, but I want to continue learning Git, especially Gitlab. I have the following structure: MyStructure/ customer/ client1/ delivery.sh MyFiletoSend.sh client2/ delivery.sh MyFiletoSend2.sh Currently, "del

Transfer large files from remote server to remote workstation

demo version I have a large file on a server that needs to go into someone's workstation. If (on my own workstation) I open the server folder, and also open another window containing the workstation admin share (c$), and drag a file from the server folder to t

Gitlab CI transfer files to remote server (rsync)

Aichichi I'm using SVN, but I want to continue learning Git, especially Gitlab. I have the following structure: MyStructure/ customer/ client1/ delivery.sh MyFiletoSend.sh client2/ delivery.sh MyFiletoSend2.sh Currently, "del

rsync latest n files from remote server

John Long time reader, first time poster. I'm trying to sync the latest few log files from a remote server to my laptop. I've come close to: ssh -qx [email protected] "cd /path/to/logs && find . -mtime -1 -print0" | rsync --from0 --files-from=- -avHS "root@exam

How to move multiple files to remote server using rsync?

ice level I'm using rsync to do incremental backups in a server and have created a bash script for this: in fact it can use ssh to copy multiple files into my local machine at once, and the syntax I'm using is: rsync -aPhv --del user@host:/home/john/files :/ho

Trying to setup CI with gitlab and remote server

Rajeshwar Pushing to the gitlab repository works fine. A web hook is now added in gitlab on push to call files in the remote server git pull. The PHP code present in this file is to . When I do a git pull from the terminal it works fine. but when i click on th

Gitlab CI transfer files to remote server (rsync)

Aichichi I'm using SVN, but I want to continue learning Git, especially Gitlab. I have the following structure: MyStructure/ customer/ client1/ delivery.sh MyFiletoSend.sh client2/ delivery.sh MyFiletoSend2.sh Currently, "del

Gitlab CI transfer files to remote server (rsync)

Aichichi I'm using SVN, but I want to continue learning Git, especially Gitlab. I have the following structure: MyStructure/ customer/ client1/ delivery.sh MyFiletoSend.sh client2/ delivery.sh MyFiletoSend2.sh Currently, "del

Gitlab CI transfer files to remote server (rsync)

Aichichi I'm using SVN, but I want to continue learning Git, especially Gitlab. I have the following structure: MyStructure/ customer/ client1/ delivery.sh MyFiletoSend.sh client2/ delivery.sh MyFiletoSend2.sh Currently, "del

Transfer files from remote server to remote server

Siddharth I am trying to transfer files from Site5 to Godaddy web hosting account. This Godaddy web hosting account is the one provided for free with the domain, so there is no ssh access. sudo scp -v @:/ home // wordpress.tar -o'StrictHostKeyChecking no'@ www

Transfer large files from remote server to remote workstation

demo version I have a large file on a server that needs to go into someone's workstation. If (on my own workstation) I open the server folder, and also open another window containing the workstation admin share (c$), and drag a file from the server folder to t

Trying to setup CI with gitlab and remote server

Rajeshwar Pushing to the gitlab repository works fine. A web hook is now added in gitlab on push to call files in the remote server git pull. The PHP code present in this file is to . When I do a git pull from the terminal it works fine. but when i click on th