Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Add entry to configuration Audit Log #60

dmorand ·

I would like to know how to add an entry to a configuration's audit log via groovy. I have created a configuration (i.e. configuration X) that will remove the published artifacts associated with a specific build (i.e. target build). I would like to have a step in configuration X that will add an entry to the audit log of the configuration associated with the target build stating that the published artifacts of the target build were removed by configuration X. I can get the target configuration in groovy with "system.getConfiguration(selectedConfiguration)". But once I get the configuration I don't know how to add an entry to the audit log.

  • replies 1
  • views 1332
  • stars 0
robinshen ADMIN ·

Please use below script:

groovy:

import com.pmease.quickbuild.entitymanager.*;

def targetConf = ConfigurationManager.instance.get("root/test");
AuditManager.instance.audit(targetConf, "Removed artifacts via configuration " + configuration.pathName);