<commit_before>#!/bin/env groovy​

folder("triggers")

job("triggers/tectonic-installer-pr-trigger") {
  description('Tectonic Installer PR Trigger. Changes here will be reverted automatically.')

  concurrentBuild()

  logRotator(30, 100)
  label("worker && ec2")

  properties {
    githubProjectUrl('https://github.com/coreos/tectonic-installer')
  }

  wrappers {
    colorizeOutput()
    timestamps()
    buildInDocker {
      image('quay.io/coreos/tectonic-smoke-test-env:v5.6')
    }
  }

  triggers {
    ghprbTrigger {
      gitHubAuthId("")
      adminlist("")
      orgslist("coreos\ncoreos-inc")
      whitelist("")
      cron("H/5 * * * *")
      triggerPhrase("ok to test")
      onlyTriggerPhrase(false)
      useGitHubHooks(true)
      permitAll(false)
      autoCloseFailedPullRequests(false)
      displayBuildErrorsOnDownstreamBuilds(false)
      commentFilePath("")
      skipBuildPhrase(".*\\[skip\\W+ci\\].*")
      blackListCommitAuthor("")
      allowMembersOfWhitelistedOrgsAsAdmin(true)
      msgSuccess("")
      msgFailure("")
      commitStatusContext("Jenkins-Tectonic-Installer")
      buildDescTemplate("#\$pullId: \$abbrTitle")
      blackListLabels("")
      whiteListLabels("")
      includedRegions("")
      excludedRegions("")
    }
  }

  steps {
    shell """#!/bin/bash -ex
      curl "https://api.github.com/repos/coreos/tectonic-installer/labels" > repoLabels
      repoLabels=\$(jq ".[] | .name" repoLabels)
      repoLabels=\$(echo \$repoLabels | tr -d "\\"" | tr [a-z] [A-Z] | tr - _)
      for label in \$repoLabels
      do
        echo \$label=false >> env_vars
      done


      curl "https://api.github.com/repos/coreos/tectonic-installer/issues/1839" > pr
      labels=\$(jq ".labels | .[] | .name" pr)
      labels=\$(echo \$labels | tr -d "\\"" | tr [a-z] [A-Z] | tr - _)
      for label in \$labels<commit_msg>tests: Programmatically curl specific PR id<commit_after>#!/bin/env groovy​

folder("triggers")

job("triggers/tectonic-installer-pr-trigger") {
  description('Tectonic Installer PR Trigger. Changes here will be reverted automatically.')

  concurrentBuild()

  logRotator(30, 100)
  label("worker && ec2")

  properties {
    githubProjectUrl('https://github.com/coreos/tectonic-installer')
  }

  wrappers {
    colorizeOutput()
    timestamps()
    buildInDocker {
      image('quay.io/coreos/tectonic-smoke-test-env:v5.6')
    }
  }

  triggers {
    ghprbTrigger {
      gitHubAuthId("")
      adminlist("")
      orgslist("coreos\ncoreos-inc")
      whitelist("")
      cron("H/5 * * * *")
      triggerPhrase("ok to test")
      onlyTriggerPhrase(false)
      useGitHubHooks(true)
      permitAll(false)
      autoCloseFailedPullRequests(false)
      displayBuildErrorsOnDownstreamBuilds(false)
      commentFilePath("")
      skipBuildPhrase(".*\\[skip\\W+ci\\].*")
      blackListCommitAuthor("")
      allowMembersOfWhitelistedOrgsAsAdmin(true)
      msgSuccess("")
      msgFailure("")
      commitStatusContext("Jenkins-Tectonic-Installer")
      buildDescTemplate("#\$pullId: \$abbrTitle")
      blackListLabels("")
      whiteListLabels("")
      includedRegions("")
      excludedRegions("")
    }
  }

  steps {
    shell """#!/bin/bash -ex
      curl "https://api.github.com/repos/coreos/tectonic-installer/labels" > repoLabels
      repoLabels=\$(jq ".[] | .name" repoLabels)
      repoLabels=\$(echo \$repoLabels | tr -d "\\"" | tr [a-z] [A-Z] | tr - _)
      for label in \$repoLabels
      do
        echo \$label=false >> env_vars
      done


      curl "https://api.github.com/repos/coreos/tectonic-installer/issues/\${ghprbPullId}" > pr
      labels=\$(jq ".labels | .[] | .name" pr)
      labels=\$(echo \$labels | tr -d "\\"" | tr [a-z] [A-Z] | tr - _)
      for label in \$labels
{'fraction_non_alphanumeric': 0.16034985422740525, 'fraction_numerical': 0.0058309037900874635, 'mean_word_length': 2.7777777777777777, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 6, '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': '531367', 'n_tokens_mistral': 1340, 'n_tokens_neox': 1271, 'n_words': 204}