Skip to content

Commit 3721469

Browse files
author
janatzend
committed
Added jar file, license and readme
1 parent 7fde6b6 commit 3721469

File tree

4 files changed

+103
-20
lines changed

4 files changed

+103
-20
lines changed

LICENSE

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,27 @@
1-
To avoid future confusion, we recommend that you include a license with your plugin.
2-
This file is simply a reminder.
1+
Copyright (c) 2005-2013, Zend Technologies USA, Inc.
2+
All rights reserved.
33

4-
For a template license you can have a look at: http://www.opensource.org/licenses/
4+
Redistribution and use in source and binary forms, with or without modification,
5+
are permitted provided that the following conditions are met:
56

6-
Atlassian releases most of its modules under the Apache2 license: http://opensource.org/licenses/Apache-2.0
7+
* Redistributions of source code must retain the above copyright notice,
8+
this list of conditions and the following disclaimer.
9+
10+
* Redistributions in binary form must reproduce the above copyright notice,
11+
this list of conditions and the following disclaimer in the documentation
12+
and/or other materials provided with the distribution.
13+
14+
* Neither the name of Zend Technologies USA, Inc. nor the names of its
15+
contributors may be used to endorse or promote products derived from this
16+
software without specific prior written permission.
17+
18+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
22+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README

Lines changed: 0 additions & 13 deletions
This file was deleted.

README.md

Lines changed: 78 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,79 @@
1-
zend-server-bamboo
2-
==================
1+
Zend Server Bamboo Integration
2+
=========
33

4-
Bamboo Plugin for packaging and deploying to Zend Server
4+
Prerequisites
5+
-------------
6+
On Bamboo Server and all Agents on which the Plugin Tasks should be executed, PHP 5.3.5 or newer has to be installed for running [Zend Server SDK]. Zend Server SDK is the basis of all communication between Bamboo and Zend Server.
7+
8+
Installation
9+
------------
10+
The [Zend Server SDK] as well as the Zend Server Bamboo Plugin has to be installed in order pack and deploy PHP apps to a Zend Server system.
11+
### Zend Server SDK
12+
Follow the instructions in the README of the [Zend Server SDK]
13+
### Zend Server Bamboo Plugin
14+
Find the zendserver\*.jar file and store it on the local disk. In Bamboo admin interface go to 'ADD-ONS' | Manage Add-ons, pause the Bamboo server and click on 'Upload Add-on'. Choose the zendserver\*.jar file and upload it. The server can be resumed now.
15+
16+
Usage
17+
-----
18+
Zend Server Bamboo plugin contains one Zend Server Capability and four Task types. The Zend Server Capability is mandatory to configure, as all Task types rely on correct setup of the Zend Server SDK. Afterwards a Plan can be configured which is normally a sequence of the following Task types:
19+
- Source Code Checkout (Built-in Task type in Bamboo)
20+
- Zend Server Packaging Task
21+
- Zend Server Deployment Task
22+
- Zend Server Deployment Check Task
23+
Of course, QA tasks like for PHPUnit support can be added accordingly.
24+
25+
Zend Server Capability
26+
----------------------
27+
The Zend Server Bamboo Plugin is using the [Zend Server SDK] as a basis for all Tasks. For your convenience a Zend Server Capability has been implemented. In the Bamboo admin interface go to 'Server capabilities' and choose under 'Add capability' the item 'Zend Server Web API Client'. According to your Zend Server SDK installation you can either choose PHAR or the PHP version as the executable. Please modify also the Path so that it fits to your setup.
28+
This capability can be added as a prerequisite for a Bamboo plan (optional). In any case the capability is necessary in order to execute all Zend Server tasks successfully.
29+
30+
Zend Server Packaging Task
31+
--------------------------
32+
See [Configuring Tasks] on how to add a Bamboo task in general.
33+
34+
Packaging Task is very easy to use. Just add a task to your job and give it a description (optional). The Packaging task is taking all files in the working directory and creates a ZPK file. Therefore a valid deployment.xml and deployment.properties files has to be in the root of the working directory. See [Package Structure] for more information on how to prepare for a ZPK creation.
35+
Alternatively the Zend Server SDK also provides functionality for creating deployment.xml and deployment.properties.
36+
37+
Zend Server Deployment Task
38+
---------------------------
39+
See [Configuring Tasks] on how to add a Bamboo task in general.
40+
41+
The Zend Server Deployment Task is responsible for deploying the application to a Zend Server instance (either single server or cluster environment). Except the User Params all fields are required.
42+
43+
In order to access Zend Server via the Zend Server SDK which is using the so called WebAPI, one has to pass a valid Zend Server URL (including the port number) as well as the API credentials. The API Key and Secret can be managed in the Zend Server UI in Administration | WebAPI. Please note that the availability of the given Zend Server instance is checked on the fly.
44+
45+
The Application Base URI can be either a path (Zend Server will choose the default vhost) or a full valid hostname (optional: including a path) where the vhost will be created automatically if it's not available already.
46+
47+
Please note that the Zend Server version has to be newer or equal than 6.0. Zend Server below version 6 is not supported.
48+
49+
The User Params can be used in the Deployment hook scripts, see [Package Structure]. Params have to be formatted as a query string, e.g. param1=val1&param2=val2&...
50+
51+
As deployment can take a while - depending on the application - the Zend Server SDK is following an asynchronous concept. That means that the process invoking a deployment is not waiting for the result of the deployment itself. Therefore the 'Zend Server Deployment Check Task' has to be configured.
52+
53+
Zend Server Deployment Check Task
54+
---------------------------------
55+
See [Configuring Tasks] on how to add a Bamboo task in general.
56+
57+
The Zend Server Deployment Check Task is responsible for checking whether a previous deployment has been finished successfully or not.
58+
59+
In general the same configuration settings as for the 'Zend Server Deployment Task' have to be provided. Additionally one has to specify how often the status of the deployment should be checked and how much time should be waited between these checks. If this is not enough time for a deployment to finish, the Task will be marked as failed.
60+
61+
One of the most important settings in this task is whether you want to rollback automatically in case of an error. This ensures that a working version (from a deployment perspective) is running all the time without the need of any manual interactions.
62+
63+
Zend Server Rollback Task
64+
-------------------------
65+
See [Configuring Tasks] on how to add a Bamboo task in general.
66+
67+
The Zend Server Rollback Task is rolling back an application to the previous version.
68+
69+
In general the same configuration settings as for the 'Zend Server Deployment Task' have to be provided. Additionally one has to specify how often the status of the rollback should be checked and how much time should be waited between these checks. If this is not enough time for a rollback to finish or the rollback is failing, the Task will be marked as failed.
70+
71+
Shared Artifacts
72+
----------------
73+
If the ZPK files built in Zend Server Packaging Task should be reused for Deployments to other systems, the ZPK files can be marked as [Shared Artifacts].
74+
ZPK files are stored in the zpk sub-directory of the working directory. In order to configure this as shared artifacts, the Location has to be set to 'zpk' and the Copy pattern is '**/*.zpk'.
75+
76+
[Zend Server SDK]:https://github.com/zend-patterns/ZendServerSDK
77+
[Package Structure]:http://files.zend.com/help/Zend-Server/zend-server.htm#understanding_the_package_structure.htm
78+
[Configuring Tasks]:https://confluence.atlassian.com/display/BAMBOO/Configuring+tasks
79+
[Shared Artifacts]:https://confluence.atlassian.com/display/BAMBOO/Bamboo+Best+Practice+-+Sharing+artifacts

target/zendserver-0.9.jar

253 KB
Binary file not shown.

0 commit comments

Comments
 (0)