-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: github jobs for new jjb version
- Loading branch information
Showing
6 changed files
with
33 additions
and
264 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,30 @@ | ||
|
||
import hudson.model.* | ||
import jenkins.model.Jenkins | ||
import org.jenkinsci.plugins.envinject.EnvInjectPluginAction | ||
|
||
def pr = build.getEnvironment(listener).get("ghprbPullLink") | ||
def goversion = build.getEnvironment(listener).get("GOVERSION") | ||
def mergecommit = build.getEnvironment(listener).get("MERGE_COMMIT") | ||
def b = Jenkins.getInstance().getItem("github-make-check-juju").getLastBuild() | ||
def limit = 100 | ||
while (b != null && limit > 0) { | ||
def current = b | ||
limit = limit - 1 | ||
b = b.getPreviousBuild() | ||
if (current.result == null) { | ||
continue | ||
} | ||
if (current.result != Result.SUCCESS) { | ||
continue | ||
} | ||
def vars = current.buildVariableResolver | ||
println "${vars.resolve("ghprbPullLink")} ${vars.resolve("GOVERSION")} ${vars.resolve("MERGE_COMMIT")}" | ||
if (vars.resolve("ghprbPullLink").equals(pr) && | ||
vars.resolve("GOVERSION").equals(goversion) && | ||
vars.resolve("MERGE_COMMIT").equals(mergecommit)) { | ||
println "Found previous successful build ${current.getAbsoluteUrl()} with the same parameters" | ||
build.getAction(EnvInjectPluginAction.class).overrideAll([SKIP_CHECK: '1']) | ||
break | ||
} | ||
} |
22 changes: 0 additions & 22 deletions
22
jobs/github/scripts/snippet_build_check-juju-python-libjuju.sh.backup
This file was deleted.
Oops, something went wrong.
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