<commit_before>#!/usr/bin/env groovy

/*
 * This file is responsible for setting Global Pipeline configurations to the
 * sensible defaults which are necessary
 */

import jenkins.model.GlobalConfiguration
import org.jenkinsci.plugins.pipeline.modeldefinition.config.GlobalConfig


/* Set the default Docker label for Declarative Pipeline to .. wait for it .. docker */
GlobalConfig c = GlobalConfiguration.all().find { it instanceof GlobalConfig }
c?.dockerLabel = 'docker'<commit_msg>Add the Code Valet Shared Libraries by default to instances.<commit_after>#!/usr/bin/env groovy

/*
 * This file is responsible for setting Global Pipeline configurations to the
 * sensible defaults which are necessary
 */


import jenkins.model.*
import jenkins.plugins.git.GitSCMSource
import org.jenkinsci.plugins.workflow.libs.*
import jenkins.model.GlobalConfiguration
import org.jenkinsci.plugins.pipeline.modeldefinition.config.GlobalConfig


/* Set the default Docker label for Declarative Pipeline to .. wait for it .. docker */
GlobalConfig c = GlobalConfiguration.all().find { it instanceof GlobalConfig }
c?.dockerLabel = 'docker'


/* Add our global library properly */
List<LibraryConfiguration> libs = []

['pipeline-library', 'inline-pipeline-secrets'].each {
  GitSCMSource source= new GitSCMSource(it, "https://github.com/codevalet/${it}.git",
                                        null, null, null, false)

  LibraryConfiguration lib = new LibraryConfiguration(it, new SCMSourceRetriever(source))
  lib.implicit = true
  lib.defaultVersion = 'master'
  libs.add (lib)
}

GlobalLibraries.get().libraries = libs
{'fraction_non_alphanumeric': 0.0983910891089109, 'fraction_numerical': 0.0, 'mean_word_length': 4.25, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '820219', 'n_tokens_mistral': 455, 'n_tokens_neox': 434, 'n_words': 132}