<commit_before>---
version: 2.1

orbs:
  prometheus: prometheus/prometheus@0.4.0

executors:
  # Whenever the Go version is updated here, .promu.yml should
  # also be updated.
  golang:
    docker:
    - image: circleci/golang:1.13

jobs:
  test:
    executor: golang

    steps:
    - prometheus/setup_environment
    - run: make
    - prometheus/store_artifact:
        file: bind_exporter

  codespell:
    docker:
    - image: circleci/python

    steps:
    - checkout
    - run: sudo pip install codespell
    - run: codespell --skip=".git,./vendor,ttar,go.mod,go.sum,*pem" -L uint,packages\',uptodate

workflows:
  version: 2
  bind_exporter:
    jobs:
    - test:
        filters:
          tags:
            only: /.*/
    - prometheus/build:
        name: build
        filters:
          tags:
            only: /.*/
    - codespell:
        filters:
          tags:
            only: /.*/
    - prometheus/publish_master:
        context: org-context
        requires:
        - test
        - build
        filters:
          branches:
            only: master
    - prometheus/publish_release:
        context: org-context
        requires:
        - test
        - build
        filters:
          tags:
            only: /^v.*/
          branches:
            ignore: /.*/
<commit_msg>Customize release publishing step<commit_after>---
version: 2.1

orbs:
  prometheus: prometheus/prometheus@0.4.0

executors:
  # Whenever the Go version is updated here, .promu.yml should
  # also be updated.
  golang:
    docker:
    - image: circleci/golang:1.13

jobs:
  test:
    executor: golang

    steps:
    - prometheus/setup_environment
    - run: make
    - prometheus/store_artifact:
        file: bind_exporter

  codespell:
    docker:
    - image: circleci/python

    steps:
    - checkout
    - run: sudo pip install codespell
    - run: codespell --skip=".git,./vendor,ttar,go.mod,go.sum,*pem" -L uint,packages\',uptodate

  publish_master:
    executor: golang

    steps:
    - prometheus/setup_build_environment
    - prometheus/publish_images:
        registry: docker.io
        organization: prometheuscommunity
        login_variable: DOCKER_LOGIN
        password_variable: DOCKER_PASSWORD

  publish_release:
    executor: golang

    steps:
    - prometheus/setup_build_environment
    - run: promu crossbuild tarballs
    - run: promu checksum .tarballs
    - run: promu release .tarballs
    - store_artifacts:
        path: .tarballs
        destination: releases
    - prometheus/publish_release_images:
        registry: docker.io
        organization: prometheuscommunity
        login_variable: DOCKER_LOGIN
        password_variable: DOCKER_PASSWORD

workflows:
  version: 2
  bind_exporter:
    jobs:
    - test:
        filters:
          tags:
            only: /.*/
    - prometheus/build:
        name: build
        filters:
          tags:
            only: /.*/
    - codespell:
        filters:
          tags:
            only: /.*/
    - publish_master:
        context: org-context
        requires:
        - test
        - build
        filters:
          branches:
            only: master
    - publish_release:
        context: org-context
        requires:
        - test
        - build
        filters:
          tags:
            only: /^v.*/
          branches:
            ignore: /.*/

{'fraction_non_alphanumeric': 0.09348864994026285, 'fraction_numerical': 0.005376344086021506, 'mean_word_length': 1.657936507936508, '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': '5354112', 'n_tokens_mistral': 1089, 'n_tokens_neox': 1026, 'n_words': 230}