Skip to content

Deployment using git

DanielBerman edited this page Aug 26, 2013 · 3 revisions

Introduction

The following example walks you through the steps for git development using the phpCloud. For each application deployed by phpCloud, a web interface corresponding to the git repository is created. This repository can be used for continuous deployment of the application. This workflow ensures a fast and dynamic application development process.

Prerequisites

  • Active phpCloud account.
  • PHP project created by phpCloud web user interface.

Commands

# clone project repository from phpCloud
$ zend clone project -r <phpCloud_git_repo_url> -p <repository_password>

Cloning into TestApp…
remote: Counting objects: 78
remote: Compressing objects: 100% (63/63)
Receiving objects:      100% (78/78)
Resolving deltas:       100% (35/35)
Updating references:    100% (1/1)
The remote name used to keep track of the phpCloud repository is: phpcloud

# go into cloned application root directory
$ cd TestApp

# push changes to phpCloud repository
$ zend push application -p <repository_password> 

Counting objects:       2
Finding sources:        100% (2/2)
Getting sizes:          100% (1/1)
Compressing objects:    100% (1/1)
Writing objects:        100% (2/2)
Remote name: refs/heads/master, status: OK
Remote name: refs/heads/master, result: FAST_FORWARD

Details

We start by cloning a git repository from phpCloud. As a result of this process, a repository is cloned in a current location. Additionally, a new remote was added, called 'phpcloud'. After that application is ready for development. Now, to test changes which were made we call second command to push changes from local repository to remote one. By default, this command uses 'phpcloud' remote. It is possible to define a different remote by using proper option. Before push is performed, all local changes (added/removed/modified files) are committed to the local repository.