@@ -0,0 +1,1676 @@
+/*%0A * Copyright 2018 EPAM Systems%0A *%0A *%0A * This file is part of EPAM Report Portal.%0A * https://github.com/reportportal/service-api%0A *%0A * Report Portal is free software: you can redistribute it and/or modify%0A * it under the terms of the GNU General Public License as published by%0A * the Free Software Foundation, either version 3 of the License, or%0A * (at your option) any later version.%0A *%0A * Report Portal is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A * GNU General Public License for more details.%0A *%0A * You should have received a copy of the GNU General Public License%0A * along with Report Portal.  If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A */%0A%0Apackage com.epam.ta.reportportal.info;%0A%0Aimport com.google.common.collect.ImmutableMap;%0Aimport org.springframework.boot.actuate.info.MapInfoContributor;%0Aimport org.springframework.stereotype.Component;%0A%0Aimport java.util.Map;%0Aimport java.util.stream.Collectors;%0A%0A/**%0A * Collects provided environment variables with rp prefix.%0A *%0A * @author Pavel Bortnik%0A */%0A@Component%0Apublic class EnvironmentVariablesInfoContributor extends MapInfoContributor %7B%0A%0A%09private static final String RP_ENV_PREFIX = %22RP_ENVIRONMENT_VARIABLE_%22;%0A%0A%09public EnvironmentVariablesInfoContributor() %7B%0A%09%09super(ImmutableMap.%3CString, Object%3Ebuilder().put(%0A%09%09%09%09%22environment%22,%0A%09%09%09%09System.getenv()%0A%09%09%09%09%09%09.entrySet()%0A%09%09%09%09%09%09.stream()%0A%09%09%09%09%09%09.filter(it -%3E it.getKey().startsWith(RP_ENV_PREFIX))%0A%09%09%09%09%09%09.collect(Collectors.toMap(e -%3E e.getKey().replaceFirst(RP_ENV_PREFIX, %22%22).toLowerCase(), Map.Entry::getValue))%0A%09%09).build());%0A%09%7D%0A%7D%0A

Introduce environment variable info contributor (#353)