<commit_before>resource_types:

# used to check for PRs and update status at Github
# - name: pull-request
#   type: docker-image
#   source:
#     repository: jtarchie/pr

- name: rsync-resource
  type: docker-image
  source:
      repository: msarahan/concourse-rsync-resource
      tag: latest


resources:
# - name: recipe-repo-source
#   type: pull-request
#   source:
#     repo: {{recipe-repo}}
#     access_token: {{recipe-repo-access-token}}

- name: recipe-repo-source
  type: git
  source:
    uri: {{recipe-repo}}

- name: rsync-config
  type: rsync-resource
  source:
    server: {{intermediate-server}}
    base_dir: {{intermediate-config-folder}}
    user : {{intermediate-user}}
    private_key: {{intermediate-private-key}}
    disable_version_path: true

- name: rsync-recipes
  type: rsync-resource
  source:
    server: {{intermediate-server}}
    base_dir: {{intermediate-recipe-folder}}
    user : {{intermediate-user}}
    private_key: {{intermediate-private-key}}
    disable_version_path: true

jobs:
- name: collect-tasks
  public: True
  plan:
  # pull down any PR submitted
  - get: recipe-repo-source
    trigger: true
    submodules: all
  # update status for that PR
  # - put: recipe-repo-source
  #   params:
  #     path: recipe-repo-source
  #     status: pending
  - get: rsync-intermediary
  - task: c3i-examine
    config:
      # seems redundant, but you need this in order to have the repo source code folder show up
      inputs:
        - name: recipe-repo-source
        - name: rsync-intermediary
      outputs:
        - name: output
      image_resource:
        type: docker-image
        source:
          repository: msarahan/conda-concourse-ci
      platform: linux
      run:
        # this should output plan.yaml (credentials baked in) and recipes.  These will be in a folder
        #    named for the git revision that we're on right now.
        path: c3i
        dir: recipe-repo-source
        args:
          - examine
          - {{base-name}}
          - .
          - --matrix-base-dir
          - ../rsync-config/
          - --output-dir
          # this is evaluated by c3i, not by concourse.
          - "../output/{git_identifier}"
  - put: rsync-recipes
    params:
      sync_dir: "output"
  # - put: recipe-repo-source
  #   params:
  #     path: recipe-repo-source
  #     status: pending
  - task: set-execute-pipeline
    config:
      inputs:
        - name: rsync-config
        - name: recipe-repo-source
        - name: output
      image_resource:
        type: docker-image
        source:
          repository: msarahan/conda-concourse-ci
      platform: linux
      run:
        path: c3i
        # TODO: need to determine what private/public status is, and set child accordingly
        args:
          - submit
          - {{base-name}}
          - --pipeline-file
          - "output/plan_and_recipes/{git_identifier}/plan.yml"
          - --pipeline-name
          # these template variables are filled in by the c3i program, NOT concourse.
          - "{base_name}-execute-{git_identifier}"
          - --src-dir
          - recipe-repo-source
          - --config-root-dir
          # we omit the config name here because that's already captured in rsync-intermediary<commit_msg>fix wrong reference to rsync-intermediary<commit_after>resource_types:

# used to check for PRs and update status at Github
# - name: pull-request
#   type: docker-image
#   source:
#     repository: jtarchie/pr

- name: rsync-resource
  type: docker-image
  source:
      repository: msarahan/concourse-rsync-resource
      tag: latest


resources:
# - name: recipe-repo-source
#   type: pull-request
#   source:
#     repo: {{recipe-repo}}
#     access_token: {{recipe-repo-access-token}}

- name: recipe-repo-source
  type: git
  source:
    uri: {{recipe-repo}}

- name: rsync-config
  type: rsync-resource
  source:
    server: {{intermediate-server}}
    base_dir: {{intermediate-config-folder}}
    user : {{intermediate-user}}
    private_key: {{intermediate-private-key}}
    disable_version_path: true

- name: rsync-recipes
  type: rsync-resource
  source:
    server: {{intermediate-server}}
    base_dir: {{intermediate-recipe-folder}}
    user : {{intermediate-user}}
    private_key: {{intermediate-private-key}}
    disable_version_path: true

jobs:
- name: collect-tasks
  public: True
  plan:
  # pull down any PR submitted
  - get: recipe-repo-source
    trigger: true
    submodules: all
  # update status for that PR
  # - put: recipe-repo-source
  #   params:
  #     path: recipe-repo-source
  #     status: pending
  - get: rsync-config
  - task: c3i-examine
    config:
      # seems redundant, but you need this in order to have the repo source code folder show up
      inputs:
        - name: recipe-repo-source
        - name: rsync-config
      outputs:
        - name: output
      image_resource:
        type: docker-image
        source:
          repository: msarahan/conda-concourse-ci
      platform: linux
      run:
        # this should output plan.yaml (credentials baked in) and recipes.  These will be in a folder
        #    named for the git revision that we're on right now.
        path: c3i
        dir: recipe-repo-source
        args:
          - examine
          - {{base-name}}
          - .
          - --matrix-base-dir
          - ../rsync-config/
          - --output-dir
          # this is evaluated by c3i, not by concourse.
          - "../output/{git_identifier}"
  - put: rsync-recipes
    params:
      sync_dir: "output"
  # - put: recipe-repo-source
  #   params:
  #     path: recipe-repo-source
  #     status: pending
  - task: set-execute-pipeline
    config:
      inputs:
        - name: rsync-config
        - name: recipe-repo-source
        - name: output
      image_resource:
        type: docker-image
        source:
          repository: msarahan/conda-concourse-ci
      platform: linux
      run:
        path: c3i
        # TODO: need to determine what private/public status is, and set child accordingly
        args:
          - submit
          - {{base-name}}
          - --pipeline-file
          - "output/plan_and_recipes/{git_identifier}/plan.yml"
          - --pipeline-name
          # these template variables are filled in by the c3i program, NOT concourse.
          - "{base_name}-execute-{git_identifier}"
          - --src-dir
          - recipe-repo-source
          - --config-root-dir
{'fraction_non_alphanumeric': 0.10537734387106772, 'fraction_numerical': 0.001549666821633349, 'mean_word_length': 2.0215355805243447, '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': '125637', 'n_tokens_mistral': 1981, 'n_tokens_neox': 1954, 'n_words': 521}