org.jenkinsci.plugins.configfiles.GlobalConfigFiles Java Examples

The following examples show how to use org.jenkinsci.plugins.configfiles.GlobalConfigFiles. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DefaultsBinder.java    From pipeline-multibranch-defaults-plugin with MIT License 6 votes vote down vote up
@Override
public FlowExecution create(FlowExecutionOwner handle, TaskListener listener, List<? extends Action> actions) throws Exception {
    Jenkins jenkins = Jenkins.getInstance();
    if (jenkins == null) {
        throw new IllegalStateException("inappropriate context");
    }
    Queue.Executable exec = handle.getExecutable();
    if (!(exec instanceof WorkflowRun)) {
        throw new IllegalStateException("inappropriate context");
    }

    ConfigFileStore store = GlobalConfigFiles.get();
    if (store != null) {
        Config config = store.getById(PipelineBranchDefaultsProjectFactory.SCRIPT);
        if (config != null) {
            return new CpsFlowDefinition(config.content, false).create(handle, listener, actions);
        }
    }
    throw new IllegalArgumentException("Default " + PipelineBranchDefaultsProjectFactory.SCRIPT + " not found. Check configuration.");
}
 
Example #2
Source File: DefaultsBinderTest.java    From pipeline-multibranch-defaults-plugin with MIT License 6 votes vote down vote up
@Test
public void testDefaultJenkinsFile() throws Exception {
    GlobalConfigFiles globalConfigFiles = r.jenkins.getExtensionList(GlobalConfigFiles.class).get(GlobalConfigFiles.class);
    ConfigFileStore store = globalConfigFiles.get();

    Config config = new GroovyScript("Jenkinsfile", "Jenkinsfile", "",
        "semaphore 'wait'; node {checkout scm; echo readFile('file')}");
    store.save(config);

    sampleGitRepo.init();
    sampleGitRepo.write("file", "initial content");
    sampleGitRepo.git("commit", "--all", "--message=flow");
    WorkflowMultiBranchProject mp = r.jenkins.createProject(PipelineMultiBranchDefaultsProject.class, "p");
    mp.getSourcesList().add(new BranchSource(new GitSCMSource(null, sampleGitRepo.toString(), "", "*", "", false),
        new DefaultBranchPropertyStrategy(new BranchProperty[0])));
    WorkflowJob p = PipelineMultiBranchDefaultsProjectTest.scheduleAndFindBranchProject(mp, "master");
    SemaphoreStep.waitForStart("wait/1", null);
    WorkflowRun b1 = p.getLastBuild();
    assertNotNull(b1);
    assertEquals(1, b1.getNumber());
    SemaphoreStep.success("wait/1", null);
    r.assertLogContains("initial content", r.waitForCompletion(b1));
}
 
Example #3
Source File: DefaultsBinderTest.java    From pipeline-multibranch-defaults-plugin with MIT License 6 votes vote down vote up
@Test
public void testDefaultJenkinsFileLoadFromWorkspace() throws Exception {
    GlobalConfigFiles globalConfigFiles = r.jenkins.getExtensionList(GlobalConfigFiles.class).get(GlobalConfigFiles.class);
    ConfigFileStore store = globalConfigFiles.get();
    Config config = new GroovyScript("Jenkinsfile", "Jenkinsfile", "",
        "semaphore 'wait'; node {checkout scm; load 'Jenkinsfile'}");
    store.save(config);


    sampleGitRepo.init();
    sampleGitRepo.write("Jenkinsfile", "echo readFile('file')");
    sampleGitRepo.git("add", "Jenkinsfile");
    sampleGitRepo.write("file", "initial content");
    sampleGitRepo.git("commit", "--all", "--message=flow");
    WorkflowMultiBranchProject mp = r.jenkins.createProject(PipelineMultiBranchDefaultsProject.class, "p");
    mp.getSourcesList().add(new BranchSource(new GitSCMSource(null, sampleGitRepo.toString(), "", "*", "", false),
        new DefaultBranchPropertyStrategy(new BranchProperty[0])));
    WorkflowJob p = PipelineMultiBranchDefaultsProjectTest.scheduleAndFindBranchProject(mp, "master");
    SemaphoreStep.waitForStart("wait/1", null);
    WorkflowRun b1 = p.getLastBuild();
    assertNotNull(b1);
    assertEquals(1, b1.getNumber());
    SemaphoreStep.success("wait/1", null);
    r.assertLogContains("initial content", r.waitForCompletion(b1));
}
 
Example #4
Source File: ConfigFileProviderTest.java    From configuration-as-code-plugin with MIT License 5 votes vote down vote up
@Test
@ConfiguredWithReadme(value = "config-file-provider/README.md")
public void configure_config_file_provider() throws Exception {
    assertThat(GlobalConfigFiles.get().getConfigs(), hasSize(4));

    Config config = GlobalConfigFiles.get().getById("custom-test");
    assertThat(config.name, is("DummyCustom1"));
    assertThat(config.comment, is("dummy custom 1"));
    assertThat(config.content, is("dummy content 1"));

    config = GlobalConfigFiles.get().getById("json-test");
    assertThat(config.name, is("DummyJsonConfig"));
    assertThat(config.comment, is("dummy json config"));
    assertThat(config.content, containsString("{ \"dummydata\": {\"dummyKey\": \"dummyValue\"} }"));

    config = GlobalConfigFiles.get().getById("xml-test");
    assertThat(config.name, is("DummyXmlConfig"));
    assertThat(config.comment, is("dummy xml config"));
    assertThat(config.content, containsString("<root><dummy test=\"abc\"></dummy></root>"));

    MavenSettingsConfig mavenSettings = (MavenSettingsConfig) GlobalConfigFiles.get().getById("maven-test");
    assertThat(mavenSettings.name, is("DummySettings"));
    assertThat(mavenSettings.comment, is("dummy settings"));
    assertThat(mavenSettings.isReplaceAll, is(false));
    assertThat(mavenSettings.getServerCredentialMappings(), hasSize(2));
    assertThat(mavenSettings.getServerCredentialMappings().get(0).getServerId(), is("server1"));
    assertThat(mavenSettings.getServerCredentialMappings().get(0).getCredentialsId(), is("someCredentials1"));
    assertThat(mavenSettings.getServerCredentialMappings().get(1).getServerId(), is("server2"));
    assertThat(mavenSettings.getServerCredentialMappings().get(1).getCredentialsId(), is("someCredentials2"));
    assertThat(mavenSettings.content, containsString("<activeProfiles>"));
}
 
Example #5
Source File: WithMavenStepOnMasterTest.java    From pipeline-maven-plugin with MIT License 5 votes vote down vote up
@Issue("JENKINS-48264")
@Test
public void maven_build_jar_project_with_whitespace_char_in_name() throws Exception {
    loadMavenJarProjectInGitRepo(this.gitRepoRule);

    String pipelineScript = "node('master') {\n" +
            "    git($/" + gitRepoRule.toString() + "/$)\n" +
            "    withMaven() {\n" +
            "        sh 'mvn help:effective-settings'\n" +
            "    }\n" +
            "}";

    String mavenSettings =                 "<?xml version='1.0' encoding='UTF-8'?>\n" +
            "<settings \n" +
            "        xmlns='http://maven.apache.org/SETTINGS/1.0.0'\n" +
            "        xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'\n" +
            "        xsi:schemaLocation='http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd'>\n" +
            "    <servers>\n" +
            "    	<server>\n" +
            "	        <id>id-settings-test-through-config-file-provider</id>\n" +
            "	    </server>\n" +
            "    </servers>\n" +
            "</settings>\n";
    MavenSettingsConfig mavenSettingsConfig = new MavenSettingsConfig("maven-config-test", "maven-config-test", "", mavenSettings, false, null);

    GlobalConfigFiles.get().save(mavenSettingsConfig);
    GlobalMavenConfig.get().setSettingsProvider(new MvnSettingsProvider(mavenSettingsConfig.id));


    try {
        WorkflowJob pipeline = jenkinsRule.createProject(WorkflowJob.class, "build on master with spaces");
        pipeline.setDefinition(new CpsFlowDefinition(pipelineScript, true));
        WorkflowRun build = jenkinsRule.assertBuildStatus(Result.SUCCESS, pipeline.scheduleBuild2(0));
        jenkinsRule.assertLogContains("[withMaven] using Maven settings provided by the Jenkins global configuration", build);
        jenkinsRule.assertLogContains("<id>id-settings-test-through-config-file-provider</id>", build);
    } finally {
        GlobalMavenConfig.get().setSettingsProvider(null);
    }

}
 
Example #6
Source File: WithMavenStepOnMasterTest.java    From pipeline-maven-plugin with MIT License 4 votes vote down vote up
@Test
public void maven_global_settings_defined_through_jenkins_global_config_and_config_file_provider() throws Exception {

    String mavenGlobalSettings = "<?xml version='1.0' encoding='UTF-8'?>\n" +
            "<settings \n" +
            "        xmlns='http://maven.apache.org/SETTINGS/1.0.0'\n" +
            "        xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'\n" +
            "        xsi:schemaLocation='http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd'>\n" +
            "    <servers>\n" +
            "    	<server>\n" +
            "	        <id>id-global-settings-test-from-config-file-provider</id>\n" +
            "	    </server>\n" +
            "    </servers>\n" +
            "</settings>\n";

    GlobalMavenSettingsConfig mavenGlobalSettingsConfig = new GlobalMavenSettingsConfig("maven-global-config-test", "maven-global-config-test", "", mavenGlobalSettings);

    String pipelineScript = "node () {\n" +
            "    writeFile file: 'pom.xml', text: '''<?xml version='1.0' encoding='UTF-8'?>\n" +
            "<project\n" +
            "        xmlns='http://maven.apache.org/POM/4.0.0' \n" +
            "        xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' \n" +
            "        xsi:schemaLocation='http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd'>\n" +
            "    <modelVersion>4.0.0</modelVersion>\n" +
            "    <groupId>com.example</groupId>\n" +
            "    <artifactId>my-artifact</artifactId>\n" +
            "    <version>1.0.0-SNAPSHOT</version>\n" +
            "    <packaging>pom</packaging>\n" +
            "</project>'''\n" +
            "\n" +
            "    withMaven(maven: 'apache-maven-3.5.0') {\n" +
            "        sh 'mvn help:effective-settings'\n" +
            "    }\n" +
            "}\n";

    GlobalConfigFiles.get().save(mavenGlobalSettingsConfig);
    GlobalMavenConfig.get().setGlobalSettingsProvider(new MvnGlobalSettingsProvider(mavenGlobalSettingsConfig.id));

    try {
        WorkflowJob pipeline = jenkinsRule.createProject(WorkflowJob.class, "build-on-master-with-maven-global-settings-defined-in-jenkins-global-config-with-config-file-provider");
        pipeline.setDefinition(new CpsFlowDefinition(pipelineScript, true));
        WorkflowRun build = jenkinsRule.assertBuildStatus(Result.SUCCESS, pipeline.scheduleBuild2(0));
        jenkinsRule.assertLogContains("[withMaven] using Maven global settings provided by the Jenkins global configuration", build);
        jenkinsRule.assertLogContains("<id>id-global-settings-test-from-config-file-provider</id>", build);
    } finally {
        GlobalMavenConfig.get().setGlobalSettingsProvider(null);
        GlobalConfigFiles.get().remove(mavenGlobalSettingsConfig.id);
    }
}
 
Example #7
Source File: WithMavenStepOnMasterTest.java    From pipeline-maven-plugin with MIT License 4 votes vote down vote up
@Test
public void maven_global_settings_defined_through_folder_config_and_config_file_provider() throws Exception {

    String mavenGlobalSettings = "<?xml version='1.0' encoding='UTF-8'?>\n" +
            "<settings \n" +
            "        xmlns='http://maven.apache.org/SETTINGS/1.0.0'\n" +
            "        xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'\n" +
            "        xsi:schemaLocation='http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd'>\n" +
            "    <servers>\n" +
            "       <server>\n" +
            "           <id>id-global-settings-test-from-config-file-provider-on-a-folder</id>\n" +
            "       </server>\n" +
            "    </servers>\n" +
            "</settings>\n";

    GlobalMavenSettingsConfig mavenGlobalSettingsConfig = new GlobalMavenSettingsConfig("maven-global-config-test-folder", "maven-global-config-test-folder", "",
        mavenGlobalSettings);

    String pipelineScript = "node () {\n" +
            "    writeFile file: 'pom.xml', text: '''<?xml version='1.0' encoding='UTF-8'?>\n" +
            "<project\n" +
            "        xmlns='http://maven.apache.org/POM/4.0.0' \n" +
            "        xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' \n" +
            "        xsi:schemaLocation='http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd'>\n" +
            "    <modelVersion>4.0.0</modelVersion>\n" +
            "    <groupId>com.example</groupId>\n" +
            "    <artifactId>my-artifact</artifactId>\n" +
            "    <version>1.0.0-SNAPSHOT</version>\n" +
            "    <packaging>pom</packaging>\n" +
            "</project>'''\n" +
            "\n" +
            "    withMaven(maven: 'apache-maven-3.5.0') {\n" +
            "        sh 'mvn help:effective-settings'\n" +
            "    }\n" +
            "}\n";

    GlobalConfigFiles.get().save(mavenGlobalSettingsConfig);

    Folder folder = jenkinsRule.createProject(Folder.class, "folder");
    MavenConfigFolderOverrideProperty configOverrideProperty = new MavenConfigFolderOverrideProperty();
    configOverrideProperty.setOverride(true);
    configOverrideProperty.setGlobalSettings(new MvnGlobalSettingsProvider(mavenGlobalSettingsConfig.id));
    folder.addProperty(configOverrideProperty);

    try {
        WorkflowJob pipeline = folder.createProject(WorkflowJob.class,
            "build-on-master-with-maven-global-settings-defined-in-jenkins-global-config-with-config-file-provider");
        pipeline.setDefinition(new CpsFlowDefinition(pipelineScript, true));
        WorkflowRun build = jenkinsRule.assertBuildStatus(Result.SUCCESS, pipeline.scheduleBuild2(0));
        jenkinsRule.assertLogContains(
            "[withMaven] using overriden Maven global settings by folder 'folder'. Config File Provider maven global settings file 'maven-global-config-test-folder'",
            build);
        jenkinsRule.assertLogContains("<id>id-global-settings-test-from-config-file-provider-on-a-folder</id>", build);
    } finally {
        GlobalMavenConfig.get().setGlobalSettingsProvider(null);
        GlobalConfigFiles.get().remove(mavenGlobalSettingsConfig.id);
    }
}
 
Example #8
Source File: WithMavenStepOnMasterTest.java    From pipeline-maven-plugin with MIT License 4 votes vote down vote up
@Test
public void maven_settings_defined_through_jenkins_global_config_and_config_file_provider() throws Exception {

    String mavenSettings =                 "<?xml version='1.0' encoding='UTF-8'?>\n" +
            "<settings \n" +
            "        xmlns='http://maven.apache.org/SETTINGS/1.0.0'\n" +
            "        xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'\n" +
            "        xsi:schemaLocation='http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd'>\n" +
            "    <servers>\n" +
            "    	<server>\n" +
            "	        <id>id-settings-test-through-config-file-provider</id>\n" +
            "	    </server>\n" +
            "    </servers>\n" +
            "</settings>\n";
    MavenSettingsConfig mavenSettingsConfig = new MavenSettingsConfig("maven-config-test", "maven-config-test", "", mavenSettings, false, null);


    String pipelineScript = "node () {\n" +
            "    writeFile file: 'pom.xml', text: '''<?xml version='1.0' encoding='UTF-8'?>\n" +
            "<project\n" +
            "        xmlns='http://maven.apache.org/POM/4.0.0' \n" +
            "        xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' \n" +
            "        xsi:schemaLocation='http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd'>\n" +
            "    <modelVersion>4.0.0</modelVersion>\n" +
            "    <groupId>com.example</groupId>\n" +
            "    <artifactId>my-artifact</artifactId>\n" +
            "    <version>1.0.0-SNAPSHOT</version>\n" +
            "    <packaging>pom</packaging>\n" +
            "</project>'''\n" +
            "\n" +
            "    withMaven(maven: 'apache-maven-3.5.0') {\n" +
            "        sh 'mvn help:effective-settings'\n" +
            "    }\n" +
            "}\n";
    GlobalConfigFiles.get().save(mavenSettingsConfig);
    GlobalMavenConfig.get().setSettingsProvider(new MvnSettingsProvider(mavenSettingsConfig.id));

    try {
        WorkflowJob pipeline = jenkinsRule.createProject(WorkflowJob.class, "build-on-master-with-maven-settings-defined-in-jenkins-global-config-with-config-file-provider");
        pipeline.setDefinition(new CpsFlowDefinition(pipelineScript, true));
        WorkflowRun build = jenkinsRule.assertBuildStatus(Result.SUCCESS, pipeline.scheduleBuild2(0));
        jenkinsRule.assertLogContains("[withMaven] using Maven settings provided by the Jenkins global configuration", build);
        jenkinsRule.assertLogContains("<id>id-settings-test-through-config-file-provider</id>", build);
    } finally {
        GlobalMavenConfig.get().setSettingsProvider(null);
    }
}
 
Example #9
Source File: WithMavenStepOnMasterTest.java    From pipeline-maven-plugin with MIT License 4 votes vote down vote up
@Test
public void maven_settings_defined_through_folder_config_and_config_file_provider() throws Exception {

    String mavenSettings = "<?xml version='1.0' encoding='UTF-8'?>\n" +
            "<settings \n" +
            "        xmlns='http://maven.apache.org/SETTINGS/1.0.0'\n" +
            "        xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'\n" +
            "        xsi:schemaLocation='http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd'>\n" +
            "    <servers>\n" +
            "       <server>\n" +
            "           <id>id-settings-test-through-config-file-provider-on-a-folder</id>\n" +
            "       </server>\n" +
            "    </servers>\n" +
            "</settings>\n";
    MavenSettingsConfig mavenSettingsConfig = new MavenSettingsConfig("maven-config-test-folder", "maven-config-test-folder", "", mavenSettings, false, null);

    String pipelineScript = "node () {\n" +
            "    writeFile file: 'pom.xml', text: '''<?xml version='1.0' encoding='UTF-8'?>\n" +
            "<project\n" +
            "        xmlns='http://maven.apache.org/POM/4.0.0' \n" +
            "        xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' \n" +
            "        xsi:schemaLocation='http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd'>\n" +
            "    <modelVersion>4.0.0</modelVersion>\n" +
            "    <groupId>com.example</groupId>\n" +
            "    <artifactId>my-artifact</artifactId>\n" +
            "    <version>1.0.0-SNAPSHOT</version>\n" +
            "    <packaging>pom</packaging>\n" +
            "</project>'''\n" +
            "\n" +
            "    withMaven(maven: 'apache-maven-3.5.0') {\n" +
            "        sh 'mvn help:effective-settings'\n" +
            "    }\n" +
            "}\n";
    GlobalConfigFiles.get().save(mavenSettingsConfig);

    Folder folder = jenkinsRule.createProject(Folder.class, "folder");
    MavenConfigFolderOverrideProperty configOverrideProperty = new MavenConfigFolderOverrideProperty();
    configOverrideProperty.setOverride(true);
    GlobalMavenConfig globalMavenConfig = GlobalMavenConfig.get();
    configOverrideProperty.setGlobalSettings(globalMavenConfig.getGlobalSettingsProvider());
    configOverrideProperty.setSettings(new MvnSettingsProvider(mavenSettingsConfig.id));
    folder.addProperty(configOverrideProperty);

    try {
        WorkflowJob pipeline = folder.createProject(WorkflowJob.class, "build-on-master-with-maven-settings-defined-in-jenkins-global-config-with-config-file-provider");
        pipeline.setDefinition(new CpsFlowDefinition(pipelineScript, true));
        WorkflowRun build = jenkinsRule.assertBuildStatus(Result.SUCCESS, pipeline.scheduleBuild2(0));
        jenkinsRule.assertLogContains("[withMaven] using overriden Maven settings by folder 'folder'. Config File Provider maven settings file 'maven-config-test-folder'",
            build);
        jenkinsRule.assertLogContains("<id>id-settings-test-through-config-file-provider-on-a-folder</id>", build);
    } finally {
        configOverrideProperty.setOverride(false);
    }
}
 
Example #10
Source File: WithMavenStepOnMasterTest.java    From pipeline-maven-plugin with MIT License 4 votes vote down vote up
@Test
public void maven_settings_defined_through_pipeline_attribute_and_config_file_provider() throws Exception {

    String mavenSettings =                 "<?xml version='1.0' encoding='UTF-8'?>\n" +
            "<settings \n" +
            "        xmlns='http://maven.apache.org/SETTINGS/1.0.0'\n" +
            "        xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'\n" +
            "        xsi:schemaLocation='http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd'>\n" +
            "    <servers>\n" +
            "    	<server>\n" +
            "	        <id>id-settings-test-from-pipeline-attribute-and-config-file-provider</id>\n" +
            "	    </server>\n" +
            "    </servers>\n" +
            "</settings>\n";

    MavenSettingsConfig mavenSettingsConfig = new MavenSettingsConfig("maven-config-test-from-pipeline-attribute", "maven-config-test-from-pipeline-attribute", "", mavenSettings, false, null);

    String pipelineScript = "node () {\n" +
            "    writeFile file: 'pom.xml', text: '''<?xml version='1.0' encoding='UTF-8'?>\n" +
            "<project\n" +
            "        xmlns='http://maven.apache.org/POM/4.0.0' \n" +
            "        xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' \n" +
            "        xsi:schemaLocation='http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd'>\n" +
            "    <modelVersion>4.0.0</modelVersion>\n" +
            "    <groupId>com.example</groupId>\n" +
            "    <artifactId>my-artifact</artifactId>\n" +
            "    <version>1.0.0-SNAPSHOT</version>\n" +
            "    <packaging>pom</packaging>\n" +
            "</project>'''\n" +
            "\n" +
            "    withMaven(maven: 'apache-maven-3.5.0', mavenSettingsConfig: 'maven-config-test-from-pipeline-attribute') {\n" +
            "        sh 'mvn help:effective-settings'\n" +
            "    }\n" +
            "}\n";

    GlobalConfigFiles.get().save(mavenSettingsConfig);

    try {
        WorkflowJob pipeline = jenkinsRule.createProject(WorkflowJob.class, "build-on-master-with-maven-global-settings-defined-in-jenkins-global-config-with-config-file-provider");
        pipeline.setDefinition(new CpsFlowDefinition(pipelineScript, true));
        WorkflowRun build = jenkinsRule.assertBuildStatus(Result.SUCCESS, pipeline.scheduleBuild2(0));
        jenkinsRule.assertLogContains("[withMaven] using Maven settings provided by the Jenkins Managed Configuration File 'maven-config-test-from-pipeline-attribute'", build);
        jenkinsRule.assertLogContains("<id>id-settings-test-from-pipeline-attribute-and-config-file-provider</id>", build);
    } finally {
        GlobalConfigFiles.get().remove(mavenSettingsConfig.id);
    }
}