<commit_before>pipeline:
  build_dry_run:
    image: plugins/docker
    secrets: [ docker_username, docker_password ]
    repo: publicintegrity/fec-loader
    tags:
      - ${DRONE_COMMIT_SHA:0:12}
      - latest
    dry_run: true
    when:
      event: [push, tag]

  build_push:
    image: plugins/docker
    secrets: [ docker_username, docker_password ]
    repo: publicintegrity/fec-loader
    tags:
      - ${DRONE_COMMIT_SHA:0:12}
      - latest
    when:
      event: deployment
      environment: production

  slack:
    image: plugins/slack
    secrets: [ slack_webhook ]
    when:
      status: [ success, failure ]<commit_msg>Attempt to deploy new pachyderm pipelines with drone<commit_after>pipeline:
  build_dry_run:
    image: plugins/docker
    secrets: [ docker_username, docker_password ]
    repo: publicintegrity/fec-loader
    tags:
      - ${DRONE_COMMIT_SHA:0:12}
      - latest
    dry_run: true
    when:
      event: [push, tag]

  build_push:
    image: plugins/docker
    secrets: [ docker_username, docker_password ]
    repo: publicintegrity/fec-loader
    tags:
      - ${DRONE_COMMIT_SHA:0:12}
      - latest
    when:
      event: deployment
      environment: production

  pipeline_update:
    image: laurentgoderre/pachctl:1.8.3-alpine
    environment:
      - PACHD_ADDRESS=pachd.pachyderm.svc.cluster.local:650
      - IMAGE_TAG=${DRONE_COMMIT_SHA:0:12}
    commands:
      # temp proof of concept, should build docker file including this stuff
      - apk --update add nodejs nodejs-npm jq && rm -rf /var/cache/apk/*
      - npm install -g yamlxjson
      - for file in $(find ./pipelines -name "*.yml"); do yaml2json $file | jq --arg transform.image publicintegrity/fec-loader:${IMAGE_TAG} | pachctl update-pipeline --no-port-forwarding; done
    when:
      event: deployment
      environment: production

  slack:
    image: plugins/slack
    secrets: [ slack_webhook ]
    when:
      status: [ success, failure ]
{'fraction_non_alphanumeric': 0.09810935104752172, 'fraction_numerical': 0.011241696474195196, 'mean_word_length': 2.7083333333333335, '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': '3970922', 'n_tokens_mistral': 674, 'n_tokens_neox': 641, 'n_words': 147}