Declare an environment variable which is linked to the given Bootique variable, and has its name defined
from the name of the Bootique variable.

@param bootiqueVariable the name of the bootique variable.
@return the Bootique extender.
2486
public VariableDecls declareVar(String bootiqueVariable) {
		this.extender.declareVar(bootiqueVariable, VariableNames.toEnvironmentVariableName(bootiqueVariable));
		return this;
	}
391929
public static Object getLocalVar(ExecutionContext context, String name) {
        LexicalEnvironment localEnv = context.getLexicalEnvironment();
        if (localEnv.getRecord().hasBinding(context, name)) {
            return localEnv.getRecord().getBindingValue(context, name, false);
        }
        return null;
    }
1140619
public java.lang.String getEnvVariablesOrDefault(
      java.lang.String key,
      java.lang.String defaultValue) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, java.lang.String> map =
        internalGetEnvVariables().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
131277
protected void mergeVariables(TaskQueryImpl extendedQuery, TaskQueryImpl extendingQuery) {
    List<TaskQueryVariableValue> extendingVariables = extendingQuery.getVariables();

    Set<TaskQueryVariableValueComparable> extendingVariablesComparable = new HashSet<TaskQueryVariableValueComparable>();

    // set extending variables and save names for comparison of original variables
    for (TaskQueryVariableValue extendingVariable : extendingVariables) {
      extendedQuery.addVariable(extendingVariable);
      extendingVariablesComparable.add(new TaskQueryVariableValueComparable(extendingVariable));
    }

    for (TaskQueryVariableValue originalVariable : this.getVariables()) {
      if (!extendingVariablesComparable.contains(new TaskQueryVariableValueComparable(originalVariable))) {
        extendedQuery.addVariable(originalVariable);
      }
    }

  }
799432
private static String resolveEnvVar(String envVarName, String mode, boolean bc) {
        final String envVarValue = System.getenv(envVarName);
        if(envVarValue == null || envVarValue.isEmpty()) {
            if(mode != null && mode.startsWith(":-") && mode.length() > 2) {
                return bc?Hasher.hash(mode.substring(2).toCharArray()):mode.substring(2);
            } else {
                return null;
            }
        } else {
            return bc?Hasher.hash(envVarValue.toCharArray()):envVarValue;
        }
    }
1006798
public EnvironmentResponse withVariables(java.util.Map<String, String> variables) {
        setVariables(variables);
        return this;
    }
999856
def add_common_cc_variables(env):
    
    if '_CCCOMCOM' not in env:
        env['_CCCOMCOM'] = '$CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS'
        # It's a hack to test for darwin here, but the alternative
        # of creating an applecc.py to contain this seems overkill.
        # Maybe someday the Apple platform will require more setup and
        # this logic will be moved.
        env['FRAMEWORKS'] = SCons.Util.CLVar('')
        env['FRAMEWORKPATH'] = SCons.Util.CLVar('')
        if env['PLATFORM'] == 'darwin':
            env['_CCCOMCOM'] = env['_CCCOMCOM'] + ' $_FRAMEWORKPATH'

    if 'CCFLAGS' not in env:
        env['CCFLAGS']   = SCons.Util.CLVar('')

    if 'SHCCFLAGS' not in env:
        env['SHCCFLAGS'] = SCons.Util.CLVar('$CCFLAGS')
432043
public SDVariable addVariable(SDVariable variable) {
        Preconditions.checkState(variable.getSameDiff() == this, "Samediff instance must be the same.");

        if (variables.containsKey(variable.getVarName()) && !variables.get(variable.getVarName()).getVariable().equals(variable)) {
            throw new IllegalArgumentException("Variable already found with variable opName " + variable.getVarName());
        }

        Preconditions.checkState(variable.getSameDiff() == this, "Same diff instance for variable must be the same!");
        variables.put(variable.getVarName(), Variable.builder().name(variable.getVarName()).variable(variable).build());
        return variable;
    }
1129109
@Override public void makeSensitiveBuildVariables(AbstractBuild build, Set<String> sensitiveVariables) {
        super.makeSensitiveBuildVariables(build, sensitiveVariables);
        // TODO determine if there is a meaningful way to generalize this; perhaps as a new [Run]Action recording sensitiveVariables?
        // Complicated by the fact that in principle someone could call getSensitiveBuildVariables *before* the wrapper starts and actually sets those variables,
        // though in practice the likely use cases would come later, and perhaps it is acceptable to omit the names of variables which are yet to be set.
        // Also unclear if there is any use case for calling this method after the build is done (or Jenkins is restarted);
        // most likely it is only used during the build itself.
        // Would be much cleaner if EnvVars itself recorded which keys had sensitive values.
    }
575294
public void registerClassForEnvironment(String className, EnvironmentType envType)
    {
    	RepositoryTypeClass repoTypeClass = RepositoryTypeClass.newInstance(this, envType, className);
    	repositoryTypeClasses.add(repoTypeClass);
    }
457312
public static LocalVariable createThisVar(TypeInfo owner, Label start, Label end) {
    return new LocalVariable("this", owner.type(), 0, start, end, Feature.NON_NULLABLE);
  }
765936
def AddEnvironmentVariable(self, environment_variable):
    
    name = environment_variable.name.upper()
    if name in self._environment_variables:
      raise KeyError('Environment variable: {0:s} already exists.'.format(
          environment_variable.name))

    self._environment_variables[name] = environment_variable
1039299
public void addEnv(final Environment.Variable env){
        if(null==envVars) {
            envVars = new ArrayList<Environment.Variable>();
        }
        envVars.add(env);
    }
1329547
public static String basename(String bootiqueVariable) {
		final int idx = bootiqueVariable.lastIndexOf('.');
		if (idx >= 0) {
			return bootiqueVariable.substring(idx + 1);
		}
		return bootiqueVariable;
	}
543820
public static String createRootVariable(Path<?> path, int suffix) {
        String variable = path.accept(ToStringVisitor.DEFAULT, TEMPLATES);
        return variable + "_" + suffix;
    }
550704
protected function overrideEnvironmentVariables()
    {
        if (!isset($this->options->filtered['configuration'])) {
            return;
        }

        $variables = $this->options->filtered['configuration']->getEnvironmentVariables();

        foreach ($variables as $key => $value) {
            putenv(sprintf('%s=%s', $key, $value));

            $_ENV[$key] = $value;
        }
    }
1219138
public int defineTemporaryVariable(org.codehaus.groovy.ast.Variable var, boolean store) {
        return defineTemporaryVariable(var.getName(), var.getType(),store);
    }