<commit_before>node('jenkins-master') {
  dir('jenkins-dm-jobs') {
    checkout([
      $class: 'GitSCM',
      branches: scm.getBranches(),
      userRemoteConfigs: scm.getUserRemoteConfigs(),
      changelog: false,
      poll: false
    ])
    notify = load 'pipelines/lib/notify.groovy'
    util = load 'pipelines/lib/util.groovy'
  }
}

notify.wrap {
  def image      = null
  def hubRepo    = 'lsstsqre/documenteer-base'
  def githubSlug = 'lsst-sqre/docker-documenteer-base'
  def githubRepo = "https://github.com/${githubSlug}"
  def githubRef  = 'master'
  def dockerDir  = ''
  def pushLatest = params.LATEST
  def noPush     = params.NO_PUSH

  def run = {
    def abbrHash = null

    stage('checkout') {
      git([
        url: githubRepo,
        branch: githubRef,
      ])

      abbrHash = sh(returnStdout: true, script: "git log -n 1 --pretty=format:'%h'").trim()
    }

    stage('build') {
      dir(dockerDir) {
        // ensure base image is always up to date
        image = docker.build("${hubRepo}", '--pull=true --no-cache .')
      }
    }

    stage('push') {
      if (!noPush) {
        docker.withRegistry(
          'https://index.docker.io/v1/',
          'dockerhub-sqreadmin'
        ) {
          image.push(githubRef)
          if (githubRef == 'master') {
            image.push("g${abbrHash}")
          }
          if (pushLatest) {
            image.push('latest')
          }
        }
      }
    } // push
  } // run

  node('docker') {
    timeout(time: 30, unit: 'MINUTES') {
      run()
    }
  } // node
} // notify.wrap
<commit_msg>kludge around docker fingerprinting problem<commit_after>node('jenkins-master') {
  dir('jenkins-dm-jobs') {
    checkout([
      $class: 'GitSCM',
      branches: scm.getBranches(),
      userRemoteConfigs: scm.getUserRemoteConfigs(),
      changelog: false,
      poll: false
    ])
    notify = load 'pipelines/lib/notify.groovy'
    util = load 'pipelines/lib/util.groovy'
  }
}

notify.wrap {
  def image      = null
  def hubRepo    = 'lsstsqre/documenteer-base'
  def githubSlug = 'lsst-sqre/docker-documenteer-base'
  def githubRepo = "https://github.com/${githubSlug}"
  def githubRef  = 'master'
  def dockerDir  = ''
  def pushLatest = params.LATEST
  def noPush     = params.NO_PUSH

  def run = {
    def abbrHash = null

    stage('checkout') {
      git([
        url: githubRepo,
        branch: githubRef,
      ])

      abbrHash = sh(returnStdout: true, script: "git log -n 1 --pretty=format:'%h'").trim()
    }

    stage('build') {
      dir(dockerDir) {
        // ensure base image is always up to date
        //image = docker.build("${hubRepo}", '--pull=true --no-cache .')
        // XXX for unknown reasons, jenkins is choking on this Dockerfile
        // java.io.IOException: Cannot retrieve .Id from 'docker inspect    lsstsqre/newinstall:latest'
        // running the build by hand seems to kludge around the problem...
        util.bash("docker build -t ${hubRepo} --pull=true --no-cache .")
        image = docker.image(hubRepo)
      }
    }

    stage('push') {
      if (!noPush) {
        docker.withRegistry(
          'https://index.docker.io/v1/',
          'dockerhub-sqreadmin'
        ) {
          image.push(githubRef)
          if (githubRef == 'master') {
            image.push("g${abbrHash}")
          }
          if (pushLatest) {
            image.push('latest')
          }
        }
      }
    } // push
  } // run

  node('docker') {
    timeout(time: 30, unit: 'MINUTES') {
      run()
    }
  } // node
} // notify.wrap

{'fraction_non_alphanumeric': 0.145985401459854, 'fraction_numerical': 0.0022459292532285235, 'mean_word_length': 1.9840871021775544, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '1460576', 'n_tokens_mistral': 1242, 'n_tokens_neox': 1186, 'n_words': 244}