<commit_before>parameters:
- name: layoutRoot
  type: string
- name: isWindows
  type: boolean
  default: true

steps:
- ${{ if parameters.isWindows }}:
  - task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
    inputs:
      ConnectedServiceName: VSTSAgentESRP
      FolderPath: '${{ parameters.layoutRoot }}/bin'
      Pattern: AgentService.exe
      signConfigType: inlineSignParams
      inlineOperation: |
        [{
        "keyCode": "CP-235845-SN",
        "operationSetCode": "StrongNameSign",
        "parameters": [],
        "toolName": "sign",
        "toolVersion": "1.0"
        },
        {
        "keyCode": "CP-235845-SN",
        "operationSetCode": "StrongNameVerify",
        "parameters": [],
        "toolName": "sign",
        "toolVersion": "1.0"
        }
        ]
    displayName: Sign Agent Assemblies (Strong Name Signing)

- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
  inputs:
    ConnectedServiceName: VSTSAgentESRP
    FolderPath: '${{ parameters.layoutRoot }}/bin'
    Pattern: |
      Agent.*.dll
      Agent.*.exe
      Microsoft.VisualStudio.Services.Agent.dll
      AgentService.exe
    UseMinimatch: true
    signConfigType: inlineSignParams
    inlineOperation: |
      [{
      "keyCode": "CP-230012",
      "operationSetCode": "SigntoolSign",
      "parameters": [{
      "parameterName": "OpusName",
      "parameterValue": "Microsoft"
      },
      {
      "parameterName": "OpusInfo",
      "parameterValue": "http://www.microsoft.com"
      },
      {
      "parameterName": "FileDigest",
      "parameterValue": "/fd \"SHA256\""
      },
      {
      "parameterName": "PageHash",
      "parameterValue": "/NPH"
      },
      {
      "parameterName": "TimeStamp",<commit_msg>Adjusted code sign step - to sign new assemblies (#3410)<commit_after>parameters:
- name: layoutRoot
  type: string
- name: isWindows
  type: boolean
  default: true

steps:
- ${{ if parameters.isWindows }}:
  - task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
    inputs:
      ConnectedServiceName: VSTSAgentESRP
      FolderPath: '${{ parameters.layoutRoot }}/bin'
      Pattern: AgentService.exe
      signConfigType: inlineSignParams
      inlineOperation: |
        [{
        "keyCode": "CP-235845-SN",
        "operationSetCode": "StrongNameSign",
        "parameters": [],
        "toolName": "sign",
        "toolVersion": "1.0"
        },
        {
        "keyCode": "CP-235845-SN",
        "operationSetCode": "StrongNameVerify",
        "parameters": [],
        "toolName": "sign",
        "toolVersion": "1.0"
        }
        ]
    displayName: Sign Agent Assemblies (Strong Name Signing)

- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
  inputs:
    ConnectedServiceName: VSTSAgentESRP
    FolderPath: '${{ parameters.layoutRoot }}/bin'
    Pattern: |
      Agent.*.dll
      Agent.*.exe
      Microsoft.VisualStudio.Services.Agent.dll
      AgentService.exe
      **\AgentService.resources.dll
    UseMinimatch: true
    signConfigType: inlineSignParams
    inlineOperation: |
      [{
      "keyCode": "CP-230012",
      "operationSetCode": "SigntoolSign",
      "parameters": [{
      "parameterName": "OpusName",
      "parameterValue": "Microsoft"
      },
      {
      "parameterName": "OpusInfo",
      "parameterValue": "http://www.microsoft.com"
      },
      {
      "parameterName": "FileDigest",
      "parameterValue": "/fd \"SHA256\""
      },
      {
      "parameterName": "PageHash",
      "parameterValue": "/NPH"
      },
      {
      "parameterName": "TimeStamp",
{'fraction_non_alphanumeric': 0.14373430086519676, 'fraction_numerical': 0.017303935249790677, 'mean_word_length': 2.4100856327307327, 'pattern_counts': {'":': 44, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4525362', 'n_tokens_mistral': 1180, 'n_tokens_neox': 1113, 'n_words': 196}