forked from xwang2713/Jenkins-Automation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
U-RISK\wangxi01
authored and
U-RISK\wangxi01
committed
Feb 20, 2015
0 parents
commit 8db5f75
Showing
41 changed files
with
718 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Jenkins-Automation | ||
================== | ||
|
||
This repository has some applications to help automate HPCC builds on Jenkins | ||
|
||
|
||
Requirements | ||
------------ | ||
|
||
+ Windows | ||
+ Linux (maybe need recapture the images) | ||
+ Mac (maybe need recapture the images) | ||
+ Sikuli | ||
+ Java 6+ | ||
+ Chrome | ||
|
||
|
||
|
||
Install and configure Sikuli | ||
---------------------------- | ||
+ Download stable sikuli-setup.jar from http://www.sikuli.org/download.html | ||
+ Place sikuli-setup.jar in desired location. For example c:/software/sikuli | ||
+ Run: java -jar sikuli-setup.jar | ||
+ Select the first (IDE and Command-line) and the last (compatible cross OS) options | ||
+ Follow the instruction to finish setup and configuration. | ||
|
||
|
||
Usage | ||
----- | ||
|
||
|
||
Currently there are two sikuli applications. HPCC5.0.sikuli is for generating HPCC 5.0.x projects. | ||
HPCC5.2.sikuli is for generating HPCC 5.2.x projects. | ||
|
||
+ It is better to close other Chrome or at lest move them to the top of the Windows | ||
+ Start Sikuli IDE: runIDE.cmd | ||
+ From "File" open the sikuli application. For example HPCC5.2.sikuli | ||
+ Modify "build_tag" and "version" | ||
+ Click "Run" which may prompt you save and run. | ||
|
||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,211 @@ | ||
|
||
<html> | ||
<head> | ||
<style type="text/css"> | ||
.sikuli-code { | ||
font-size: 20px; | ||
font-family: "Osaka-mono", Monospace; | ||
line-height: 1.5em; | ||
display:table-cell; | ||
white-space: pre-wrap; /* css-3 */ | ||
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */ | ||
white-space: -pre-wrap; /* Opera 4-6 */ | ||
white-space: -o-pre-wrap; /* Opera 7 */ | ||
word-wrap: break-word; /* Internet Explorer 5.5+ */ | ||
width: 99%; /* remove horizontal scroll-bar when viewing in IE7 */ | ||
} | ||
.sikuli-code img { | ||
vertical-align: middle; | ||
margin: 2px; | ||
border: 1px solid #ccc; | ||
padding: 2px; | ||
-moz-border-radius: 5px; | ||
-webkit-border-radius: 5px; | ||
-moz-box-shadow: 1px 1px 1px gray; | ||
-webkit-box-shadow: 1px 1px 2px gray; | ||
} | ||
.kw { | ||
color: blue; | ||
} | ||
.skw { | ||
color: rgb(63, 127, 127); | ||
} | ||
|
||
.str { | ||
color: rgb(128, 0, 0); | ||
} | ||
|
||
.dig { | ||
color: rgb(128, 64, 0); | ||
} | ||
|
||
.cmt { | ||
color: rgb(200, 0, 200); | ||
} | ||
|
||
h2 { | ||
display: inline; | ||
font-weight: normal; | ||
} | ||
|
||
.info { | ||
border-bottom: 1px solid #ddd; | ||
padding-bottom: 5px; | ||
margin-bottom: 20px; | ||
display: none; | ||
} | ||
|
||
a { | ||
color: #9D2900; | ||
} | ||
|
||
body { | ||
font-family: "Trebuchet MS", Arial, Sans-Serif; | ||
} | ||
|
||
</style> | ||
</head> | ||
<body> | ||
<div class="info"> | ||
<h2>HPCC5.0.sikuli\HPCC5.0.sikuli</h2> <a href="HPCC5.0.sikuli\HPCC5.0.zip">(Download this script)</a> | ||
</div> | ||
<pre class="sikuli-code"> | ||
build_sequence = <span class="str">"rc2"</span> | ||
version = <span class="str">"5.0.6"</span> | ||
|
||
<span class="cmt">############################################## | ||
</span><span class="cmt"># # | ||
</span><span class="cmt"># Create Workflow projects # | ||
</span><span class="cmt"># # | ||
</span><span class="cmt">############################################## | ||
</span> | ||
|
||
<span class="skw">type</span>(<span class="str">"Create Jenkins Projects"</span>) | ||
myApp = App.open(<span class="str">"C:\Program Files (x86)\Google\Chrome\Application\chrome"</span>) | ||
<span class="skw">wait</span>(<span class="dig">5</span>) | ||
<span class="skw">type</span>(<span class="str">"http://10.176.32.6/view/HPCC-5.x/\n"</span>) | ||
<span class="skw">wait</span>(<span class="dig">5</span>) | ||
|
||
<span class="skw">click</span>(<img src="1424379630194.png" />) | ||
|
||
<span class="skw">wait</span>(<span class="dig">2</span>) | ||
<span class="skw">click</span>(<img src="1424364405084.png" />) | ||
<span class="skw">wait</span>(<span class="dig">2</span>) | ||
<span class="skw">click</span>(<img src="1424379685177.png" />) | ||
<span class="skw">wait</span>(<span class="dig">2</span>) | ||
<span class="skw">type</span>(Key.DOWN) | ||
<span class="skw">wait</span>(<span class="dig">1</span>) | ||
<span class="skw">click</span>(<img src="1424379744941.png" />) | ||
<span class="skw">wait</span>(<span class="dig">1</span>) | ||
<span class="skw">click</span>(<img src="1424371251191.png" />) | ||
<span class="skw">type</span>(<span class="str">"WF-HPCC-"</span> + version + <span class="str">"-"</span> + build_sequence) | ||
<span class="skw">wait</span>(<span class="dig">1</span>) | ||
|
||
<span class="cmt"># Defined jobs | ||
</span>project_prefix_list = [ | ||
<span class="str">'CE-Candidate-'</span>, | ||
<span class="str">'CE-Candidate-clienttools-'</span>, | ||
<span class="str">'CE-Candidate-clienttools-win-32bit-'</span>, | ||
<span class="str">'CE-Candidate-docs-'</span>, | ||
<span class="str">'CE-Candidate-ECLIDE-Win-32bit-'</span>, | ||
<span class="str">'CE-Candidate-gangliamonitoring-'</span>, | ||
<span class="str">'CE-Candidate-graphcontrol-'</span>, | ||
<span class="str">'CE-Candidate-graphcontrol-osx-'</span>, | ||
<span class="str">'CE-Candidate-nagiosmonitoring-'</span>, | ||
<span class="str">'CE-Candidate-vm-32bit-'</span>, | ||
<span class="str">'CE-Candidate-vm-64bit-'</span>, | ||
<span class="str">'CE-Candidate-withplugins-'</span>, | ||
<span class="str">'CE-graphcontrol-Win-32bit-'</span>, | ||
<span class="str">'CE-graphcontrol-Win-64bit-'</span>, | ||
<span class="str">'EE-Candidate-'</span>, | ||
<span class="str">'EE-Candidate-withplugins-'</span>, | ||
<span class="str">'LN-Candidate-'</span>, | ||
<span class="str">'LN-Candidate-Clienttools-'</span>, | ||
<span class="str">'LN-Candidate-withplugins-'</span> | ||
] | ||
|
||
<span class="kw">for</span> project_prefix <span class="kw">in</span> project_prefix_list: | ||
<span class="skw">type</span>(Key.TAB) | ||
<span class="skw">type</span>(project_prefix + version + <span class="str">"-"</span> + build_sequence) | ||
<span class="skw">wait</span>(<span class="dig">1</span>) | ||
|
||
|
||
|
||
<span class="cmt">#Workflow Parameters | ||
</span><span class="kw">for</span> i <span class="kw">in</span> range(<span class="dig">11</span>): | ||
<span class="skw">type</span>(Key.TAB) | ||
<span class="kw">if</span> (i == <span class="dig">4</span>): | ||
<span class="skw">type</span>(version) | ||
<span class="kw">else</span>: | ||
<span class="skw">type</span>(version + <span class="str">"-"</span> + build_sequence) | ||
<span class="skw">wait</span>(<span class="dig">1</span>) | ||
|
||
<span class="skw">wait</span>(<span class="dig">2</span>) | ||
loc = SCREEN.getCenter() | ||
wheel(loc, WHEEL_DOWN, <span class="dig">5</span>) | ||
<span class="skw">wait</span>(<span class="dig">3</span>) | ||
|
||
<span class="skw">click</span>(<img src="1424376486681.png" />) | ||
<span class="skw">wait</span>(<span class="dig">1</span>) | ||
|
||
<span class="cmt">############################################## | ||
</span><span class="cmt"># # | ||
</span><span class="cmt"># Add Clienttools and Graphcontrol to # | ||
</span><span class="cmt"># ECLIDE Project # | ||
</span><span class="cmt"># # | ||
</span><span class="cmt">############################################## | ||
</span><span class="skw">click</span>(<img src="1424381363527.png" />) | ||
<span class="skw">wait</span>(<span class="dig">3</span>) | ||
<span class="skw">click</span>(<img src="1424380583579.png" />) | ||
<span class="skw">wait</span>(<span class="dig">2</span>) | ||
<span class="skw">click</span>(<img src="1424380615452.png" />) | ||
<span class="skw">wait</span>(<span class="dig">1</span>) | ||
<span class="kw">for</span> i <span class="kw">in</span> range(<span class="dig">60</span>): | ||
<span class="skw">type</span>(Key.DOWN) | ||
<span class="skw">click</span>(<img src="1424380709407.png" />) | ||
<span class="skw">wait</span>(<span class="dig">1</span>) | ||
<span class="skw">type</span>(<span class="str">"CE-graphcontrol-Win-32bit-"</span> + version + <span class="str">"-"</span> + build_sequence) | ||
<span class="skw">wait</span>(<span class="dig">1</span>) | ||
<span class="kw">for</span> i <span class="kw">in</span> range(<span class="dig">10</span>): | ||
<span class="skw">type</span>(Key.TAB) | ||
|
||
<span class="skw">wait</span>(<span class="dig">1</span>) | ||
<span class="skw">click</span>(<img src="1424380709407.png" />) | ||
<span class="skw">wait</span>(<span class="dig">1</span>) | ||
<span class="skw">type</span>(<span class="str">"CE-Candidate-clienttools-win-32bit-"</span> + version + <span class="str">"-"</span> + build_sequence) | ||
<span class="skw">wait</span>(<span class="dig">1</span>) | ||
<span class="skw">click</span>(<img src="1424380968663.png" />) | ||
<span class="skw">wait</span>(<span class="dig">2</span>) | ||
<span class="cmt">############################################## | ||
</span><span class="cmt"># # | ||
</span><span class="cmt"># Create List View # | ||
</span><span class="cmt"># # | ||
</span><span class="cmt">############################################## | ||
</span><span class="skw">click</span>(<img src="1424381175353.png" />) | ||
<span class="skw">wait</span>(<span class="dig">2</span>) | ||
|
||
<span class="skw">click</span>(<img src="1424376618419.png" />) | ||
<span class="skw">wait</span>(<span class="dig">1</span>) | ||
<span class="skw">click</span>(<img src="1424376664710.png" />) | ||
<span class="skw">wait</span>(<span class="dig">1</span>) | ||
<span class="skw">type</span>(<span class="str">"HPCC-"</span> + version + <span class="str">"-"</span> + build_sequence) | ||
<span class="skw">click</span>(<img src="1424376812717.png" />) | ||
<span class="skw">wait</span>(<span class="dig">1</span>) | ||
<span class="skw">click</span>(<img src="1424376840150.png" />) | ||
<span class="skw">wait</span>(<span class="dig">2</span>) | ||
|
||
<span class="kw">for</span> i <span class="kw">in</span> range(<span class="dig">5</span>): | ||
<span class="skw">type</span>(Key.DOWN) | ||
|
||
|
||
<span class="skw">wait</span>(<span class="dig">2</span>) | ||
<span class="skw">click</span>(<img src="1424376906302.png" />) | ||
<span class="skw">click</span>(<img src="1424376926049.png" />) | ||
<span class="skw">type</span>(<span class="str">".*"</span> + version + <span class="str">"-"</span> + build_sequence) | ||
<span class="skw">click</span>(<img src="1424377002994.png" />) | ||
<span class="skw">wait</span>(<span class="dig">2</span>) | ||
|
||
<span class="cmt">#myApp.close()</span> | ||
</pre> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
build_sequence = "rc2" | ||
version = "5.0.6" | ||
|
||
############################################## | ||
# # | ||
# Create Workflow projects # | ||
# # | ||
############################################## | ||
|
||
|
||
type("Create Jenkins Projects") | ||
myApp = App.open("C:\Program Files (x86)\Google\Chrome\Application\chrome") | ||
wait(5) | ||
type("http://10.176.32.6/view/HPCC-5.x/\n") | ||
wait(5) | ||
|
||
click("1424379630194.png") | ||
|
||
wait(2) | ||
click("1424364405084.png") | ||
wait(2) | ||
click("1424379685177.png") | ||
wait(2) | ||
type(Key.DOWN) | ||
wait(1) | ||
click("1424379744941.png") | ||
wait(1) | ||
click("1424371251191.png") | ||
type("WF-HPCC-" + version + "-" + build_sequence) | ||
wait(1) | ||
|
||
# Defined jobs | ||
project_prefix_list = [ | ||
'CE-Candidate-', | ||
'CE-Candidate-clienttools-', | ||
'CE-Candidate-clienttools-win-32bit-', | ||
'CE-Candidate-docs-', | ||
'CE-Candidate-ECLIDE-Win-32bit-', | ||
'CE-Candidate-gangliamonitoring-', | ||
'CE-Candidate-graphcontrol-', | ||
'CE-Candidate-graphcontrol-osx-', | ||
'CE-Candidate-nagiosmonitoring-', | ||
'CE-Candidate-vm-32bit-', | ||
'CE-Candidate-vm-64bit-', | ||
'CE-Candidate-withplugins-', | ||
'CE-graphcontrol-Win-32bit-', | ||
'CE-graphcontrol-Win-64bit-', | ||
'EE-Candidate-', | ||
'EE-Candidate-withplugins-', | ||
'LN-Candidate-', | ||
'LN-Candidate-Clienttools-', | ||
'LN-Candidate-withplugins-' | ||
] | ||
|
||
for project_prefix in project_prefix_list: | ||
type(Key.TAB) | ||
type(project_prefix + version + "-" + build_sequence) | ||
wait(1) | ||
|
||
|
||
|
||
#Workflow Parameters | ||
for i in range(11): | ||
type(Key.TAB) | ||
if (i == 4): | ||
type(version) | ||
else: | ||
type(version + "-" + build_sequence) | ||
wait(1) | ||
|
||
wait(2) | ||
loc = SCREEN.getCenter() | ||
wheel(loc, WHEEL_DOWN, 5) | ||
wait(3) | ||
|
||
click("1424376486681.png") | ||
wait(1) | ||
|
||
############################################## | ||
# # | ||
# Add Clienttools and Graphcontrol to # | ||
# ECLIDE Project # | ||
# # | ||
############################################## | ||
click("1424381363527.png") | ||
wait(3) | ||
click("1424380583579.png") | ||
wait(2) | ||
click("1424380615452.png") | ||
wait(1) | ||
for i in range(60): | ||
type(Key.DOWN) | ||
click("1424380709407.png") | ||
wait(1) | ||
type("CE-graphcontrol-Win-32bit-" + version + "-" + build_sequence) | ||
wait(1) | ||
for i in range(10): | ||
type(Key.TAB) | ||
|
||
wait(1) | ||
click("1424380709407.png") | ||
wait(1) | ||
type("CE-Candidate-clienttools-win-32bit-" + version + "-" + build_sequence) | ||
wait(1) | ||
click("1424380968663.png") | ||
wait(2) | ||
############################################## | ||
# # | ||
# Create List View # | ||
# # | ||
############################################## | ||
click("1424381175353.png") | ||
wait(2) | ||
|
||
click("1424376618419.png") | ||
wait(1) | ||
click("1424376664710.png") | ||
wait(1) | ||
type("HPCC-" + version + "-" + build_sequence) | ||
click("1424376812717.png") | ||
wait(1) | ||
click("1424376840150.png") | ||
wait(2) | ||
|
||
for i in range(5): | ||
type(Key.DOWN) | ||
|
||
|
||
wait(2) | ||
click("1424376906302.png") | ||
click("1424376926049.png") | ||
type(".*" + version + "-" + build_sequence) | ||
click("1424377002994.png") | ||
wait(2) | ||
|
||
#myApp.close() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.