Skip to content

Instantly share code, notes, and snippets.

@imesh
imesh / release-stratos.sh
Last active August 29, 2015 14:00
Deploy maven artifacts to Apache snapshots and staging repositories.
#!/bin/bash
# -----------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
@imesh
imesh / download-files-from-staging.sh
Last active August 6, 2016 09:27
Download Stratos binary files to be release in Apache dist from staging repository.
repo_id=orgapachestratos-1083
stratos_version=4.1.6
path="https://repository.apache.org/service/local/repositories/${repo_id}/content/org/apache/stratos"
function download() {
file_path=${path}/$1
wget ${file_path}
wget ${file_path}.asc
wget ${file_path}.md5
@imesh
imesh / generate-md5-sha1-asc.sh
Last active August 6, 2016 09:34
Generate MD5 and SHA1 of zip files
#!/bin/sh
md5=".md5"
sha1=".sha1"
for f0 in *.zip
do
echo $f0
f2=$f0$md5
md5sum $f0 > $f2
@imesh
imesh / pedantic-verify.sh
Created April 26, 2014 06:00
Run Apache Rat tool and verify licenses
mvn -P pedantic verify -DskipTests=true
@imesh
imesh / copy_stratos_packs_from_dist.sh
Created April 26, 2014 06:01
Copy Stratos packs from dist to packages folder and puppet master
set -e
source_path="/mnt/dist/4.0.0-incubating-rc1"
stratos_version=4.0.0-incubating
dist_path="/home/ubuntu/packages"
puppet_master_path=/etc/puppet
stratos_pack=apache-stratos-$stratos_version.zip
stratos_path=$source_path/$stratos_pack
lb_pack=apache-stratos-load-balancer-$stratos_version.zip
lb_path=$source_path/$lb_pack
@imesh
imesh / svn-add-packages.sh
Last active August 6, 2016 09:47
Check-in Stratos packages to Apache dist svn
stratos_version="4.1.6"
package=apache-stratos-${stratos_version}-source-release.zip
svn add ${package}*
svn commit -m "Adding ${package}"
package=apache-stratos-${stratos_version}.zip
svn add ${package}*
svn commit -m "Adding ${package}"
@imesh
imesh / verify-stratos-release.sh
Created May 5, 2014 04:39
Verify signatures and hash values of a Stratos release
#!/bin/sh
md5=".md5"
sha1=".sha1"
asc=".asc"
for f0 in *.zip
do
echo $f0
f2=$f0$md5
set -e
log=download_from_dist.sh.log
stratos_version=4.1.4
stratos_rc_version=${stratos_version}-rc2
source_path=https://dist.apache.org/repos/dist/dev/stratos/${stratos_rc_version}
echo "Downloading source release..." | tee -a ${log}
wget ${source_path}/apache-stratos-source-release-${stratos_version}.zip
wget ${source_path}/apache-stratos-source-release-${stratos_version}.zip.asc
@imesh
imesh / listAllUsersInSeq.xml
Created May 15, 2014 13:31
List all users in sequence.
<sequence xmlns="http://ws.apache.org/ns/synapse" name="ListUsersInSeq">
<payloadFactory media-type="xml">
<format>
<xsd:listAllUsers xmlns:xsd="http://org.apache.axis2/xsd">
<xsd:filter>$1</xsd:filter>
<xsd:limit>$2</xsd:limit>
</xsd:listAllUsers>
</format>
<args>
<arg xmlns:m0="http://services.samples" evaluator="xml" expression="$url:filter"/>
<sequence xmlns="http://ws.apache.org/ns/synapse" name="ListUsersOutSeq">
<log level="full"/>
<property name="messageType" value="application/json" scope="axis2" type="STRING"/>
<send/>
</sequence>