Skip to content
Permalink
Browse files
Plugin upgrades and bug fixes...
Display Jenkins and Anchore plugin versions in build console log.
Use default Anchore policy if it's not provided to plugin - JENKINS-41081.
Dynamic list of queries.
Improve logging.
Clean up workspaces after plugin execution regardless of the end result.
  • Loading branch information
nightfurys committed Jan 27, 2017
1 parent 614a9d1 commit 5a7e570a285dcc015e5be94252833fa8698db54c
Showing with 1,183 additions and 857 deletions.
  1. +7 −0 .gitignore
  2. +49 −50 src/main/java/com/anchore/jenkins/plugins/anchore/AnchoreAction.java
  3. +1,021 −729 src/main/java/com/anchore/jenkins/plugins/anchore/AnchoreBuilder.java
  4. +32 −0 src/main/java/com/anchore/jenkins/plugins/anchore/AnchoreQuery.java
  5. +3 −5 src/main/resources/com/anchore/jenkins/plugins/anchore/AnchoreAction/index.jelly
  6. +3 −3 src/main/resources/com/anchore/jenkins/plugins/anchore/AnchoreAction/summary.jelly
  7. +7 −24 src/main/resources/com/anchore/jenkins/plugins/anchore/AnchoreBuilder/config.jelly
  8. +3 −3 src/main/resources/com/anchore/jenkins/plugins/anchore/AnchoreBuilder/global.jelly
  9. +5 −0 src/main/resources/com/anchore/jenkins/plugins/anchore/AnchoreBuilder/help-bailOnFail.html
  10. +1 −1 src/main/resources/com/anchore/jenkins/plugins/anchore/AnchoreBuilder/help-bailOnPluginFail.html
  11. +5 −0 src/main/resources/com/anchore/jenkins/plugins/anchore/AnchoreBuilder/help-bailOnWarn.html
  12. +3 −3 src/main/resources/com/anchore/jenkins/plugins/anchore/AnchoreBuilder/help-containerId.html
  13. +4 −3 src/main/resources/com/anchore/jenkins/plugins/anchore/AnchoreBuilder/help-containerImageId.html
  14. +1 −1 src/main/resources/com/anchore/jenkins/plugins/anchore/AnchoreBuilder/help-doCleanup.html
  15. +0 −5 src/main/resources/com/anchore/jenkins/plugins/anchore/AnchoreBuilder/help-doQuery.html
  16. +2 −1 src/main/resources/com/anchore/jenkins/plugins/anchore/AnchoreBuilder/help-localVol.html
  17. +3 −1 src/main/resources/com/anchore/jenkins/plugins/anchore/AnchoreBuilder/help-modulesVol.html
  18. +3 −5 src/main/resources/com/anchore/jenkins/plugins/anchore/AnchoreBuilder/help-name.html
  19. +2 −1 src/main/resources/com/anchore/jenkins/plugins/anchore/AnchoreBuilder/help-policyName.html
  20. +0 −5 src/main/resources/com/anchore/jenkins/plugins/anchore/AnchoreBuilder/help-query1.html
  21. +0 −5 src/main/resources/com/anchore/jenkins/plugins/anchore/AnchoreBuilder/help-query2.html
  22. +0 −5 src/main/resources/com/anchore/jenkins/plugins/anchore/AnchoreBuilder/help-query3.html
  23. +0 −5 src/main/resources/com/anchore/jenkins/plugins/anchore/AnchoreBuilder/help-query4.html
  24. +2 −1 src/main/resources/com/anchore/jenkins/plugins/anchore/AnchoreBuilder/help-useSudo.html
  25. +3 −1 src/main/resources/com/anchore/jenkins/plugins/anchore/AnchoreBuilder/help-userScripts.html
  26. +14 −0 src/main/resources/com/anchore/jenkins/plugins/anchore/AnchoreQuery/config.jelly
  27. +5 −0 src/main/resources/com/anchore/jenkins/plugins/anchore/AnchoreQuery/help-query.html
  28. +5 −0 src/main/webapp/help/help-queriesBlock.html
@@ -13,3 +13,10 @@ hs_err_pid*

# build stuff
target/

# IDE
.idea
*.iml

# OS
.DS_Store
@@ -1,59 +1,58 @@
package com.anchore.jenkins.plugins.anchore;
import hudson.model.Action;

import hudson.model.AbstractBuild;
import hudson.model.Action;
import java.util.Map;
import java.util.TreeMap;
import java.util.ArrayList;
import java.util.List;

public class AnchoreAction implements Action {

private String gateStatus;
private String gateReportUrl;
private String queryReportUrl;
private TreeMap<String, String> queries;
private AbstractBuild<?,?> build;

public AnchoreAction(AbstractBuild<?,?> build, String gateStatus, String euid, TreeMap<String, String> queries) {
this.gateReportUrl = "../artifact/AnchoreReport."+euid+"/anchore_gates_format.html";
this.queryReportUrl = "../artifact/AnchoreReport."+euid+"/anchore_query_format.html";
this.build = build;
this.gateStatus = gateStatus;
this.queries = new TreeMap<String, String>();
for (Map.Entry<String, String> entry : queries.entrySet()) {
this.queries.put("../artifact/AnchoreReport."+euid+"/" + entry.getKey() + "_format.html", entry.getValue());
}
}

@Override
public String getIconFileName() {
return "/plugin/anchore-container-scanner/images/anchore.png";
}

@Override
public String getDisplayName() {
return "Anchore Report (" + gateStatus + ")";
}

@Override
public String getUrlName() {
return "anchore-results";
}

public AbstractBuild<?,?> getBuild() {
return this.build;
}

public String getGateReportUrl() {
return this.gateReportUrl;
}

public String getQueryReportUrl() {
return this.queryReportUrl;
}

public Map<String, String> getQueries() {
return(this.queries);
}
private String gateStatus;
private String gateReportUrl;
private String queryReportUrl;
private Map<String, String> queries;
private AbstractBuild<?, ?> build;

public AnchoreAction(AbstractBuild<?, ?> build, String gateStatus, String euid, Map<String, String> queries) {
this.gateReportUrl = "../artifact/AnchoreReport." + euid + "/anchore_gates_format.html";
this.queryReportUrl = "../artifact/AnchoreReport." + euid + "/anchore_query_format.html";
this.build = build;
this.gateStatus = gateStatus;
this.queries = new TreeMap<String, String>();
for (Map.Entry<String, String> entry : queries.entrySet()) {
this.queries.put("../artifact/AnchoreReport." + euid + "/" + entry.getKey() + "_format.html", entry.getValue());
}
}

@Override
public String getIconFileName() {
return "/plugin/anchore-container-scanner/images/anchore.png";
}

@Override
public String getDisplayName() {
return "Anchore Report (" + gateStatus + ")";
}

@Override
public String getUrlName() {
return "anchore-results";
}

public AbstractBuild<?, ?> getBuild() {
return this.build;
}

public String getGateReportUrl() {
return this.gateReportUrl;
}

public String getQueryReportUrl() {
return this.queryReportUrl;
}

public Map<String, String> getQueries() {
return (this.queries);
}
}

0 comments on commit 5a7e570

Please sign in to comment.