SSLcom / esigner-codesign

GitHub Action for CodeSigner by SSL.com
9 stars 2 forks source link

Signing fails with Error: ENOENT: no such file or directory, copyfile 'D:\a\repo-name\repo-name/scripts/CodeSignTool.bat' -> 'D:\a\repo-name\repo-name\codesign\CodeSignTool-v1.2.7-windows\CodeSignTool.bat' #13

Closed carusooo closed 9 months ago

carusooo commented 9 months ago

After this commit our builds now fail with the error message Error: ENOENT: no such file or directory, copyfile 'D:\a\repo-name\repo-name/scripts/CodeSignTool.bat' -> 'D:\a\repo-name\repo-name\codesign\CodeSignTool-v1.2.7-windows\CodeSignTool.bat'

Full step logs

Run sslcom/esigner-codesign@develop
  with:
    command: sign
    username: ***
    password: ***
    credential_id: ***
    totp_secret: ***
    file_path: agent_code/dist/Output/ganymede-0.0.3.exe
    override: true
    clean_logs: false
    environment_name: PROD
    jvm_max_memory: 10[2](https://github.com/Ganymede-Bio/repo-name/actions/runs/6565340566/job/17835181903#step:15:2)4M

Input Commands: sign -username=*** -*** -credential_id=*** -totp_secret=*** -input_file_path=agent_code\dist\Output\ganymede-agent-0.0.3.exe -override=true
Downloading CodeSignTool from https://github.com/SSLcom/CodeSignTool/releases/download/v1.2.7/CodeSignTool-v1.2.7-windows.zip
Creating CodeSignTool extract path D:\a\repo-name\repo-name\codesign
"C:\Program Files\PowerShell\7\pwsh.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "$ErrorActionPreference = 'Stop' ; try *** Add-Type -AssemblyName System.IO.Compression.ZipFile *** catch *** *** ; try *** [System.IO.Compression.ZipFile]::ExtractToDirectory('D:\a\_temp\dbeb7f8f-f823-426[9](https://github.com/Ganymede-Bio/repo-name/actions/runs/6565340566/job/17835181903#step:15:9)-b854-2ab76870671a', 'D:\a\repo-name\repo-name\codesign', $true) *** catch *** if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') )*** Expand-Archive -LiteralPath 'D:\a\_temp\dbeb7f8f-f8[23](https://github.com/Ganymede-Bio/repo-name/actions/runs/6565340566/job/17835181903#step:15:23)-4[26](https://github.com/Ganymede-Bio/repo-name/actions/runs/6565340566/job/17835181903#step:15:26)9-b854-2ab76870671a' -DestinationPath 'D:\a\repo-name\repo-name\codesign' -Force *** else *** throw $_ *** *** ;"
Extract CodeSignTool from download path D:\a\_temp\dbeb7f8f-f823-4269-b854-2ab76870671a to D:\a\repo-name\repo-name\codesign
Archive name: CodeSignTool-v1.2.7-windows, D:\a\repo-name\repo-name\codesign\CodeSignTool-v1.2.7-windows
Write CodeSignTool config file CLIENT_ID=kaXTRACNijSWsFdRKg_KAfD3fqrBlzMbWs6TwWHwAn8
OAUTH2_ENDPOINT=https://login.ssl.com/oauth2/token
CSC_API_ENDPOINT=https://cs.ssl.com/
TSA_URL=http://ts.ssl.com/ to D:\a\repo-name\repo-name\codesign\CodeSignTool-v1.2.7-windows\conf\code_sign_tool.properties
Set CODE_SIGN_TOOL_PATH env variable: D:\a\repo-name\repo-name\codesign\CodeSignTool-v1.2.7-windows
Error: ENOENT: no such file or directory, copyfile 'D:\a\repo-name\repo-name/scripts/CodeSignTool.bat' -> 'D:\a\repo-name\repo-name\codesign\CodeSignTool-v1.2.7-windows\CodeSignTool.bat'

specifying the previous commit restored functionality

      - name: EV-code signing
        uses: sslcom/esigner-codesign@b1937411c678dab3994f5f138bc3426694b7b88f
        with:
          command: sign
          username: ${{ secrets.ES_USERNAME }}
          password: ${{ secrets.ES_PASSWORD }}
          credential_id: ${{ secrets.ES_CREDENTIAL_ID }}
          totp_secret: ${{ secrets.ES_TOTP_SECRET }}
          file_path: ${{ env.AGENT_REPO_LOC }}/dist/Output/ganymede-agent-0.0.3.exe
          override: true

Let me know if you need additional information and thank you for the excellent tooling :)

bayrakmustafa commented 9 months ago

@carusooo Thank you for reporting the problem. We have made an update regarding the issue. Can you test again? The problem should be solved.

rantoniuk commented 9 months ago

Just tested and works for me. The current working release should be tagged with a specific version instead of @develop, so that we can pin our workflows to the known working version and be sure that it doesn't stop working because of new commits to develop. I see the last release was @1.2.7, but since then there were some new features added that we'd like to have.

bayrakmustafa commented 9 months ago

@rantoniuk, I merged the develop branch into main and released version 1.2.8. You can use version @1.28. Thanks.