Guest User

Untitled

a guest
Dec 7th, 2017
638
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.52 KB | None | 0 0
  1. #!/bin/bash
  2. LOCK_BRANCH="66.66.66"
  3. #Adding a new subnode to certain nodes
  4. xmlstarlet ed -L --subnode "/configurations/rules" --type elem -n rule config.xml
  5.  
  6. #Adding text to the new node
  7. xmlstarlet ed -L --subnode "/configurations/rules/rule[last()]" --type elem -n name -v "$LOCK_BRANCH" config.xml
  8. xmlstarlet ed -L --subnode "/configurations/rules/rule[last()]" --type elem -n repo -v "mqm" config.xml
  9. xmlstarlet ed -L --subnode "/configurations/rules/rule[last()]" --type elem -n branch -v "refs/heads/12.55.99" config.xml
  10. xmlstarlet ed -L --subnode "/configurations/rules/rule[last()]" --type elem -n emailTo -v "imichael@gmail.com" config.xml
  11. xmlstarlet ed -L --subnode "/configurations/rules/rule[last()]" --type elem -n path -v "Server/.*/schema/v.*/.*/.*-dbSchemaDescriptor.xml,Server/.*/resources/" config.xml
  12.  
  13. <?xml version="1.0" encoding="utf-8" standalone="no"?>
  14. <configurations>
  15. <smtpHost>smtp3.gmail.com</smtpHost>
  16. <smtpPort>25</smtpPort>
  17. <emailFrom>GitPushNotifier@gmail.com</emailFrom>
  18. <emailSubject>Push notification</emailSubject>
  19. <!-- Stash general URL-->
  20. <gitViewerURL>http://server0005.gmail.net:7990/projects/</gitViewerURL>
  21. <rule>
  22. <name>test_12.55.4</name>
  23. <repo>test</repo>
  24. <branch>refs/heads/12.55.4</branch>
  25. <emailTo>test@gmail.com</emailTo>
  26. <path>Server/.*/resources/schema/v.*/.*/.*-dbSchemaDescriptor.xml,Server/.*/resources/SpringIOC/dataupgrader/v.*/.*/.*-dataUpgrader.xml,Server/.*/java/com/hp/test/dataupgrader/v.*/.*/.*.java,Server/.*/resources/indexes/v.*/.*.index,Server/.*/resources/SpringIOC/vanilla/.*.xml</path>
  27. </rule>
  28. <rule>
  29. <name>test_12.55.10</name>
  30. <repo>test</repo>
  31. <branch>refs/heads/12.55.10</branch>
  32. <emailTo>test@gmail.com</emailTo>
  33. <path>Server/.*/resources/schema/v.*/.*/.*-dbSchemaDescriptor.xml,Server/.*/resources/SpringIOC/dataupgrader/v.*/.*/.*-dataUpgrader.xml,Server/.*/java/com/hp/test/dataupgrader/v.*/.*/.*.java,Server/.*/resources/indexes/v.*/.*.index,Server/.*/resources/SpringIOC/vanilla/.*.xml</path>
  34. </rule>
  35. <rule>
  36. <name>test_12.55.6</name>
  37. <repo>test</repo>
  38. <branch>refs/heads/12.55.6</branch>
  39. <emailTo>test@gmail.com</emailTo>
  40. <path>Server/.*/resources/schema/v.*/.*/.*-dbSchemaDescriptor.xml,Server/.*/resources/SpringIOC/dataupgrader/v.*/.*/.*-dataUpgrader.xml,Server/.*/java/com/hp/test/dataupgrader/v.*/.*/.*.java,Server/.*/resources/indexes/v.*/.*.index,Server/.*/resources/SpringIOC/vanilla/.*.xml</path>
  41. </rule>
  42. </configurations>
Add Comment
Please, Sign In to add comment