<commit_before>version: 2

jobs:
  "openjdk-8":
    working_directory: ~/circleci-greenmail

    docker:
        - image: openjdk:8u332-jdk-slim-bullseye
          auth:
            username: $DOCKERHUB_IDENTITY
            password: $<PASSWORD>
          environment:
            TZ: UTC

    environment:
      MAVEN_HOME: /usr/share/maven
    steps:
      - checkout

      - run: >
          apt-get update && apt-get install -y curl
          && mkdir -p /usr/share/maven
          && curl -fsSL -o /tmp/apache-maven.tar.gz https://downloads.apache.org/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.tar.gz
          && tar -xzf /tmp/apache-maven.tar.gz -C /usr/share/maven --strip-components=1
          && rm -f /tmp/apache-maven.tar.gz
          && ln -s /usr/share/maven/bin/mvn /usr/bin/mvn

      - restore_cache:
          key: greenmail-{{ checksum "pom.xml" }}

      - run: mvn -V clean package -DskipTests dependency:resolve-plugins dependency:go-offline

      - save_cache:
          paths:
            - ~/.m2
          key: greenmail-{{ checksum "pom.xml" }}

      - run: mvn -V clean install

      - run:
          name: Save test results
          command: |
            mkdir -p ~/junit/
            find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} ~/junit/ \;
          when: always
      - store_test_results:
          path: ~/junit
      - store_artifacts:
          path: ~/junit

  "openjdk-11":
    working_directory: ~/circleci-greenmail

    docker:
        - image: openjdk:11.0.15-jdk-slim-bullseye
          auth:
            username: $DOCKERHUB_IDENTITY
            password: <PASSWORD>
          environment:
            TZ: UTC

    environment:
      MAVEN_HOME: /usr/share/maven
    steps:
      - checkout

      - run: >
          apt-get update && apt-get install -y curl
          && mkdir -p /usr/share/maven
          && curl -fsSL -o /tmp/apache-maven.tar.gz https://downloads.apache.org/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.tar.gz
          && tar -xzf /tmp/apache-maven.tar.gz -C /usr/share/maven --strip-components=1
          && rm -f /tmp/apache-maven.tar.gz
          && ln -s /usr/share/maven/bin/mvn /usr/bin/mvn

      - restore_cache:
          key: greenmail-{{ checksum "pom.xml" }}

      - run: mvn -V clean package -DskipTests dependency:resolve-plugins dependency:go-offline

      - save_cache:
          paths:
            - ~/.m2
          key: greenmail-{{ checksum "pom.xml" }}

      - run: mvn -V clean install

      - run:
          name: Save test results
          command: |
            mkdir -p ~/junit/
            find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} ~/junit/ \;
          when: always
      - store_test_results:
          path: ~/junit
      - store_artifacts:
          path: ~/junit
 
  "openjdk-17":
    working_directory: ~/circleci-greenmail

    docker:
        - image: azul/zulu-openjdk:17.0.3
          auth:
            username: $DOCKERHUB_IDENTITY
            password: $DOCKERHUB_PASSWORD<commit_msg>Build: Switch to azul provided openjdk images<commit_after>version: 2

jobs:
  "openjdk-8":
    working_directory: ~/circleci-greenmail

    docker:
        - image: azul/zulu-openjdk:8u345
          auth:
            username: $DOCKERHUB_IDENTITY
            password: $DOCKERHUB_PASSWORD
          environment:
            TZ: UTC

    environment:
      MAVEN_HOME: /usr/share/maven
    steps:
      - checkout

      - run: >
          apt-get update && apt-get install -y curl
          && mkdir -p /usr/share/maven
          && curl -fsSL -o /tmp/apache-maven.tar.gz https://downloads.apache.org/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.tar.gz
          && tar -xzf /tmp/apache-maven.tar.gz -C /usr/share/maven --strip-components=1
          && rm -f /tmp/apache-maven.tar.gz
          && ln -s /usr/share/maven/bin/mvn /usr/bin/mvn

      - restore_cache:
          key: greenmail-{{ checksum "pom.xml" }}

      - run: mvn -V clean package -DskipTests dependency:resolve-plugins dependency:go-offline

      - save_cache:
          paths:
            - ~/.m2
          key: greenmail-{{ checksum "pom.xml" }}

      - run: mvn -V clean install

      - run:
          name: Save test results
          command: |
            mkdir -p ~/junit/
            find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} ~/junit/ \;
          when: always
      - store_test_results:
          path: ~/junit
      - store_artifacts:
          path: ~/junit

  "openjdk-11":
    working_directory: ~/circleci-greenmail

    docker:
        - image: azul/zulu-openjdk:11.0.16
          auth:
            username: $DOCKERHUB_IDENTITY
            password: <PASSWORD>
          environment:
            TZ: UTC

    environment:
      MAVEN_HOME: /usr/share/maven
    steps:
      - checkout

      - run: >
          apt-get update && apt-get install -y curl
          && mkdir -p /usr/share/maven
          && curl -fsSL -o /tmp/apache-maven.tar.gz https://downloads.apache.org/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.tar.gz
          && tar -xzf /tmp/apache-maven.tar.gz -C /usr/share/maven --strip-components=1
          && rm -f /tmp/apache-maven.tar.gz
          && ln -s /usr/share/maven/bin/mvn /usr/bin/mvn

      - restore_cache:
          key: greenmail-{{ checksum "pom.xml" }}

      - run: mvn -V clean package -DskipTests dependency:resolve-plugins dependency:go-offline

      - save_cache:
          paths:
            - ~/.m2
          key: greenmail-{{ checksum "pom.xml" }}

      - run: mvn -V clean install

      - run:
          name: Save test results
          command: |
            mkdir -p ~/junit/
            find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} ~/junit/ \;
          when: always
      - store_test_results:
          path: ~/junit
      - store_artifacts:
          path: ~/junit
 
  "openjdk-17":
    working_directory: ~/circleci-greenmail

    docker:
        - image: azul/zulu-openjdk:17.0.4
          auth:
            username: $DOCKERHUB_IDENTITY
            password: $<PASSWORD>
{'fraction_non_alphanumeric': 0.130851755526658, 'fraction_numerical': 0.012028608582574773, 'mean_word_length': 1.5691022964509393, 'pattern_counts': {'":': 6, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 12}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '877000', 'n_tokens_mistral': 2161, 'n_tokens_neox': 2020, 'n_words': 421}