Skip to content

Instantly share code, notes, and snippets.

View bmoussaud's full-sized avatar
😀

Benoit Moussaud bmoussaud

😀
View GitHub Profile
@bmoussaud
bmoussaud / patch.sh
Created August 29, 2012 13:12
Deployit: Patch an existing file during a deployment
echo "patching ${deployed.configurationFile}"
touch snippet.conf
echo "${deployed.comment} ${deployed.beginMarkup}" >> snippet.conf
echo "aValue ${deployed.avalue}" >> snippet.conf
echo "anotherValue ${deployed.anotherValue}" >> snippet.conf
echo "${deployed.comment} ${deployed.endMarkup}" >> snippet.conf
@bmoussaud
bmoussaud / dictionary.py
Created September 21, 2012 09:49
Deployit: Create or Update a dictionary from a property file
from java.io import File
from java.io import FileInputStream
from java.util import Properties
#Load properties file in java.util.Properties
def loadPropsFil(propsFil):
properties={}
propFil = Properties()
propFil.load(FileInputStream(propsFil))
@bmoussaud
bmoussaud / deploy.py
Last active July 2, 2019 08:55
XLDeploy: Import package and deploy it to an environment (include retry & rollback)
import sys
import traceback
def importDAR(darFile):
print "import dar file: ", darfile
return deployit.importPackage(darfile).id
def validate(d):
validations = 0
print "...validations"
@bmoussaud
bmoussaud / readme.md
Last active December 13, 2015 18:58
Deployit: wrapper.conf for deployit 3.8.x
  • Unzip yajsw-stable-11.04.zip to c:/yajsw-stable-11.04
  • copy wrapper.conf to c:\yajsw-stable-11.04\conf
  • cd C:\yajsw-stable-11.04\bat
  • runConsole.bat
  • If all is ok (no error in the output), please execute a test with your browser http://localhost:4516 (username admin, password admin)
  • if you've some troubles, please add wrapper.debug=true in your wrapper file.
  • If you can connect , please kill the runConsole.bat
  • to install the service , please run installService.bat
  • to uninstall the service , please run uninstallService.bat
@bmoussaud
bmoussaud / pom.xml
Last active December 16, 2015 10:09
Deployit: Sample Test Pom
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>deployit-petclinic-tomcat</artifactId>
<groupId>test.xebialabs</groupId>
<packaging>dar</packaging>
<version>1.0-SNAPSHOT</version>
<name>PetClinic Deployit DAR</name>
<url>http://maven.apache.org</url>
@bmoussaud
bmoussaud / synthetic.mlx
Last active February 6, 2017 08:20
XLD tmpDeleteOnDisconnect
<type-modification type="overthere.CifsHost" >
<property name="tmpDeleteOnDisconnect" kind="boolean" default="true" hidden="false" category="Advanced"/>
</type-modification>
<type-modification type="overthere.SshHost" >
<property name="tmpDeleteOnDisconnect" kind="boolean" default="true" hidden="false" category="Advanced"/>
</type-modification>
<type-modification type="overthere.SmbHost" >
<property name="tmpDeleteOnDisconnect" kind="boolean" default="true" hidden="false" category="Advanced"/>
module=$1
echo "remove submodule $module"
git submodule deinit $module
git rm $module
rm -rf .git/modules/$module
@bmoussaud
bmoussaud / step.py
Created August 17, 2015 12:12
get steps information using the CLI
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)
step_index = 0
step_ids = []
for st in step_block_state.steps:
step_index += 1
@bmoussaud
bmoussaud / check.py
Created November 10, 2015 07:39
JIRA XLDepoy check and update transition request
import sys
import base64
import httplib
import json
from urlparse import urlparse
class JiraCommunicator:
""" Jira Communicator using REST API """
def __init__(self, endpoint='http://localhost:4516', username='admin', password='admin', apiVersion='latest'):
@bmoussaud
bmoussaud / inject.py
Created November 10, 2015 10:09
Custom Personal Crendential plugins
def mappings():
mapping = {}
mapping['tomcat.VirtualHost']=(lambda c: c.server.host)
mapping['was.Cluster']=(lambda c: c.getHost())
mapping['wls.Cluster']=(lambda c: c.getHost())
mapping['wls.JmsServer']=(lambda c: c.getHost())
mapping['cyber-ark.SshHost']=(lambda c: c)
mapping['overthere.SshHost']=(lambda c: c)
mapping['overthere.LocalHost']=(lambda c: c)