<commit_before>pipeline {
    agent {
        label 'docker'
    }
    parameters {
        string(
            defaultValue: '1.X.X',
            description: 'version of result package',
            name: 'NEW_VERSION')
    }
    options {
        skipStagesAfterUnstable()
        skipDefaultCheckout()
        disableConcurrentBuilds()
    }
    stages {
        stage('Set default value') {
            steps {
                deleteDir()
                withCredentials([sshUserPrivateKey(credentialsId: '<KEY>', keyFileVariable: 'SSHKEY', passphraseVariable: '', usernameVariable: '')]) {
                    sh '''
                        echo "#!/bin/sh
exec /usr/bin/ssh -i "${SSHKEY}" -o StrictHostKeyChecking=no \\\"\\\$@\\\"" > github-ssh.sh
                        chmod 755 github-ssh.sh
                        export GIT_SSH=$(pwd -P)/github-ssh.sh
                        git clone <EMAIL>:Percona-Lab/jenkins-pipelines

                        pushd jenkins-pipelines
                            for JOB in pmm-dashboards-package pmm-manage-package pmm-managed-package pmm-qan-api-package pmm-qan-app-package pmm-server-hotfix pmm-server-package pmm-server-packages pmm-server-release pmm-update-package; do
                                sed \
                                    -i'' \
                                    -e "s/defaultValue: '[0-9]\\.[0-9]\\.[0-9]'/defaultValue: '${NEW_VERSION}'/" \
                                    ./pmm/${JOB}.groovy
                            done
                            git pull
                            git commit -a -m "up PMM to ${NEW_VERSION}" --author "Jenkins <<EMAIL>>"
                            git config --global push.default matching
                            git push
                        popd
                    '''
                }
            }
        }
        stage('Run jobs') {
            steps {
                script {
                    ['pmm-dashboards-package', 'pmm-manage-package', 'pmm-managed-package', 'pmm-qan-api-package', 'pmm-qan-app-package', 'pmm-server-package', 'pmm-update-package'].each { JOB2RUN ->
                        build job: JOB2RUN, parameters: [string(name: 'GIT_BRANCH', value: 'master'), string(name: 'DESTINATION', value: 'laboratory'), string(name: 'VERSION', value: NEW_VERSION)], propagate: false, wait: false
                    }
                }
            }
        }
    }
}<commit_msg>PMM-1707 add rds_exporter package<commit_after>pipeline {
    agent {
        label 'docker'
    }
    parameters {
        string(
            defaultValue: '1.X.X',
            description: 'version of result package',
            name: 'NEW_VERSION')
    }
    options {
        skipStagesAfterUnstable()
        skipDefaultCheckout()
        disableConcurrentBuilds()
    }
    stages {
        stage('Set default value') {
            steps {
                deleteDir()
                withCredentials([sshUserPrivateKey(credentialsId: '<KEY>', keyFileVariable: 'SSHKEY', passphraseVariable: '', usernameVariable: '')]) {
                    sh '''
                        echo "#!/bin/sh
exec /usr/bin/ssh -i "${SSHKEY}" -o StrictHostKeyChecking=no \\\"\\\$@\\\"" > github-ssh.sh
                        chmod 755 github-ssh.sh
                        export GIT_SSH=$(pwd -P)/github-ssh.sh
                        git clone git@github.com:Percona-Lab/jenkins-pipelines

                        pushd jenkins-pipelines
                            for JOB in pmm-dashboards-package pmm-manage-package pmm-managed-package pmm-qan-api-package pmm-qan-app-package pmm-server-hotfix pmm-server-package pmm-server-packages pmm-server-release pmm-update-package; do
                                sed \
                                    -i'' \
                                    -e "s/defaultValue: '[0-9]\\.[0-9]\\.[0-9]'/defaultValue: '${NEW_VERSION}'/" \
                                    ./pmm/${JOB}.groovy
                            done
                            git pull
                            git commit -a -m "up PMM to ${NEW_VERSION}" --author "Jenkins <<EMAIL>>"
                            git config --global push.default matching
                            git push
                        popd
                    '''
                }
            }
        }
        stage('Run jobs') {
            steps {
                script {
                    ['pmm-dashboards-package', 'pmm-manage-package', 'pmm-managed-package', 'pmm-qan-api-package', 'pmm-qan-app-package', 'pmm-server-package', 'pmm-update-package', 'rds_exporter'].each { JOB2RUN ->
                        build job: JOB2RUN, parameters: [string(name: 'GIT_BRANCH', value: 'master'), string(name: 'DESTINATION', value: 'laboratory'), string(name: 'VERSION', value: NEW_VERSION)], propagate: false, wait: false
                    }
                }
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.12288911495422176, 'fraction_numerical': 0.005696846388606307, 'mean_word_length': 1.262310170271514, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3608354', 'n_tokens_mistral': 1407, 'n_tokens_neox': 1319, 'n_words': 258}