<commit_before>def notify = null

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'
  }
}

try {
  notify.started()

  def versiondbPush = 'true'
  if (params.NO_VERSIONDB_PUSH) {
    versiondbPush = 'false'
  }

  node('jenkins-snowflake-1') {
    ws('snowflake/release') {
      stage('build') {
        withEnv([
          "EUPS_PKGROOT=${pwd()}/distrib",
          'VERSIONDB_REPO=<EMAIL>:lsst/versiondb.git',
          "VERSIONDB_PUSH=${versiondbPush}",
          'GIT_SSH_COMMAND=ssh -o StrictHostKeyChecking=no',
          "LSST_JUNIT_PREFIX=centos-7.py3",
          'python=py3',
         ]) {
          sshagent (credentials: ['github-jenkins-versiondb']) {
            util.jenkinsWrapper()
          } // sshagent
        } // withEnv
      } // stage('build')

      stage('push docs') {
        withCredentials([[
          $class: 'UsernamePasswordMultiBinding',
          credentialsId: 'aws-doxygen-push',
          usernameVariable: 'AWS_ACCESS_KEY_ID',
          passwordVariable: 'AWS_SECRET_ACCESS_KEY'
        ],
        [
          $class: 'StringBinding',
          credentialsId: 'doxygen-push-bucket',
          variable: 'DOXYGEN_S3_BUCKET'
        ]]) {
          withEnv([
            "EUPS_PKGROOT=${pwd()}/distrib",
            "WORKSPACE=${pwd()}",
            "HOME=${pwd()}/home",
          ]) {
            util.shColor '''
              #!/bin/bash -e

              if [[ $SKIP_DOCS == "true" ]]; then
                exit 0
              fi

              # setup python env
              . "${WORKSPACE}/lsstsw/bin/setup.sh"
              pip install --upgrade awscli==1.11.167

              # provides DOC_PUSH_PATH
              . ./buildbot-scripts/settings.cfg.sh

              aws s3 cp --recursive "$DOC_PUSH_PATH"/ s3://$DOXYGEN_S3_BUCKET/stack/doxygen/

              # prevent unbounded accumulation of doc builds
              rm -rf "$DOC_PUSH_PATH"
            '''
          }
        }
      } // stage('push docs')
    } // ws<commit_msg>remove push s3 doc push cleanup<commit_after>def notify = null

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'
  }
}

try {
  notify.started()

  def versiondbPush = 'true'
  if (params.NO_VERSIONDB_PUSH) {
    versiondbPush = 'false'
  }

  node('jenkins-snowflake-1') {
    ws('snowflake/release') {
      stage('build') {
        withEnv([
          "EUPS_PKGROOT=${pwd()}/distrib",
          'VERSIONDB_REPO=<EMAIL>:lsst/versiondb.git',
          "VERSIONDB_PUSH=${versiondbPush}",
          'GIT_SSH_COMMAND=ssh -o StrictHostKeyChecking=no',
          "LSST_JUNIT_PREFIX=centos-7.py3",
          'python=py3',
         ]) {
          sshagent (credentials: ['github-jenkins-versiondb']) {
            util.jenkinsWrapper()
          } // sshagent
        } // withEnv
      } // stage('build')

      stage('push docs') {
        withCredentials([[
          $class: 'UsernamePasswordMultiBinding',
          credentialsId: 'aws-doxygen-push',
          usernameVariable: 'AWS_ACCESS_KEY_ID',
          passwordVariable: 'AWS_SECRET_ACCESS_KEY'
        ],
        [
          $class: 'StringBinding',
          credentialsId: 'doxygen-push-bucket',
          variable: 'DOXYGEN_S3_BUCKET'
        ]]) {
          withEnv([
            "EUPS_PKGROOT=${pwd()}/distrib",
            "WORKSPACE=${pwd()}",
            "HOME=${pwd()}/home",
          ]) {
            util.shColor '''
              #!/bin/bash -e

              if [[ $SKIP_DOCS == "true" ]]; then
                exit 0
              fi

              # setup python env
              . "${WORKSPACE}/lsstsw/bin/setup.sh"
              pip install --upgrade awscli==1.11.167

              # provides DOC_PUSH_PATH
              . ./buildbot-scripts/settings.cfg.sh

              aws s3 cp --recursive "$DOC_PUSH_PATH"/ s3://$DOXYGEN_S3_BUCKET/stack/doxygen/
            '''
          }
        }
      } // stage('push docs')
    } // ws
{'fraction_non_alphanumeric': 0.1416028815848717, 'fraction_numerical': 0.006978838361098604, 'mean_word_length': 1.7665006226650062, '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': '1992677', 'n_tokens_mistral': 1488, 'n_tokens_neox': 1434, 'n_words': 215}