/** * Builds up the environment variable map that's sufficient to identify a process * as ours. This is used to kill run-away processes via {@link ProcessTree#killAll(Map)}. */ public @Nonnull final EnvVars getCharacteristicEnvVars() { EnvVars env = getParent().getCharacteristicEnvVars(); env.put("BUILD_NUMBER",String.valueOf(number)); env.put("BUILD_ID",getId()); env.put("BUILD_TAG","jenkins-"+getParent().getFullName().replace('/', '-')+"-"+number); return env; }
env.putAll(getCharacteristicEnvVars());
public EnvVars superGetCharacteristicEnvVars() { return super.getCharacteristicEnvVars(); }
public static String replaceMacros(Job<?, ?> project, String inputString) { String returnString = inputString; if (project != null && inputString != null) { try { Map<String, String> messageEnvVars = new HashMap<String, String>(); messageEnvVars.putAll(project.getCharacteristicEnvVars()); returnString = Util.replaceMacro(inputString, messageEnvVars); } catch (Exception e) { LOGGER.log(Level.SEVERE, "Couldn't replace macros in message: ", e); } } return returnString; }
@Override public EnvVars getCharacteristicEnvVars() { initPython(); if (pexec.isImplemented(15)) { return (EnvVars) pexec.execPython("get_characteristic_env_vars"); } else { return super.getCharacteristicEnvVars(); } }
/** * Builds up the environment variable map that's sufficient to identify a process * as ours. This is used to kill run-away processes via {@link ProcessTree#killAll(Map)}. */ public @Nonnull final EnvVars getCharacteristicEnvVars() { EnvVars env = getParent().getCharacteristicEnvVars(); env.put("BUILD_NUMBER",String.valueOf(number)); env.put("BUILD_ID",getId()); env.put("BUILD_TAG","jenkins-"+getParent().getFullName().replace('/', '-')+"-"+number); return env; }