Skip to content

Commit

Permalink
fix(ci): fix devolutions-agent packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
pacmancoder committed Jun 5, 2024
1 parent 38d27b4 commit 3e6a245
Showing 1 changed file with 39 additions and 8 deletions.
47 changes: 39 additions & 8 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ jobs:
if: matrix.os == 'windows' && (matrix.project == 'devolutions-gateway' || matrix.project == 'devolutions-agent')
uses: microsoft/setup-msbuild@v2

- name: Regenerate MSI
if: (matrix.project == 'devolutions-gateway' || matrix.project == 'devolutions-agent') && matrix.os == 'windows'
- name: Regenerate Gateway MSI
if: matrix.project == 'devolutions-gateway' && matrix.os == 'windows'
shell: pwsh
run: |
$PackageRoot = Join-Path ${{ runner.temp }} ${{ matrix.project}}
Expand All @@ -257,10 +257,19 @@ jobs:
Remove-Item $_.FullName -Force
}
./ci/tlk.ps1 package -PackageOption generate
./ci/tlk.ps1 package -Product gateway -PackageOption generate
- name: Sign msi runtime
if: (matrix.project == 'devolutions-gateway' || matrix.project == 'devolutions-agent') && matrix.os == 'windows'
- name: Regenerate Agent MSI
if: matrix.project == 'devolutions-agent' && matrix.os == 'windows'
shell: pwsh
run: |
$PackageRoot = Join-Path ${{ runner.temp }} ${{ matrix.project}}
$Env:DAGENT_EXECUTABLE = Get-ChildItem -Path $PackageRoot -Recurse -Include '*DevolutionsAgent*.exe' | Select -First 1
./ci/tlk.ps1 package -Product agent -PackageOption generate
- name: Sign Gateway MSI runtime
if: matrix.project == 'devolutions-gateway' && matrix.os == 'windows'
shell: pwsh
working-directory: package/WindowsManaged/Release
run: |
Expand All @@ -276,7 +285,24 @@ jobs:
AzureSignTool @Params $_.FullName
}
- name: Repackage gateway
- name: Sign Agent MSI runtime
if: matrix.project == 'devolutions-agent' && matrix.os == 'windows'
shell: pwsh
working-directory: package/AgentWindowsManaged/Release
run: |
Get-ChildItem -Path .\* -Include "*.exe" | % {
$Params = @('sign',
'-kvt', '${{ secrets.AZURE_TENANT_ID }}',
'-kvu', '${{ secrets.CODE_SIGNING_KEYVAULT_URL }}',
'-kvi', '${{ secrets.CODE_SIGNING_CLIENT_ID }}',
'-kvs', '${{ secrets.CODE_SIGNING_CLIENT_SECRET }}',
'-kvc', '${{ secrets.CODE_SIGNING_CERTIFICATE_NAME }}',
'-tr', '${{ vars.CODE_SIGNING_TIMESTAMP_SERVER }}',
'-v')
AzureSignTool @Params $_.FullName
}
- name: Repackage Gateway
if: matrix.project == 'devolutions-gateway' && matrix.os == 'windows'
shell: pwsh
run: |
Expand All @@ -285,7 +311,7 @@ jobs:
./ci/tlk.ps1 package -Product gateway -PackageOption assemble
- name: Repackage agent
- name: Repackage Agent
if: matrix.project == 'devolutions-agent' && matrix.os == 'windows'
shell: pwsh
run: |
Expand All @@ -298,6 +324,11 @@ jobs:
if: (matrix.project == 'devolutions-gateway' || matrix.project == 'devolutions-agent') && matrix.os == 'windows'
shell: pwsh
run: |
$ContentDescription = switch ('${{ matrix.project }}') {
'devolutions-gateway' { 'Devolutions Gateway' }
'devolutions-agent' { 'Devolutions Agent' }
}
Get-ChildItem -Path ${{ runner.temp }} -Recurse -Include '*.msi' | % {
$Params = @('sign',
'-kvt', '${{ secrets.AZURE_TENANT_ID }}',
Expand All @@ -306,7 +337,7 @@ jobs:
'-kvs', '${{ secrets.CODE_SIGNING_CLIENT_SECRET }}',
'-kvc', '${{ secrets.CODE_SIGNING_CERTIFICATE_NAME }}',
'-tr', '${{ vars.CODE_SIGNING_TIMESTAMP_SERVER }}',
'-d', 'Devolutions Gateway',
'-d', $ContentDescription,
'-v')
AzureSignTool @Params $_.FullName
}
Expand Down

0 comments on commit 3e6a245

Please sign in to comment.