Processing
 

Build artifacts over ssh jenkins - PHP

18/09/2014 05:24#1

Joined at: 12 months ago

Post: 12

Thank: 0

Thanked: 0

Copy only the changed file in bitbucket to the development server , using send build artifacts over ssh jenkins - PHP

HI i am using jenkins and bitbucket , when ever my files changed in bitbucket my jenkins build runs , so now i want to send the chaned file from bitbucket to my development server .

I am using a PHP applicatioin so i just want to copy the changed file .

i checked with this Publish Over SSH in jenkins . and i am not sure what to do exactly

i have few questions with this plugin

  1. I dont understand to set the parameters

Build artifacts over ssh jenkins - PHP

this Source files means a lot of files i think , i want to SSH only the changes file . :(

  1. and the remote directory i dont understand also . in my development server my project is inside /var/www/ so i think build=$BUILD_NUMBER should be /var/www/projrct_name :(

I only wat to copy my changed files in bitbucket to the correct locatiion in my developemnt server , can i do it with this plugin, thank you very much

22/07/2016 04:48Top#2

midan888

Member

Joined at: 9 months ago

Post: 2

Thank: 0

Thanked: 0

Actually I didn't use any plugin to deploy to dev. You code a bash script that after build, jenkins user ssh to dev server, then cd to project dir, and git pulls latest changes. And then I run some standard commands to prepare the project, like clearing caches, installing dependencies etc. This article helped me a lot.

Check this article http://code.tutsplus.com/tutorials/setting-up-continuous-integration-continuous-deployment-with-jenkins--cms-21511, the article is for nodejs app but the idea is the same

Here is my deploy script, its for my Laravel app.

#!/bin/sh ssh projectuser@app.host <<EOF   cd /var/www/projectdir/   git pull origin master   composer install --no-dev -o   php artisan cache:clear   php artisan view:clear   php artisan config:clear   php artisan route:clear   php artisan optimize --force   npm install --production exit EOF 
Similar articles

Non-interactive method for dpkg-reconfigure tzdata

5 years ago - Reply: 3 - Views: 143

monit is not able to read mongod.lock

2 years ago - Reply: 3 - Views: 141

Ubuntu: hadoop command not found

2 years ago - Reply: 4 - Views: 244

C# Mono Console.ReadLine quitting

4 years ago - Reply: 1 - Views: 87

linking jsoncpp on Ubuntu

2 years ago - Reply: 1 - Views: 6

Build artifacts over ssh jenkins - PHP

3 years ago - Reply: 1 - Views: 38

Can't load Metasploit after installation

3 years ago - Reply: 5 - Views: 222

Selenium FirefoxDriver in Headless get error

2 years ago - Reply: 1 - Views: 97

Unable to start MongoDB. ERROR: addr already in use

2 years ago - Reply: 2 - Views: 120

ZSH Agnoster Theme showing machine name

2 years ago - Reply: 4 - Views: 250

Unable to start firefox browser with jenkins user

2 years ago - Reply: 2 - Views: 113

vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re