This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def deployedApplication(): | |
return specification.deployedOrPreviousApplication | |
environment = deployedApplication().environment | |
candidates = filter(lambda task: task.metadata['environment_id'] == environment.id, taskService.allCurrentTasks) | |
if len(candidates) == 1: | |
raise Exception("%d deployment task is running or has been scheduled on '%s'" % (len(candidates), environment.id)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print getCurrentTask().title | |
print getCurrentTask().pythonScript.deploymentPackage | |
result = "hotfix" not in getCurrentTask().pythonScript.deploymentPackage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from com.xebialabs.overthere.util import OverthereUtils | |
from java.io import PrintWriter | |
def comment(line): | |
if line.startswith(entry): | |
return "#"+line | |
else: | |
return line | |
def out_line(pw,line,lineSeparator): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def deployedApplication(): | |
return specification.deployedOrPreviousApplication | |
version = deployedApplication().version | |
environment_id = deployedApplication().environment.id | |
applicationRequirements = version.applicationRequirements | |
print "Checking Application Requirements: %s " % applicationRequirements | |
missingRequirements = [] | |
for application in applicationRequirements.keys(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from com.xebialabs.deployit.plugin.api.deployment.specification import Operation | |
def dump_modified_delta(delta): | |
print "DUMP %s " % delta | |
ci_type = delta.deployed.type | |
print ci_type | |
ci_descriptor = metadataService.findDescriptor(Type.valueOf(str(ci_type))) | |
print ci_descriptor | |
for pd in ci_descriptor.getPropertyDescriptors(): | |
print "-- %s %s %s" % (pd, pd.get(delta.deployed), pd.get(delta.previous)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def gather_steps_from_block(b, tid): | |
if hasattr(b, "blocks") and len(b.blocks): | |
for i in b.blocks: | |
return gather_steps_from_block(i, tid) | |
else: | |
step_block_state = task2.steps(tid, b.id) | |
return step_block_state.steps | |
def gather_steps_from_task(t): | |
step_ids = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd %windir%\system32\inetsrv | |
appcmd set config "${deployed.websiteName}/${deployed.name}" /section:system.ftpserver/security/authorization /-[accessType='Allow',permissions='Read',roles='',users='*'] /commit:apphost | |
appcmd set config "${deployed.websiteName}/${deployed.name}" /section:system.ftpserver/security/authorization /+[accessType='Allow',permissions='Read,Write',roles='',users='*'] /commit:apphost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'savon' | |
# Get wsdl | |
client = Savon.client(wsdl: "http://localhost:8080/axis/services/USD_R11_WebService?wsdl") | |
#login | |
response = client.call(:login, message: {username: "servicedesk", password: ""}) | |
sid = response.body[:login_response][:login_return] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
def add_task(version, env): | |
print "Create a new task %s -> %s " % (version,env) | |
phase = getCurrentPhase() | |
current_task = getCurrentTask() | |
task = taskApi.newTask("xldeploy.DeployTask") | |
task.title = "Deploy %s -> %s" % (version, env) | |
task.pythonScript.xldeployServer = current_task.getPythonScript().getProperty("xldeployServer") | |
task.pythonScript.deploymentPackage = version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<type-modification type="overthere.SshHost" versioned="false"> | |
</type-modification> | |
<type-modification type="file.File" versioned="false"> | |
</type-modification> |