Skip to content

Commit

Permalink
Merge pull request #19 from zvercodebender/master
Browse files Browse the repository at this point in the history
Add tasks to manage tags
  • Loading branch information
jdewinne authored Mar 30, 2017
2 parents cc88126 + ceef4d5 commit 5a9e554
Show file tree
Hide file tree
Showing 12 changed files with 117 additions and 19 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.gradle
.idea
xlr-xlrelease-plugin.iml
src/downloads/*
build
supervisord.*
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: IP25v/puP1qgGfCRWG+/7EKDU6pyyaU54WRqqNICi8qcubmXxTmfY6/QJeF2bS+MLFZBfttUjdnHWxOMTWBUAP8HFIRkgGHsFIHxiFYbUaKdRXJOZPElpP08mm7HU1Lz/Tz0rU99ry9TVG28RfmGvpsIM6+OdlG8SDdcESqHacg=
file: build/libs/xlr-xlrelease-plugin-1.9.0.jar
file: build/libs/xlr-xlrelease-plugin-1.10.0.jar
skip_cleanup: true
on:
all_branches: true
Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,21 @@ For XL Release version 4.8.x you'll need at least version 1.7.x of the plugin.
+ Get Task ID
* `taskTitle`: Title of the task to get the id for (`string`)
* **This task requires XL Release 4.5.0 or higher**

+ Get Tags
* `tags`: A List of the current tags for the release

![GetTags](images/GetTags.png)

+ Add Tag
* `newTag`: New tag to add to the list of tags for the release
* `tags`: A List of the current tags for the release

![AddTag](images/AddTag.png)

+ Set Tags
* `newTags`: A List of tags to replace the tag list with
* `tags`: A list of the curretn tags for the release

![SetTags](images/SetTags.png)

16 changes: 8 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
plugins {
id "com.github.hierynomus.license" version "0.13.1"
id "com.xebialabs.xl.docker" version "1.0.0"
id "com.github.hierynomus.license" version "0.13.1"
id "com.xebialabs.xl.docker" version "1.0.0"
}

version="1.9.0"
version="1.10.0"

apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'maven'

xlDocker {
compileImage = 'xebialabs/xlr_dev_compile'
compileVersion = 'v6.1.0.1'
runImage = 'xebialabs/xlr_dev_run'
runVersion = 'v6.1.0.1'
runPortMapping = '15516:5516'
compileImage = 'xebialabs/xlr_dev_compile'
compileVersion = 'v6.1.0.1'
runImage = 'xebialabs/xlr_dev_run'
runVersion = 'v6.1.0.1'
runPortMapping = '15516:5516'
}

license {
Expand Down
Binary file added images/AddTag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/GetTags.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/SetTags.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 32 additions & 9 deletions src/main/resources/synthetic.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,38 @@
<property name="taskId" category="output" description="The id of the task."/>
</type>

<type type="xlr.WaitForBlockingTask" extends="xlr.RemoteXlrControlTask">
<property name="scriptLocation" default="xlr/WaitForBlockingTask.py" hidden="true"/>
<property name="phaseName" label="Phase Name to check for running task" category="input"/>
<property name="taskName" label="Task Name to verify is not running" category="input"/>
<property name="pollInterval" category="input" kind="integer" label="Polling Interval" required="true"
default="30"/>
<property name="maxPolls" category="input" kind="integer" label="Max Polls" required="true" default="0"/>
<property name="Results" category="output"/>
</type>
<type type="xlr.WaitForBlockingTask" extends="xlr.RemoteXlrControlTask">
<property name="scriptLocation" default="xlr/WaitForBlockingTask.py" hidden="true"/>
<property name="phaseName" label="Phase Name to check for running task" category="input"/>
<property name="taskName" label="Task Name to verify is not running" category="input"/>
<property name="pollInterval" category="input" kind="integer" label="Polling Interval" required="true"
default="30"/>
<property name="maxPolls" category="input" kind="integer" label="Max Polls" required="true" default="0"/>
<property name="Results" category="output"/>
</type>

<type type="xlr.GetTags" extends="xlr.XlrControlTask">
<property name="iconLocation" default="xlr/xlr.png" hidden="true" />
<property name="taskColor" default="#AA217E" hidden="true" />
<property name="scriptLocation" default="xlr/GetTags.py" hidden="true" />
<property name="tags" category="output" kind="list_of_string" />
</type>

<type type="xlr.AddTag" extends="xlr.XlrControlTask">
<property name="iconLocation" default="xlr/xlr.png" hidden="true" />
<property name="taskColor" default="#AA217E" hidden="true" />
<property name="scriptLocation" default="xlr/AddTag.py" hidden="true" />
<property name="newTag" category="input" kind="string" />
<property name="tags" category="output" kind="list_of_string" />
</type>

<type type="xlr.SetTags" extends="xlr.XlrControlTask">
<property name="iconLocation" default="xlr/xlr.png" hidden="true" />
<property name="taskColor" default="#AA217E" hidden="true" />
<property name="scriptLocation" default="xlr/SetTags.py" hidden="true" />
<property name="newTags" category="input" kind="list_of_string" />
<property name="tags" category="output" kind="list_of_string" />
</type>

<type type="xlr.Server" extends="configuration.HttpConnection"/>
</synthetic>
20 changes: 20 additions & 0 deletions src/main/resources/xlr/AddTag.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# Copyright 2017 XEBIALABS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#


currentRelease = getCurrentRelease()

tags = currentRelease.tags
tags.append( newTag )

currentRelease.tags = tags
releaseApi.updateRelease( currentRelease )

sys.exit(0)
16 changes: 16 additions & 0 deletions src/main/resources/xlr/GetTags.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# Copyright 2017 XEBIALABS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#


currentRelease = getCurrentRelease()

tags = currentRelease.tags

sys.exit(0)
20 changes: 20 additions & 0 deletions src/main/resources/xlr/SetTags.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# Copyright 2017 XEBIALABS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#


currentRelease = getCurrentRelease()

tags = currentRelease.tags
tags = newTags

currentRelease.tags = tags
releaseApi.updateRelease( currentRelease )

sys.exit(0)
1 change: 0 additions & 1 deletion src/test/resources/docker/initialize/initialize_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#


SCRIPT=$(readlink -f "$0")
# Absolute path this script is in, thus /home/user/bin
SCRIPTPATH=$(dirname "$SCRIPT")
Expand Down

0 comments on commit 5a9e554

Please sign in to comment.