Reputation: 182
I am creating a Pipeline to automatically build and release a flutter app. On my machine the flutter build appbundle --release
works just fine and also signs the app correctly. I reference a key and a properties file, which I both don't want to upload into the repo, but instead use the Library > Secure Files
.
How can I either download these files onto my Agent to a specific position, or use the downloaded file path in my build.gradle
?
Upvotes: 8
Views: 15509
Reputation: 1
MS Documentation: https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/download-secure-file-v1?view=azure-pipelines&viewFallbackFrom=azure-devops
- task: DownloadSecureFile@1
name: gradlePropertyOverrides
inputs:
secureFile: 'filename.filenameExtension'
- task: Gradle@2
inputs:
gradleWrapperFile: 'gradlew'
options: -PpropertyOverridePath=$(gradlePropertyOverrides.secureFilePath)
Upvotes: -1
Reputation: 610
You can utilize "Download Secure File task" to download from the library on to your agent.
https://learn.microsoft.com/en-us/azure/devops/pipelines/library/secure-files?view=azure-devops
- task: DownloadSecureFile@1
inputs:
secureFile: 'secureFile'
- task: CopyFiles@2
inputs:
SourceFolder: '$(Agent.TempDirectory)'
Contents: secureFile
TargetFolder: '$(Build.ArtifactStagingDirectory)'
Upvotes: 16