# # THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS # FOR A PARTICULAR PURPOSE. THIS CODE AND INFORMATION ARE NOT SUPPORTED BY XEBIALABS. # from xldeploy.XLDeployClientUtil import XLDeployClientUtil def createPath(path): parent = path.rpartition('/')[0] if not xldDestinationClient.check_CI_exist(parent): createPath(parent) xldDestinationClient.create_directory(path) xldSourceClient = XLDeployClientUtil.createXLDeployClient(xldeployServer, username, password) xldDestinationClient = XLDeployClientUtil.createXLDeployClient(destinationXLDeployServer, destinationUsername, destinationPassword) if autoCreatePath: appPath = deploymentPackage.rpartition('/')[0] if not xldDestinationClient.check_CI_exist(appPath): parent = appPath.rpartition('/')[0] if not xldDestinationClient.check_CI_exist(parent): createPath(parent) xldDestinationClient.create_application(appPath) packageUUID = xldSourceClient.get_download_uuid(deploymentPackage) fetchURL = xldeployServer['url'] + '/deployit/internal/download/' + packageUUID print(fetchURL) xldDestinationClient.fetch_package(fetchURL)
import os, os.path, shutil, fileinput, sys, json, time, string, pprint, filecmp, glob, fnmatch, sys, urllib2, urllib from com.xebialabs.xlrelease.domain import Task from com.xebialabs.deployit.plugin.api.reflect import Type from java.text import SimpleDateFormat from xldeploy.XLDeployClientUtil import XLDeployClientUtil scp_client = XLDeployClientUtil.create_scp_client(scp, username, password) pluginDir = xlPlugins pluginFile = pluginFile currentVersion = currentVersion pluginName = pluginName newVersion = newVersion updateType = updateType gitRepo = gitRepo pluginLocation = pluginLocation savePath = "/tmp/" jsonDir = "/pluginlog/" jsonFile = pluginDir + jsonDir + "plugins.json" print "Creating updated JSON Record!" if os.path.isfile(jsonFile) is False: with open(jsonFile, "w+") as f: json.dump([], f, indent=4) f.close()
# # THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS # FOR A PARTICULAR PURPOSE. THIS CODE AND INFORMATION ARE NOT SUPPORTED BY XEBIALABS. # import sys from xldeploy.XLDeployClientUtil import XLDeployClientUtil xldClient = XLDeployClientUtil.create_xldeploy_client(xldeployServer, username, password) xldClient.createCI(ciID, ciType, xmlDescriptor) if addToEnvironment: xldClient.add_ci_to_environment(envID, ciID)
# # THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS # FOR A PARTICULAR PURPOSE. THIS CODE AND INFORMATION ARE NOT SUPPORTED BY XEBIALABS. # from xldeploy.XLDeployClientUtil import XLDeployClientUtil xld_client = XLDeployClientUtil.create_xldeploy_client(xldeployServer, username, password) xld_client.update_ci_property(ciID, ciProperty, propertyValue)
# # THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS # FOR A PARTICULAR PURPOSE. THIS CODE AND INFORMATION ARE NOT SUPPORTED BY XEBIALABS. # from xldeploy.XLDeployClientUtil import XLDeployClientUtil def createPath(path): parent = path.rpartition('/')[0] if not xldDestinationClient.check_CI_exist(parent): createPath(parent) xldDestinationClient.create_directory(path) xldSourceClient = XLDeployClientUtil.create_xldeploy_client(xldeployServer, username, password) xldDestinationClient = XLDeployClientUtil.create_xldeploy_client(destinationXLDeployServer, destinationUsername, destinationPassword) if autoCreatePath: appPath = deploymentPackage.rpartition('/')[0] if not xldDestinationClient.check_CI_exist(appPath): parent = appPath.rpartition('/')[0] if not xldDestinationClient.check_CI_exist(parent): createPath(parent) xldDestinationClient.create_application(appPath) packageUUID = xldSourceClient.get_download_uuid(deploymentPackage) fetchURL = xldeployServer['url'] + '/deployit/internal/download/' + packageUUID print(fetchURL) xldDestinationClient.fetch_package(fetchURL)