linux ftp serverLinux serverNETWORK ADMINISTRATIONS

AutoDeploy from Git to Server via FTP using Bitbucket Pipelines [FULL explanation]

DETAILED, STEP BY STEP EXPLANATION
AutoDeploy from Git to Server via FTP using Bitbucket Pipelines.
***
In this video I’ve connected my test Bitbucket Repository with my Live Remote Server via FTP connection using Bitbucket Pipelines.
So I’ve built auto deployment system, that will synchronize my remote server with connected Bitbucket Repository via FTP credentials using PHP language for each commit.
I’ve recorded this video without any ready stuff, so You can follow my steps. I’ve tried to explain all things step by step with teporary description-shortcuts.

——————————————————

Bellow is short described steps that you can do for successfully building auto deploying system.

1. Go to Pipelines page in your Bitbucket Repository.

2. Select usable language (auto generated file related with this selecttion).

3. Type this in auto-generated (bitbucket-pipelines.yml) file and commit it:

# This is a sample build configuration for PHP.
# Check our guides at https://confluence.atlassian.com/x/e8YWN for more examples.
# Only use spaces to indent your .yml configuration.
# ——
# You can specify a custom docker image from Docker Hub as your build environment.
image: php:7.1.1
# In script commands below we will do following stuff:
# installing YAML file configuration
# installing composer and setting up environment variable
# installing Git FTP service without “y/n” answer requirements

pipelines:
default:
– step:
caches:
– composer
script:
– apt-get update && apt-get install -y unzip
– curl -sS https://getcomposer.org/installer | php — –install-dir=/usr/local/bin –filename=composer
– apt-get -qq install git-ftp

4. Go to Settings – Environment Variables (for current Repo) and create these 3 variables:
FTP_USERNAME
FTP_PASSWORD (it will be useful to hide this value with checking “Secure” mode)
FTP_HOST_PATH
and fill values as you have for FTP connection with you remote server.

5. Add this line in your created “bitbucket-pipelines.yml” file and commit it!

– git ftp init –user $FTP_USERNAME –passwd $FTP_PASSWORD $FTP_HOST_PATH

6. Go to Sources Page in current Repo from there edit .yml file. Rewrite the word “init” with “push” in last added script command and commit it again:

– git ftp push –user $FTP_USERNAME –passwd $FTP_PASSWORD $FTP_HOST_PATH

7. Delete the unnecessary already uploaded “bitbucket-pipelines.yml” file from your Remote Server (via cPanel, FTP or something else)

8. Go to Sources Page in current Repo and there just create the ignore-file with name “.git-ftp-ignore”, write there the name of autogenerated pipeline file, and commit it:

bitbucket-pipelines.yml

9. Pull the last changes from your Repo to your local.

10. That’s it all. Now you can change something in your project and commit+push that. After successfully pushing It will automatically deploy your changes from Bitbucket Repo to your Remote server that you have connected via FTP credentials.

——————————————————

Cover tracks:
Ոստան Հայոց – Քաշվանք / Vostan Hayots – Qashvanq
Տորք Անգեղ – Առաքել Մուշեղ / Dorck Angegh – Araqel Mushegh
Ձայն մը հնչեց / Dzayn m@ h@nchec
Կավիճ – Հոգուդ Անասունը / Kavitch – Hogud Anasune

source

by Bool False

linux ftp server

Leave a Reply

Your email address will not be published. Required fields are marked *