2 * SPDX-License-Identifier: EPL-1.0
3 * Copyright (c) 2018 The Linux Foundation and others.
5 * All rights reserved. This program and the accompanying materials
6 * are made available under the terms of the Eclipse Public License v1.0
7 * which accompanies this distribution, and is available at
8 * http://www.eclipse.org/legal/epl-v10.html
12 * Manage Jenkins Global Properties by injecting configuration defined here
14 * In LFCI a Jenkins job script will replace the JENKINS_URL line below and
15 * inject the managed list of global variables.
19 'JENKINS_URL': 'https://localhost:8080',
22 def gnode_prop = Jenkins.getInstance().getGlobalNodeProperties()
23 def properties = new hudson.slaves.EnvironmentVariablesNodeProperty()
24 gnode_prop.replace(properties)
25 env_vars = properties.getEnvVars()
28 global_vars.each{ k, v -> env_vars.put(k, v) }
29 Jenkins.instance.save()