Skip to content

Commit

Permalink
Use artifact staging dir and remove unused env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Haard30 committed Jun 21, 2024
1 parent 981edd1 commit e6118af
Showing 1 changed file with 16 additions and 19 deletions.
35 changes: 16 additions & 19 deletions .github/workflows/release-azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,25 +145,23 @@ extends:
inputs:
- input: pipelineArtifact
artifactName: azureauth-${{ parameters.version }}-${{ config.runtime }}
targetPath: $(Pipeline.Workspace)/azureauth-${{ parameters.version }}-${{ config.runtime }}
targetPath: $(Build.ArtifactStagingDirectory)/azureauth-${{ parameters.version }}-${{ config.runtime }}
outputs:
- output: pipelineArtifact
artifactName: azureauth-${{ parameters.version }}-${{ config.runtime }}-signed
targetPath: $(Pipeline.Workspace)/azureauth-${{ parameters.version }}-${{ config.runtime }}-signed
targetPath: $(Build.ArtifactStagingDirectory)/azureauth-${{ parameters.version }}-${{ config.runtime }}-signed
steps:
- task: EsrpCodeSigning@5
displayName: Sign artifacts win10-x64
condition: eq('${{ config.runtime }}', 'win10-x64')
env:
SIGNING_KEY_CODE_AUTHENTICODE: $(SIGNING_KEY_CODE_AUTHENTICODE)
inputs:
ConnectedServiceName: $(esrpKVServiceConnection)
AppRegistrationClientId: $(SIGNING_AAD_ID)
AppRegistrationTenantId: $(SIGNING_TENANT_ID)
AuthAKVName: $(AZURE_VAULT)
AuthCertName: $(AZURE_VAULT_ESRP_AAD_CERT_NAME)
AuthSignCertName: $(AZURE_VAULT_ESRP_REQ_CERT_NAME)
FolderPath: $(Pipeline.Workspace)/azureauth-${{ parameters.version }}-${{ config.runtime }}/AzureAuth
FolderPath: $(Build.ArtifactStagingDirectory)/azureauth-${{ parameters.version }}-${{ config.runtime }}/AzureAuth
Pattern: '*.dll,*.exe'
signConfigType: 'inlineSignParams'
inlineOperation: |
Expand Down Expand Up @@ -197,23 +195,21 @@ extends:
displayName: Codesigning - zip artifacts to send to ESRP
condition: startsWith('${{ config.runtime }}', 'osx')
inputs:
rootFolderOrFile: $(Pipeline.Workspace)/azureauth-${{ parameters.version }}-${{ config.runtime }}
rootFolderOrFile: $(Build.ArtifactStagingDirectory)/azureauth-${{ parameters.version }}-${{ config.runtime }}
includeRootFolder: false
archiveType: zip
archiveFile: azureauth-${{ parameters.version }}-${{ config.runtime }}.zip
- task: EsrpCodeSigning@5
displayName: Sign artifacts osx
condition: startsWith('${{ config.runtime }}', 'osx')
env:
SIGNING_KEY_CODE_MAC: $(SIGNING_KEY_CODE_MAC)
inputs:
ConnectedServiceName: $(esrpKVServiceConnection)
AppRegistrationClientId: $(SIGNING_AAD_ID)
AppRegistrationTenantId: $(SIGNING_TENANT_ID)
AuthAKVName: $(AZURE_VAULT)
AuthCertName: $(AZURE_VAULT_ESRP_AAD_CERT_NAME)
AuthSignCertName: $(AZURE_VAULT_ESRP_REQ_CERT_NAME)
FolderPath: $(Pipeline.Workspace)
FolderPath: $(Build.ArtifactStagingDirectory)
Pattern: 'azureauth-${{ parameters.version }}-${{ config.runtime }}.zip'
signConfigType: 'inlineSignParams'
inlineOperation: |
Expand Down Expand Up @@ -242,13 +238,14 @@ extends:
condition: startsWith('${{ config.runtime }}', 'osx')
inputs:
archiveFilePatterns: $(Build.SourcesDirectory)/azureauth-${{ parameters.version }}-${{ config.runtime }}.zip
destinationFolder: $(Pipeline.Workspace)/azureauth-${{ parameters.version }}-${{ config.runtime }}
destinationFolder: $(Build.ArtifactStagingDirectory)/azureauth-${{ parameters.version }}-${{ config.runtime }}
cleanDestinationFolder: true
overwriteExistingFiles: true
# We rename the signed artifacts to avoid conflicts with the unsigned pipeline artifacts from the previous stage.
- task: PowerShell@2
displayName: 'Rename & List files'
inputs:
workingDirectory: $(Pipeline.Workspace)
workingDirectory: $(Build.ArtifactStagingDirectory)
targetType: 'inline'
script: |
mv "azureauth-${{ parameters.version }}-${{ config.runtime }}" "azureauth-${{ parameters.version }}-${{ config.runtime }}-signed"
Expand All @@ -270,7 +267,7 @@ extends:
- ${{ each config in parameters.buildConfigs }}:
- input: pipelineArtifact
artifactName: azureauth-${{ parameters.version }}-${{ config.runtime }}-signed
targetPath: $(Pipeline.Workspace)/azureauth-${{ parameters.version }}-${{ config.runtime }}-signed
targetPath: $(Build.ArtifactStagingDirectory)/azureauth-${{ parameters.version }}-${{ config.runtime }}-signed
outputs:
- ${{ each config in parameters.buildConfigs }}:
- output: pipelineArtifact
Expand All @@ -280,38 +277,38 @@ extends:
- task: ArchiveFiles@2
displayName: Create win10-x64 archive
inputs:
rootFolderOrFile: $(Pipeline.Workspace)/azureauth-${{ parameters.version }}-win10-x64-signed/AzureAuth
rootFolderOrFile: $(Build.ArtifactStagingDirectory)/azureauth-${{ parameters.version }}-win10-x64-signed/AzureAuth
includeRootFolder: false
archiveType: zip
archiveFile: azureauth-${{ parameters.version }}-win10-x64.zip
- task: Bash@3
displayName: Prepare osx-x64 executables
inputs:
targetType: inline
workingDirectory: $(Pipeline.Workspace)
workingDirectory: $(Build.ArtifactStagingDirectory)
script: |
cd azureauth-${{ parameters.version }}-osx-x64-signed/AzureAuth
chmod +x azureauth createdump *.dylib
- task: ArchiveFiles@2
displayName: Create osx-x64 archive
inputs:
rootFolderOrFile: $(Pipeline.Workspace)/azureauth-${{ parameters.version }}-osx-x64-signed/AzureAuth
rootFolderOrFile: $(Build.ArtifactStagingDirectory)/azureauth-${{ parameters.version }}-osx-x64-signed/AzureAuth
includeRootFolder: false
archiveType: tar
tarCompression: gz
archiveFile: azureauth-${{ parameters.version }}-osx-x64.tar.gz
- task: Bash@3
displayName: Prepare osx-arm64 executables
inputs:
workingDirectory: $(Pipeline.Workspace)
workingDirectory: $(Build.ArtifactStagingDirectory)
targetType: inline
script: |
cd azureauth-${{ parameters.version }}-osx-arm64-signed/AzureAuth
chmod +x azureauth createdump *.dylib
- task: ArchiveFiles@2
displayName: Create osx-arm64 archive
inputs:
rootFolderOrFile: $(Pipeline.Workspace)/azureauth-${{ parameters.version }}-osx-arm64-signed/AzureAuth
rootFolderOrFile: $(Build.ArtifactStagingDirectory)/azureauth-${{ parameters.version }}-osx-arm64-signed/AzureAuth
includeRootFolder: false
archiveType: tar
tarCompression: gz
Expand All @@ -332,12 +329,12 @@ extends:
- ${{ each config in parameters.buildConfigs }}:
- input: pipelineArtifact
artifactName: azureauth-${{ parameters.version }}-${{ config.runtime }}.${{ config.archiveExt }}
targetPath: $(Pipeline.Workspace)/azureauth-${{ parameters.version }}-${{ config.runtime }}.${{ config.archiveExt }}
targetPath: $(Build.ArtifactStagingDirectory)/azureauth-${{ parameters.version }}-${{ config.runtime }}.${{ config.archiveExt }}
steps:
- task: PowerShell@2
displayName: 'List files'
inputs:
workingDirectory: $(Pipeline.Workspace)
workingDirectory: $(Build.ArtifactStagingDirectory)
targetType: 'inline'
script: |
Get-ChildItem -Path . -Recurse | Select-Object FullName
Expand Down

0 comments on commit e6118af

Please sign in to comment.