<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 releaseJob = 'release/nightly-release'
  def year = null
  def month = null
  def day = null

  stage('generate temporal coordinates') {
    def tz = TimeZone.getTimeZone('America/Los_Angeles')
    def date = new java.util.Date()

    def yearFormat = new java.text.SimpleDateFormat('YYYY')
    yearFormat.setTimeZone(tz)
    def monthFormat = new java.text.SimpleDateFormat('MM')
    monthFormat.setTimeZone(tz)
    def dayFormat = new java.text.SimpleDateFormat('dd')
    dayFormat.setTimeZone(tz)

    year = yearFormat.format(date)
    month = monthFormat.format(date)
    day = dayFormat.format(date)

    echo "generated year: ${year}"
    echo "generated month: ${month}"<commit_msg>fix nightly release tag generation<commit_after>import java.time.LocalDate
import java.time.ZoneId

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 releaseJob = 'release/nightly-release'
  def year = null
  def month = null
  def day = null

  stage('generate temporal coordinates') {
    def date = LocalDate.now(ZoneId.of('America/Los_Angeles'))

    year  = date.getYear().toString()
    month = date.getMonthValue().toString()
    day   = date.getDayOfMonth().toString()

    echo "generated year: ${year}"
    echo "generated month: ${month}"
{'fraction_non_alphanumeric': 0.13013698630136986, 'fraction_numerical': 0.0, 'mean_word_length': 3.3755760368663594, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2392911', 'n_tokens_mistral': 632, 'n_tokens_neox': 613, 'n_words': 130}