forked from etsy/TryLib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtry-with-runner
More file actions
executable file
·27 lines (22 loc) · 846 Bytes
/
try-with-runner
File metadata and controls
executable file
·27 lines (22 loc) · 846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env php
<?php
require_once __DIR__.'/vendor/autoload.php';
/**
* A sample Try script that demonstrates using a TryRunner instance to run your job.
*/
$options_tuple = TryLib\TryRunner\Options::parse(
$argv,
"http://localhost:8080", # URL to your jenkins server (without http)
"try", # Jenkins job name
"try", # (Optional) Prefix of subjob names for your master project
"." # (Optional) Working copy path (path to your local git repository)
);
$try_runner = TryLib\TryRunner\Builder::masterProject()
->optionsTuple($options_tuple)
->jenkinsCliJarPath("/usr/etsy/jenkins-cli.jar")
->prechecks(array(
new TryLib\Precheck\GitCopyBehind(array('master')),
new TryLib\Precheck\GitReportUntracked(),
))
->build();
exit($try_runner->run());