<commit_before>import cd.go.contrib.plugins.configrepo.groovy.dsl.*
import java.util.function.*

def buildStage = {
  new Stage("Build", {
    jobs {
      job("BuildWebsite") {
        elasticProfileId = 'ecs-gocd-dev-build'
        tasks {
          bash {
            commandString = "bundle install --path .bundle --jobe 4"
          }
          bash {
            commandString = "bundle exec rake"
          }
        }
      }
    }
  })
}

def pushToGHPages = {
  new Stage("PushToGHPages", {
    jobs {
      job("PushToGHPages") {
        elasticProfileId = 'ecs-gocd-dev-build'
        tasks {
          bash {
            commandString = "git remote add upstream 'https://\${BUILD_MAP_USER}:\${BUILD_MAP_PASSWORD}@github.com/gocd/docs.go.cd'"
          }
          bash {
            commandString = "bundle install --path .bundle --jobs 4"
          }
          bash {
            commandString = "ALLOW_DIRTY=true REMOTE_NAME=upstream bundle exec rake publish"
          }
        }
      }
    }
  })
}

GoCD.script {
  pipelines {

    pipeline("docs.gocd.org-master") {
      group = 'gocd-help-docs'
      materials {
        git {
          url = 'https://github.com/gocd/docs.go.cd'
          branch = "master"
          shallowClone = true
        }
      }
      trackingTool {
        link = 'https://github.com/gocd/docs.go.cd/issues/${ID}'
        regex = ~/##(\\d+)/
      }
      stages {
        add(buildStage())
        add(pushToGHPages())
      }
    }

    pipeline("docs.gocd.org-PR") {
      group = 'gocd-help-docs'
      materials {
        pluggable {
          scm = '4b2cfb9e-95ed-4b39-9ac0-cf007f6c7c41'
        }
      }
      trackingTool {
        link = 'https://github.com/gocd/docs.go.cd/issues/${ID}'
        regex = ~/##(\\d+)/
      }
      stages {
        add(buildStage())
        add(pushToGHPages())
      }
    }

    ['17.8.0', '17.9.0', '17.10.0', '17.11.0', '18.1.0', '18.2.0', '18.3.0', '18.4.0', '18.5.0', '18.6.0', '18.7.0'].reverse().each { String releaseVersion ->
      pipeline("docs.gocd.org-${releaseVersion}") {
        group = "gocd-help-docs"
        materials {
          git {
            url = 'https://github.com/gocd/docs.go.cd'
            branch = "release-${releaseVersion}"
            shallowClone = true
          }
        }
        trackingTool {
          link = 'https://github.com/gocd/docs.go.cd/issues/${ID}'
          regex = ~/##(\\d+)/
        }
        stages {
          add(buildStage())
          add(pushToGHPages())
        }
      }
    }
  }
}
<commit_msg>fixup a typo<commit_after>import cd.go.contrib.plugins.configrepo.groovy.dsl.*
import java.util.function.*

def buildStage = {
  new Stage("Build", {
    jobs {
      job("BuildWebsite") {
        elasticProfileId = 'ecs-gocd-dev-build'
        tasks {
          bash {
            commandString = "bundle install --path .bundle --jobs 4"
          }
          bash {
            commandString = "bundle exec rake"
          }
        }
      }
    }
  })
}

def pushToGHPages = {
  new Stage("PushToGHPages", {
    jobs {
      job("PushToGHPages") {
        elasticProfileId = 'ecs-gocd-dev-build'
        tasks {
          bash {
            commandString = "git remote add upstream 'https://\${BUILD_MAP_USER}:\${BUILD_MAP_PASSWORD}@github.com/gocd/docs.go.cd'"
          }
          bash {
            commandString = "bundle install --path .bundle --jobs 4"
          }
          bash {
            commandString = "ALLOW_DIRTY=true REMOTE_NAME=upstream bundle exec rake publish"
          }
        }
      }
    }
  })
}

GoCD.script {
  pipelines {

    pipeline("docs.gocd.org-master") {
      group = 'gocd-help-docs'
      materials {
        git {
          url = 'https://github.com/gocd/docs.go.cd'
          branch = "master"
          shallowClone = true
        }
      }
      trackingTool {
        link = 'https://github.com/gocd/docs.go.cd/issues/${ID}'
        regex = ~/##(\\d+)/
      }
      stages {
        add(buildStage())
        add(pushToGHPages())
      }
    }

    pipeline("docs.gocd.org-PR") {
      group = 'gocd-help-docs'
      materials {
        pluggable {
          scm = '4b2cfb9e-95ed-4b39-9ac0-cf007f6c7c41'
        }
      }
      trackingTool {
        link = 'https://github.com/gocd/docs.go.cd/issues/${ID}'
        regex = ~/##(\\d+)/
      }
      stages {
        add(buildStage())
        add(pushToGHPages())
      }
    }

    ['17.8.0', '17.9.0', '17.10.0', '17.11.0', '18.1.0', '18.2.0', '18.3.0', '18.4.0', '18.5.0', '18.6.0', '18.7.0'].reverse().each { String releaseVersion ->
      pipeline("docs.gocd.org-${releaseVersion}") {
        group = "gocd-help-docs"
        materials {
          git {
            url = 'https://github.com/gocd/docs.go.cd'
            branch = "release-${releaseVersion}"
            shallowClone = true
          }
        }
        trackingTool {
          link = 'https://github.com/gocd/docs.go.cd/issues/${ID}'
          regex = ~/##(\\d+)/
        }
        stages {
          add(buildStage())
          add(pushToGHPages())
        }
      }
    }
  }
}

{'fraction_non_alphanumeric': 0.159655644687928, 'fraction_numerical': 0.025435335550772844, 'mean_word_length': 1.4875912408759124, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '869315', 'n_tokens_mistral': 1837, 'n_tokens_neox': 1779, 'n_words': 254}