ADS: Automatic Deployment Script

Automatic Deployment

Note for lazy people : download ADS from Source forge now.

 

Description

Automatic Deployment Script is a tool to help web developers who use SVN for version control. It automatically updates the demo server with changes as soon as they commit changes to repository.

It makes our life easier as web developer, when we have to give demo to clients frequently, and more then one person working on project, it is very hard to keep track of all the changes. To solve these, ADS employs svn hook’s to execute itself when an commit is detected by svn repository. It also sends emails to developers and testers when it successfully uploads files to server.

Even if it fails to upload the files for some reason, we still have a place where all the files that has been changed are exported so one can easily upload the files manually.

After successful upload

Features

  • Exports only those files that has been changed during a commit.
  • FTP the file to demo server.
  • sends emails to developers and testers, or anyone you wish to.
  • it sends list of files that has been exported as attachment.
  • it sends two mails, one before deployment and other after deployment.
  • it keeps a detailed log of all the activity it does.
  • Easy to backtrack the steps.
  • Exports changes in only those repository which are set for use with ADS.

Requirements

PHP 4.4.0+

SVN 1.3.0+
Windows It is tested only on windows operating system, but with little modification it can be used with Linux also.

Download

Download the latest version of ADS: Automatic deployment script from sourceforge.

Once you’re ready, read the installation instructions below.

Installation and Usage

Installation

  1. Extract the compressed file.
  2. Put these files in you localhost.
  3. edit the “post-commit.bat” to reflect the correct path for ADS according to your installation.
  4. now put this file(post-commit.bat) to “hooks” directory of your svn repository
  5. make sure that “ads_tmp” folder is writable. that’s it you are ready to use…. when we will get the time we will make installer for this. :)

Usage

  1. To use ADS with an existing repository
    1. first point your browser to index page of ADS, here fill the ftp details and email address.
    2. download the “ads.xml” file.
    3. now we need to add this(ads.xml) file to our root folder of repository for that project. For example as shown in image, my source code is in “adsweb” folder so ads.xml file is in root of this folder.
  2. To use ADS with new project
    1. first create the repository then add the “ads.xml” as explained above. now add the files and they will be uploaded as it is.

Note:

  1. Please note that while providing ftp username, make sure that it is locked to htdocs or www or whatever is your main folder on the server where you want the files to upload, as ADS assumes that when it connects to ftp server the root directory is where it needs to upload the files and does not change the directory.
  2. their should not be any space in folder name or upload may fail.

if you still have problem or doubt please send a mail to me or leave comment below.

Screenshots


Screenshot: This shows when upload starts..

ftp details

ADS: Information To FillADS: downloading ads.xml file

Contribute

If you find ADS useful, have found a bug, or want to request a feature, please get in touch either via e-mail or through our Sourceforge project page.

The only way to make ADS a better product is by using it and coming with bugs. We think ADS is pretty good at doing its job, but then again you might write something weird that causes it to barf, so let us know how it faired against your code.

Access to SVN

If your hunting bugs, grab the latest version from SVN or check against SVN via the Web.

svn co https://adscript.svn.sourceforge.net/svnroot/adscript adscript

Copyright and License

The information below applies to everything in the distribution, except where noted.

This program is free software; you can redistribute it and/or modify it

under the terms of the Mozilla Public License Version 1.1.This program is distributed in the hope that it will be useful, but WITHOUT

ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or

FITNESS FOR A PARTICULAR PURPOSE. See the Mozilla Public License for

more details.

Mozilla Public License Version 1.1

8 thoughts on “ADS: Automatic Deployment Script

  1. Hi Amit,
    I have some query. I want to automate a process of build. I want to replace the old build with new build and then I need to update the schema with current schema. I want to compare the schema and then run the difference script to update the schema. Can you suggest some good tool to automate the entire process.

  2. Pingback: PuneTech » Blog Archive » Techstart.in: Nurturing the passion of our engineering students

  3. Hi,

    I’m trying to make use of your solution on Windows Server 2003 R2 x64 running VisualSVN Server 1.6.4.

    The post-commit hook looks like below:

    @echo off
    echo %date% %time% Executing SVN post-commit script: http://xxxxx.org/alex/ads/index.php?repo=%1*%2 >> %1ads.log
    start c:progra~1intern~1iexplore.exe http://xxxxx.org/alex/ads/index.php?repo=%1*%2
    exit /b 1

    I’ve created a new repository for testing, created a “trunk[ProjectName]” path and committed ads.xml as well as some other files there.
    (Please confirm that XML file should be committed to SVN rather than put on the repository directory on SVN server. It doesn’t work for me in either case :( ).

    After I enable the post-commit hook, I try adding/deleting files from the created folder, and even for a single added file the commit process hangs.

    ads.log contains the following:

    DATE: 24, Mar 2009 Time: 07:26:05 Message: SVN_class:Creating Filelist
    DATE: 24, Mar 2009 Time: 07:26:05 Message: SVN_class:
    DATE: 24, Mar 2009 Time: 07:26:05 Message: SVN_class:

    ads_tmpfilelist.txt file is created and left empty.
    The ads_tmp folder is accessible to everyone, and has the same security permissions as the ads.log file (which is writeable as you see above).

    Let me know if you have any clues or suggestions.

    Thanks in advance.

    • can you check and confirm that in ‘svn.php’ file , line number 42 “$output=shell_exec($cmd);” is giving the correct output. I think their is problem in executing shell_exec command.

  4. Hi,
    Could you guide me as to what steps i need to take in order for me to run it for linux. I am an absolute newbie to svn but i need to do this. I am running tortoise svn on client side and the server is linux based.

  5. I have been able to convert the script to run in linux but i wanted to know what kind of command i should give in the post-commit file so that a request could be sent to ads i have tried elinks but it is not able to run the ajax

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>