<commit_before>def versions = [
  ["2.2.0", "2.11.8"],
  ["2.3.0", "2.11.8"],
  ["2.4.0", "2.11.8"],
  ["2.4.0", "2.12.7"],
]

def branches = [:]

versions.each{ v ->
    def spark = v.get(0)
    def scala = v.get(1)
    branches["Spark_${spark}_Scala${scala}"] = {
        test_mist("JenkinsOnDemand", spark, scala)
    }
}

//Execute test and builds in parallel
parallel branches

def publishDocs() {
    return "master".equalsIgnoreCase(env.BRANCH_NAME)
}
//some commit
node("JenkinsOnDemand") {
    stage('Final stage - scm checkout') {
             // when jenkins git plugin 3.4.0 change git scm behaviour
             // so we must force it to checkout tags as was before
             // https://issues.jenkins-ci.org/browse/JENKINS-45164
             checkout scm
             sh "cd ${env.WORKSPACE}"
             sh "git fetch --tags"
             sh "${env.WORKSPACE}/sbt/sbt clean"
    }

    if (publishDocs()) {
      stage("publish docs") {
          sh "${env.WORKSPACE}/sbt/sbt docs/makeMicrosite"
          sh "jekyll build --source ${env.WORKSPACE}/docs/target/site --destination ${env.WORKSPACE}/docs/target/site/_site"
          sshagent(['hydro-site-publish']) {
            sh "scp -o StrictHostKeyChecking=no -r ${env.WORKSPACE}/docs/target/site/_site/* <EMAIL>:publish_dir"
          }
      }
    }

    onRelease { v ->
      stage("upload tar default") {
        sh "${env.WORKSPACE}/sbt/sbt packageTar"
        tar = "${env.WORKSPACE}/target/mist-${v}.tar.gz"
        sshagent(['hydrosphere_static_key']) {
          sh "scp -o StrictHostKeyChecking=no ${tar} hydrosphere@172.16.17.32:publish_dir"
        }
      }

      stage("upload tar 2.12") {
        sh "${env.WORKSPACE}/sbt/sbt -DscalaVersion=2.12.7 packageTar"
        tar = "${env.WORKSPACE}/target/mist-${v}-scala2.12.tar.gz"<commit_msg>upload 2.12 tar<commit_after>def versions = [
  ["2.2.0", "2.11.8"],
  ["2.3.0", "2.11.8"],
  ["2.4.0", "2.11.8"],
  ["2.4.0", "2.12.7"],
]

def branches = [:]

versions.each{ v ->
    def spark = v.get(0)
    def scala = v.get(1)
    branches["Spark_${spark}_Scala${scala}"] = {
        test_mist("JenkinsOnDemand", spark, scala)
    }
}

//Execute test and builds in parallel
parallel branches

def publishDocs() {
    return "master".equalsIgnoreCase(env.BRANCH_NAME)
}
//some commit
node("JenkinsOnDemand") {
    stage('Final stage - scm checkout') {
             // when jenkins git plugin 3.4.0 change git scm behaviour
             // so we must force it to checkout tags as was before
             // https://issues.jenkins-ci.org/browse/JENKINS-45164
             checkout scm
             sh "cd ${env.WORKSPACE}"
             sh "git fetch --tags"
             sh "${env.WORKSPACE}/sbt/sbt clean"
    }

    if (publishDocs()) {
      stage("publish docs") {
          sh "${env.WORKSPACE}/sbt/sbt docs/makeMicrosite"
          sh "jekyll build --source ${env.WORKSPACE}/docs/target/site --destination ${env.WORKSPACE}/docs/target/site/_site"
          sshagent(['hydro-site-publish']) {
            sh "scp -o StrictHostKeyChecking=no -r ${env.WORKSPACE}/docs/target/site/_site/* <EMAIL>:publish_dir"
          }
      }
    }

    onRelease { v ->
      stage("upload tar default") {
        sh "${env.WORKSPACE}/sbt/sbt packageTar"
        tar = "${env.WORKSPACE}/target/mist-${v}.tar.gz"
        sshagent(['hydrosphere_static_key']) {
          sh "scp -o StrictHostKeyChecking=no ${tar} hydrosphere@172.16.17.32:publish_dir"
        }
      }

      stage("upload tar 2.12") {
        sh "${env.WORKSPACE}/sbt/sbt -DscalaVersion=2.12.7 packageTar"
        tar = "${env.WORKSPACE}/target/mist-${v}-scala-2.12.tar.gz"
{'fraction_non_alphanumeric': 0.16889860617655097, 'fraction_numerical': 0.03197594971303635, 'mean_word_length': 2.2649420160570917, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '763126', 'n_tokens_mistral': 1354, 'n_tokens_neox': 1289, 'n_words': 249}