Skip to content

Instantly share code, notes, and snippets.

@xlcommunity
xlcommunity / bulkExportTemplates.sh
Last active November 3, 2022 08:06
Small set of utilities to get/export/import templates from XL Release servers.
#!/bin/bash
#####################################################################################################
#
# 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.
#
#####################################################################################################
@xlcommunity
xlcommunity / createDAR.py
Last active February 15, 2019 12:59
Building a package from properties files/dictionaries/command arguments
# 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.
# XL Deploy CLI script to create a DAR from artifacts defined in properties. Optionally also deploy to an env
# 2014-05-28 - 1 - Tom Batchelor
# 2014-05-29 - 2 - Tom Batchelor - Update to support properties files, also some refactoring thing into functions
# 2014-06-05 - 3 - Tom Batchelor - Update to support getting CLASSLOADER_MODE, CLASSLOADER_POLICY, SHARED_LIBRARIES and TAGS from XL Deploy
# dictionaries. Also creates ATPCO properties file copy tasks. Added wait for deployment with full status
# output
@xlcommunity
xlcommunity / deployit-security.xml
Last active June 13, 2018 15:53
Integrate Crowd and Deployit 3.7.x
<?xml version="1.0" encoding="UTF-8"?>
<!-- NOTE: THIS CODE IS DEPRECATED
Please refer to this documentation, to leverage OIDC authentication for Crowd integration
CrowdId: https://confluence.atlassian.com/crowd/1-2-what-is-crowdid-58656152.html
Setting up OpenId authentication: https://docs.xebialabs.com/xl-release/concept/xl-release-oidc-authentication.html
#
# 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 re
import sys
import java.lang.IllegalArgumentException as IllegalArgumentException
from sets import Set
@xlcommunity
xlcommunity / OnReleaseFailureEventListener.java
Last active June 16, 2016 21:56
XL Release "on failure handler" example
/*
* 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.
*/
package ext.deployit.onfailurehandler;
import static java.util.concurrent.TimeUnit.SECONDS;
import static com.google.common.base.Strings.isNullOrEmpty;
@xlcommunity
xlcommunity / JsonWebhook.py
Last active March 19, 2016 19:18
Code for "Automatically handle failures in XL Release tasks" (https://support.xebialabs.com/hc/en-us/community/posts/204769703)
#
# 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, string
from java.io import IOException
from com.xebialabs.xlrelease.plugin.webhook import JsonPathResult
from com.xebialabs.xlrelease.plugin.webhook import XmlPathResult
from urlparse import urlparse
@xlcommunity
xlcommunity / releases-templates-trigger-count-4.7.x.py
Created January 20, 2016 10:19
Python script to count releases, templates and triggers in XL Release 4.7.x and up
# 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 httplib
import unittest
import urllib2
import base64
import sys
import json
@xlcommunity
xlcommunity / usageinfo4-5-x.py
Created January 14, 2016 14:46
Gathering useful information about your XLD installation (version 4.5.x versions)
######################
# usageinfo.py
#
# Prints a report of Deployit usage.
#
# Usage: CLI_HOME> bin/cli.sh -expose-proxies -username admin -password admin -f usageinfo.py -- -server-home /opt/deployit-server
#
# TO DO:
# text versions of top 5 reports
# number of users having performed deployments
@xlcommunity
xlcommunity / usageinfo5-x.py
Created January 14, 2016 14:45
Gathering useful information about your XLD installation (version 5.0.x and up)
######################
# usageinfo.py
#
# Prints a report of Deployit usage.
#
# Usage: CLI_HOME> bin/cli.sh -expose-proxies -username admin -password admin -f usageinfo.py -- -server-home /opt/deployit-server
#
# TO DO:
# text versions of top 5 reports
# number of users having performed deployments
{
"category": "Deploy",
"provider": "XL-Deploy",
"version": "32",
"settings": {
"entityUrlTemplate": "{Config:XL Deploy URL}",
"executionUrlTemplate": "{Config:XL Deploy URL}"
},
"configurationProperties": [
{