<commit_before>def notify = null
node {
  dir('jenkins-dm-jobs') {
    // XXX the git step seemed to blowup on a branch of '*/<foo>'
    checkout([
      $class: 'GitSCM',
      branches: scm.getBranches(),
      userRemoteConfigs: scm.getUserRemoteConfigs()
    ])
    notify = load 'pipelines/lib/notify.groovy'
  }
}

try {
  notify.started()

  echo "branch: ${BRANCH}"
  echo "product: ${PRODUCT}"
  echo "skip demo: ${SKIP_DEMO}"
  echo "skip docs: ${SKIP_DOCS}"
  echo "[eups] tag: ${EUPS_TAG}"

  def bx = null
  def rebuildId = null
  def buildJob = 'run-rebuild'

  stage('build') {
    def result = build job: buildJob,
        parameters: [
          string(name: 'BRANCH', value: BRANCH),
          string(name: 'PRODUCT', value: PRODUCT),
          booleanParam(name: 'SKIP_DEMO', value: SKIP_DEMO.toBoolean()),
          booleanParam(name: 'SKIP_DOCS', value: SKIP_DOCS.toBoolean())
        ],
        wait: true
    rebuildId = result.id
  }

  stage('parse bNNNN') {
    node {
      step ([$class: 'CopyArtifact',
            projectName: buildJob,
            filter: 'build/manifest.txt',
            selector: [$class: 'SpecificBuildSelector', buildNumber: rebuildId]
            ]);

      def manifest = readFile 'build/manifest.txt'
      bx = bxxxx(manifest)

      echo "parsed bxxxx: ${bx}"
    }
  }

  stage('eups publish [tag]') {
    build job: 'run-publish',
      parameters: [
        string(name: 'EUPSPKG_SOURCE', value: 'git'),
        string(name: 'BUILD_ID', value: bx),
        string(name: 'TAG', value: EUPS_TAG),
        string(name: 'PRODUCT', value: PRODUCT)
      ]
  }

  stage('archive') {
    node {
      results = [
        bnnnn: bx
      ]
      dumpJson('results.json', results)

      archiveArtifacts([
        artifacts: 'results.json',
        fingerprint: true
      ])
    }
  }
} catch (e) {<commit_msg>fix release/run-rebuild artifact name<commit_after>def notify = null
node {
  dir('jenkins-dm-jobs') {
    // XXX the git step seemed to blowup on a branch of '*/<foo>'
    checkout([
      $class: 'GitSCM',
      branches: scm.getBranches(),
      userRemoteConfigs: scm.getUserRemoteConfigs()
    ])
    notify = load 'pipelines/lib/notify.groovy'
  }
}

try {
  notify.started()

  echo "branch: ${BRANCH}"
  echo "product: ${PRODUCT}"
  echo "skip demo: ${SKIP_DEMO}"
  echo "skip docs: ${SKIP_DOCS}"
  echo "[eups] tag: ${EUPS_TAG}"

  def bx = null
  def rebuildId = null
  def buildJob = 'run-rebuild'

  stage('build') {
    def result = build job: buildJob,
        parameters: [
          string(name: 'BRANCH', value: BRANCH),
          string(name: 'PRODUCT', value: PRODUCT),
          booleanParam(name: 'SKIP_DEMO', value: SKIP_DEMO.toBoolean()),
          booleanParam(name: 'SKIP_DOCS', value: SKIP_DOCS.toBoolean())
        ],
        wait: true
    rebuildId = result.id
  }

  stage('parse bNNNN') {
    node {
      manifest_artifact = 'lsstsw/build/manifest.txt'

      step ([$class: 'CopyArtifact',
            projectName: buildJob,
            filter: manifest_artifact,
            selector: [$class: 'SpecificBuildSelector', buildNumber: rebuildId]
            ]);

      def manifest = readFile manifest_artifact
      bx = bxxxx(manifest)

      echo "parsed bxxxx: ${bx}"
    }
  }

  stage('eups publish [tag]') {
    build job: 'run-publish',
      parameters: [
        string(name: 'EUPSPKG_SOURCE', value: 'git'),
        string(name: 'BUILD_ID', value: bx),
        string(name: 'TAG', value: EUPS_TAG),
        string(name: 'PRODUCT', value: PRODUCT)
      ]
  }

  stage('archive') {
    node {
      results = [
        bnnnn: bx
      ]
      dumpJson('results.json', results)

      archiveArtifacts([
        artifacts: 'results.json',
        fingerprint: true
      ])
    }
  }
} catch (e) {
{'fraction_non_alphanumeric': 0.14259405419626414, 'fraction_numerical': 0.0, 'mean_word_length': 2.415992812219227, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '2861504', 'n_tokens_mistral': 1319, 'n_tokens_neox': 1260, 'n_words': 295}