azkaban通过脚本打包发布工程

#/bin/bash

#获取sessionID
session=`curl -k -X POST --data "action=login&username=azkaban&password=azkaban" https://120.132.4.XXX:8888`
sessionID=`echo ${session} | sed -e 's/.*id" : "//' -e 's/".*//'`
echo $sessionID

#Create a Project
#curl -k -X POST --data "session.id=$sessionID&name=MyProject&description=MyProject" https://120.132.4.XXX:8888/manager?action=create

#zip
#zip -r workflow.zip ./workflow/*

#Upload a Project Zip
curl -k -i -H "Content-Type: multipart/mixed" -X POST --form "session.id=$sessionID" --form 'ajax=upload' --form 'file=@workflow.zip;type=application/zip' --form 'project=MyProject' https://120.132.4.XXX:8888/manager

您可以选择一种方式赞助本站