6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit c44b7fe0
Changed files
azure-pipelines.yml | 149 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 147 insertions(+), 2 deletions(-)
Diff
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index d80cfbb0..395cf335 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -5,11 +5,11 @@ trigger:
stages:
-- stage: webStage
+- stage: BuildwebStage
pool:
vmImage: ubuntu-latest
jobs:
- - job: WebJob
+ - job: BuildWebStage
steps:
- task: FlutterInstall@0
inputs:
@@ -32,6 +32,151 @@ stages:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
+- stage: AndroidStage
+ pool:
+ vmImage: 'ubuntu-latest'
+ dependsOn: []
+ displayName: Android
+ jobs:
+
+ - job: AndroidJob
+ displayName: Android
+ steps:
+
+ # replace "key.properties" with your secure file name
+ - task: DownloadSecureFile@1
+ name: keyprop
+ displayName: Download key properties file
+ inputs:
+ secureFile: 'key.properties'
+
+ # replace "key.jks" with your secure file name
+ - task: DownloadSecureFile@1
+ name: key
+ displayName: Download signing key
+ inputs:
+ secureFile: 'key.jks'
+
+ # adjust paths and file names here
+ - task: Bash@3
+ displayName: Copy config files
+ inputs:
+ targetType: 'inline'
+ script: |
+ cp $(keyprop.secureFilePath) $(Build.SourcesDirectory)/android/key.properties
+ cp $(key.secureFilePath) $(Build.SourcesDirectory)/android/app/key.jks
+
+ echo "key.properties copied to $(Build.SourcesDirectory)/android/key.properties"
+ echo "key.jks copied to $(Build.SourcesDirectory)/android/app/key.jks"
+
+ - task: FlutterInstall@0
+ displayName: "Install Flutter SDK"
+ inputs:
+ mode: 'auto'
+ channel: 'stable'
+ version: 'latest'
+
+ - task: FlutterCommand@0
+ displayName: "Run Flutter diagnostics"
+ inputs:
+ projectDirectory: '.'
+ arguments: 'doctor -v'
+
+ - task: FlutterBuild@0
+ displayName: "Build application"
+ inputs:
+ target: 'aab'
+ projectDirectory: '$(Build.SourcesDirectory)'
+
+ - task: FlutterTest@0
+ displayName: "Run unit tests"
+ inputs:
+ generateCodeCoverageReport: true
+ projectDirectory: '$(Build.SourcesDirectory)'
+
+ - task: CopyFiles@2
+ displayName: "Copy app to staging directory"
+ inputs:
+ sourceFolder: '$(Agent.BuildDirectory)'
+ contents: '**/bundle/**'
+ targetFolder: '$(Build.StagingDirectory)'
+ flattenFolders: true
+
+ - task: PublishBuildArtifacts@1
+ displayName: "Publish AAB file"
+ inputs:
+ PathtoPublish: '$(Build.ArtifactStagingDirectory)'
+ ArtifactName: 'AAB'
+ publishLocation: 'Container'
+
+- stage: iOSStage
+ pool:
+ vmImage: 'macos-latest'
+ dependsOn: []
+ displayName: iOS
+ jobs:
+
+ - job: iOSJob
+ displayName: iOS
+ steps:
+
+ # replace "iosKey" and "yourPwd" with your secure file name and password
+ - task: InstallAppleCertificate@2
+ displayName: Install certificate
+ inputs:
+ certSecureFile: 'iosKey'
+ certPwd: 'yourPwd'
+ keychain: 'temp'
+
+ # replace "ios_Profile.mobileprovision" with your secure file name
+ - task: InstallAppleProvisioningProfile@1
+ displayName: Install provisioning file
+ inputs:
+ provisioningProfileLocation: 'secureFiles'
+ provProfileSecureFile: 'ios_Profile.mobileprovision'
+
+ - task: FlutterInstall@0
+ displayName: "Install Flutter SDK"
+ inputs:
+ mode: 'auto'
+ channel: 'stable'
+ version: 'latest'
+
+ - task: FlutterCommand@0
+ displayName: "Run Flutter diagnostics"
+ inputs:
+ projectDirectory: '.'
+ arguments: 'doctor -v'
+
+ # adjust path to the *.plist file
+ - task: FlutterBuild@0
+ displayName: "Build application"
+ inputs:
+ target: ipa
+ projectDirectory: '$(Build.SourcesDirectory)'
+ exportOptionsPlist: 'ios/exportOptions.plist'
+
+ - task: FlutterTest@0
+ displayName: "Run unit tests"
+ inputs:
+ generateCodeCoverageReport: true
+ projectDirectory: '$(Build.SourcesDirectory)'
+
+ - task: CopyFiles@2
+ displayName: "Copy app to staging directory"
+ inputs:
+ sourceFolder: '$(Agent.BuildDirectory)'
+ contents: '**/ipa/*.ipa'
+ targetFolder: '$(Build.StagingDirectory)'
+ flattenFolders: true
+
+ - task: PublishBuildArtifacts@1
+ displayName: "Publish IPA file"
+ inputs:
+ PathtoPublish: '$(Build.ArtifactStagingDirectory)'
+ ArtifactName: 'IPA'
+ publishLocation: 'Container'
+
- stage: 'Dev'
displayName: 'Deploy to the dev environment'
dependsOn: Build