Skip to content

Commit

Permalink
Fixing trailing spaces on createCI
Browse files Browse the repository at this point in the history
  • Loading branch information
jdewinne committed Dec 15, 2016
1 parent 3516525 commit 446ebc5
Show file tree
Hide file tree
Showing 6 changed files with 187 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ deploy:
provider: releases
api_key:
secure: aoVXZyLOBmB4Q2lLKLaqEN8zcqN3K3/3agRBA1znM1PLeqXSE3CwQe6sHkX6BrfMoDDtjqeepDMgJ9TsqJFq+lPY+HuVFzOqGlrWlIZHBUKI3hmfjgM/61CkdK2eBO42Ym4tqCQ4L1Tp42fcrB6M/a/0TGI5ENW2bJk8+ofRT8M=
file: build/libs/xlr-xldeploy-plugin-2.6.0.jar
file: build/libs/xlr-xldeploy-plugin-2.6.1.jar
skip_cleanup: true
on:
all_branches: true
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
id "com.xebialabs.xl.docker" version "1.0.0"
}

version = "2.6.0"
version = "2.6.1"

apply plugin: 'java'
apply plugin: 'idea'
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/xldeploy/XLDeployClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def create_application(self, app_id):
self.create_ci(app_id, 'udm.Application')

def create_ci(self, id, ci_type, xml_descriptor = ''):
xml = '<' + ci_type + ' id="' + id + '">' + xml_descriptor + '</' + ci_type + '>'
xml = '<' + ci_type + ' id="' + id + '">' + xml_descriptor.strip() + '</' + ci_type + '>'
create_task = '/deployit/repository/ci/%s' % id
response = self.http_request.post(create_task, xml, contentType='application/xml')
if not response.isSuccessful():
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
#

xld1:
image: xebialabs/xl-docker-demo-xld:v6.0.1.1
image: xebialabs/xl-docker-demo-xld:v6.0.2.1
volumes:
- ~/xl-licenses:/license
ports:
- "14516:4516"

xld2:
image: xebialabs/xl-docker-demo-xld:v6.0.1.1
image: xebialabs/xl-docker-demo-xld:v6.0.2.1
volumes:
- ~/xl-licenses:/license
links:
Expand Down
176 changes: 176 additions & 0 deletions src/test/resources/docker/initialize/data/create-ci-demo-data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
[
{
"id": "Applications\/Release814320823",
"type": "xlrelease.Release",
"$createdBy": "admin",
"$createdAt": "2016-12-15T20:08:30.490+0000",
"$lastModifiedBy": "admin",
"$lastModifiedAt": "2016-12-15T20:12:14.268+0000",
"title": "create ci test",
"scheduledStartDate": "2016-12-15T17:00:00Z",
"flagStatus": "OK",
"maxConcurrentReleases": 100,
"releaseTriggers": [],
"teams": [
{
"id": "Applications\/Release814320823\/Team527096634",
"type": "xlrelease.Team",
"teamName": "Release Admin",
"members": [],
"roles": [],
"permissions": [
"release#edit",
"release#start",
"release#reassign_task",
"template#view",
"release#edit_security",
"release#abort",
"release#view",
"release#edit_task"
]
},
{
"id": "Applications\/Release814320823\/Team52387389",
"type": "xlrelease.Team",
"teamName": "Template Owner",
"members": [
"admin"
],
"roles": [],
"permissions": [
"template#edit",
"template#view",
"template#edit_triggers",
"template#edit_security",
"template#create_release"
]
}
],
"memberViewers": [],
"roleViewers": [],
"attachments": [],
"phases": [
{
"id": "Applications\/Release814320823\/Phase418065522",
"type": "xlrelease.Phase",
"$createdBy": "admin",
"$createdAt": "2016-12-15T20:08:30.570+0000",
"$lastModifiedBy": "admin",
"$lastModifiedAt": "2016-12-15T20:08:59.314+0000",
"title": "New Phase",
"flagStatus": "OK",
"tasks": [
{
"id": "Applications\/Release814320823\/Phase418065522\/Task481530066",
"type": "xlrelease.CustomScriptTask",
"$createdBy": "admin",
"$createdAt": "2016-12-15T20:08:53.272+0000",
"$lastModifiedBy": "admin",
"$lastModifiedAt": "2016-12-15T20:11:52.710+0000",
"title": "create ci without space",
"flagStatus": "OK",
"comments": [],
"container": "Applications\/Release814320823\/Phase418065522",
"attachments": [],
"status": "PLANNED",
"overdueNotified": false,
"waitForScheduledStartDate": true,
"hasBeenFlagged": false,
"hasBeenDelayed": false,
"failuresCount": 0,
"variableMapping": {},
"tags": [],
"pythonScript": {
"id": "Applications\/Release814320823\/Phase418065522\/Task481530066\/PythonScript",
"type": "xldeploy.CreateCI",
"$createdBy": "admin",
"$createdAt": "2016-12-15T20:08:53.272+0000",
"$lastModifiedBy": "admin",
"$lastModifiedAt": "2016-12-15T20:11:52.711+0000",
"customScriptTask": "Applications\/Release814320823\/Phase418065522\/Task481530066",
"xldeployServer": "Configuration\/Custom\/xld1",
"ciID": "Applications\/Test5-Random-Numbers",
"ciType": "udm.Application",
"xmlDescriptor": "<lastVersion>1.0</lastVersion>",
"addToEnvironment": false
}
},
{
"id": "Applications\/Release814320823\/Phase418065522\/Task319758187",
"type": "xlrelease.CustomScriptTask",
"$createdBy": "admin",
"$createdAt": "2016-12-15T20:08:53.272+0000",
"$lastModifiedBy": "admin",
"$lastModifiedAt": "2016-12-15T20:12:14.247+0000",
"title": "create ci with space",
"flagStatus": "OK",
"comments": [],
"container": "Applications\/Release814320823\/Phase418065522",
"attachments": [],
"status": "PLANNED",
"overdueNotified": false,
"waitForScheduledStartDate": true,
"hasBeenFlagged": false,
"hasBeenDelayed": false,
"failuresCount": 0,
"variableMapping": {},
"tags": [],
"pythonScript": {
"id": "Applications\/Release814320823\/Phase418065522\/Task319758187\/PythonScript",
"type": "xldeploy.CreateCI",
"$createdBy": "admin",
"$createdAt": "2016-12-15T20:08:53.272+0000",
"$lastModifiedBy": "admin",
"$lastModifiedAt": "2016-12-15T20:12:14.247+0000",
"customScriptTask": "Applications\/Release814320823\/Phase418065522\/Task319758187",
"xldeployServer": "Configuration\/Custom\/xld1",
"ciID": "Applications\/Test5-Random-Numbers2",
"ciType": "udm.Application",
"xmlDescriptor": " <lastVersion>1.0</lastVersion> ",
"addToEnvironment": false
}
},
{
"id": "Applications\/Release814320823\/Phase418065522\/Task520244086",
"type": "xlrelease.Task",
"$createdBy": "admin",
"$createdAt": "2016-12-15T20:08:38.796+0000",
"$lastModifiedBy": "admin",
"$lastModifiedAt": "2016-12-15T20:08:38.796+0000",
"title": "wait to finish",
"flagStatus": "OK",
"comments": [],
"container": "Applications\/Release814320823\/Phase418065522",
"attachments": [],
"status": "PLANNED",
"overdueNotified": false,
"waitForScheduledStartDate": true,
"hasBeenFlagged": false,
"hasBeenDelayed": false,
"failuresCount": 0,
"variableMapping": {},
"tags": []
}
],
"release": "Applications\/Release814320823",
"status": "PLANNED"
}
],
"queryableStartDate": "2016-12-15T17:00:00Z",
"realFlagStatus": "OK",
"status": "TEMPLATE",
"tags": [],
"variables": [],
"calendarPublished": false,
"tutorial": false,
"abortOnFailure": false,
"allowConcurrentReleasesFromTrigger": true,
"runningTriggeredReleasesCount": 0,
"createdFromTrigger": false,
"extensions": [],
"$metadata": {
"globalVariables": null,
"security": null
}
}
]
6 changes: 6 additions & 0 deletions src/test/resources/docker/initialize/initialize_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,9 @@ wget --http-user=admin --http-password=admin --auth-no-challenge \
--post-file=$SCRIPTPATH/data/server-configs.json \
http://localhost:5516/repository/cis -O /dev/null

wget --http-user=admin --http-password=admin --auth-no-challenge \
--header="Accept: application/json" \
--header="Content-type: application/json" \
--post-file=$SCRIPTPATH/data/create-ci-demo-data.json \
http://localhost:5516/api/v1/templates/import -O /dev/null

0 comments on commit 446ebc5

Please sign in to comment.