<commit_before>resource_types:
- name: slack-notification
  type: docker-image
  source:
    repository: cfcommunity/slack-notification-resource
    tag: latest
###################################################
resources:
- name: sts4-out
  type: git
  source:
    uri: <EMAIL>:spring-projects/sts4.git
    branch: {{branch}}
    private_key: {{rsa_id}}
- name: sts4
  type: git
  source:
    uri: <EMAIL>:spring-projects/sts4.git
    branch: {{branch}}
    private_key: {{rsa_id}}
    tag_filter: vscode-manifest-yaml-*-RC*
- name: s3-vscode-manifest-yaml-vsix
  type: s3
  source:
    bucket: {{s3_bucket}}
    access_key_id: {{s3_accesskey}}
    secret_access_key: {{s3_secretkey}}
    region_name: {{s3_region}}
    regexp: sts4/vscode-extensions/releases/vscode-manifest-yaml-(.*).vsix    
- name: slack-notification
  type: slack-notification
  source:
    url: https://hooks.slack.com/services/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
######################################################
jobs:
- name: build-vscode-manifest-yaml-release
  plan:
  - get: sts4
    trigger: true
  - task: build-vsix
    file: sts4/concourse/tasks/build-vsix.yml
    params:
      extension_id: vscode-manifest-yaml
      dist_type: release
    on_failure:
      put: slack-notification
      params:
        channel: "@kdvolder"
        text: | 
           Concourse ${BUILD_PIPELINE_NAME}/${BUILD_JOB_NAME}/${BUILD_NAME} has failed!
  - put: s3-vscode-manifest-yaml-vsix
    params:
      file: out/*.vsix
      acl: public-read
    on_success:
      put: slack-notification
      params:
        channel: "@kdvolder"
        text_file: s3-vscode-manifest-yaml-vsix/url
        icon_url: https://raw.githubusercontent.com/spring-projects/sts4/master/vscode-extensions/vscode-manifest-yaml/icon.png
        text: |
          Concourse ${BUILD_PIPELINE_NAME}/${BUILD_JOB_NAME}/${BUILD_NAME} has succeed!
          Release candidate available for testing $TEXT_FILE_CONTENT
- name: publish-vscode-manifest-yaml-release
  plan:
  - do:
    - get: sts4
      passed:
      - build-vscode-manifest-yaml-release
    - get: s3-vscode-manifest-yaml-vsix
      passed:
      - build-vscode-manifest-yaml-release
    - task: publish-vscode-manifest-yaml-release
      file: sts4/concourse/tasks/vsce-publish.yml
      input_mapping:
        vsix-resource: s3-vscode-manifest-yaml-vsix
      params:
        vsce_publisher: {{vsce_publisher}}
        vsce_token: {{vsce_token}}
        extension_id: vscode-manifest-yaml
    - put: sts4-out
      params:
        repository: sts4-out
        only_tag: true
    on_failure:
      put: slack-notification
      params:
        channel: "@kdvolder"
        text: | 
           Concourse ${BUILD_PIPELINE_NAME}/${BUILD_JOB_NAME}/${BUILD_NAME} has failed!
- name: bump-vscode-manifest-yaml-version
  serial: true
  plan:
  - do:
    - get: sts4
      trigger: true
      passed:
      - publish-vscode-manifest-yaml-release
    - task: bump-vscode-manifest-yaml-version
      file: sts4/concourse/tasks/bump-version.yml
      params:
        extension_id: vscode-manifest-yaml
    - put: sts4-out
      timeout: 5m
      params:
        repository: sts4-out
        rebase: true
    on_failure:
      put: slack-notification
      params:
        channel: "@kdvolder"
        text: | 
           Concourse ${BUILD_PIPELINE_NAME}/${BUILD_JOB_NAME}/${BUILD_NAME} has failed!
        
    
<commit_msg>Notification when vscode extension is published on marketplace.<commit_after>resource_types:
- name: slack-notification
  type: docker-image
  source:
    repository: cfcommunity/slack-notification-resource
    tag: latest
###################################################
resources:
- name: sts4-out
  type: git
  source:
    uri: <EMAIL>:spring-projects/sts4.git
    branch: {{branch}}
    private_key: {{rsa_id}}
- name: sts4
  type: git
  source:
    uri: git@github.com:spring-projects/sts4.git
    branch: {{branch}}
    private_key: {{rsa_id}}
    tag_filter: vscode-manifest-yaml-*-RC*
- name: s3-vscode-manifest-yaml-vsix
  type: s3
  source:
    bucket: {{s3_bucket}}
    access_key_id: {{s3_accesskey}}
    secret_access_key: {{s3_secretkey}}
    region_name: {{s3_region}}
    regexp: sts4/vscode-extensions/releases/vscode-manifest-yaml-(.*).vsix    
- name: slack-notification
  type: slack-notification
  source:
    url: https://hooks.slack.com/services/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
######################################################
jobs:
- name: build-vscode-manifest-yaml-release
  plan:
  - get: sts4
    trigger: true
  - task: build-vsix
    file: sts4/concourse/tasks/build-vsix.yml
    params:
      extension_id: vscode-manifest-yaml
      dist_type: release
    on_failure:
      put: slack-notification
      params:
        channel: "@kdvolder"
        text: | 
           Concourse ${BUILD_PIPELINE_NAME}/${BUILD_JOB_NAME}/${BUILD_NAME} has failed!
  - put: s3-vscode-manifest-yaml-vsix
    params:
      file: out/*.vsix
      acl: public-read
    on_success:
      put: slack-notification
      params:
        text_file: s3-vscode-manifest-yaml-vsix/url
        icon_url: https://raw.githubusercontent.com/spring-projects/sts4/master/vscode-extensions/vscode-manifest-yaml/icon.png
        text: |
          Concourse ${BUILD_PIPELINE_NAME}/${BUILD_JOB_NAME}/${BUILD_NAME} has succeed!
          Release candidate available for testing $TEXT_FILE_CONTENT
- name: publish-vscode-manifest-yaml-release
  plan:
  - do:
    - get: sts4
      passed:
      - build-vscode-manifest-yaml-release
    - get: s3-vscode-manifest-yaml-vsix
      passed:
      - build-vscode-manifest-yaml-release
    - task: publish-vscode-manifest-yaml-release
      file: sts4/concourse/tasks/vsce-publish.yml
      input_mapping:
        vsix-resource: s3-vscode-manifest-yaml-vsix
      params:
        vsce_publisher: {{vsce_publisher}}
        vsce_token: {{vsce_token}}
        extension_id: vscode-manifest-yaml
    - put: sts4-out
      params:
        repository: sts4-out
        only_tag: true
    on_success:
      put: slack-notification
      params:
        text_file: s3-vscode-manifest-yaml-vsix/version
        icon_url: https://raw.githubusercontent.com/spring-projects/sts4/master/vscode-extensions/vscode-manifest-yaml/icon.png
        text: |
          Concourse ${BUILD_PIPELINE_NAME}/${BUILD_JOB_NAME}/${BUILD_NAME} has succeed!
          Vscode-manifest-yaml release $TEXT_FILE_CONTENT is now available on vscode-marketplace!
    on_failure:
      put: slack-notification
      params:
        channel: "@kdvolder"
        text: | 
           Concourse ${BUILD_PIPELINE_NAME}/${BUILD_JOB_NAME}/${BUILD_NAME} has failed!
- name: bump-vscode-manifest-yaml-version
  serial: true
  plan:
  - do:
    - get: sts4-out
      trigger: true
      passed:
      - publish-vscode-manifest-yaml-release
    - task: bump-vscode-manifest-yaml-version
      file: sts4/concourse/tasks/bump-version.yml
      params:
        extension_id: vscode-manifest-yaml
    - put: sts4-out
      timeout: 5m
      params:
        repository: sts4-out
        rebase: true
    on_failure:
      put: slack-notification
      params:
        channel: "@kdvolder"
        text: | 
           Concourse ${BUILD_PIPELINE_NAME}/${BUILD_JOB_NAME}/${BUILD_NAME} has failed!

{'fraction_non_alphanumeric': 0.13981430912069906, 'fraction_numerical': 0.010103768432550519, 'mean_word_length': 2.7126203750633553, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '337203', 'n_tokens_mistral': 2580, 'n_tokens_neox': 2487, 'n_words': 418}