6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit 7d3bac46
Changed files
azure-pipelines.yml | 185 -------------------------------------- azure/azure-pipelines.yml | 24 +++++ azure/templates/build-android.yml | 94 +++++++++++++++++++ azure/templates/build-ios.yml | 82 +++++++++++++++++ azure/templates/build-web.yml | 41 +++++++++ 5 files changed, 241 insertions(+), 185 deletions(-)
Diff
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
deleted file mode 100644
index 395cf335..00000000
--- a/azure-pipelines.yml
+++ /dev/null
@@ -1,185 +0,0 @@
-# Starter pipeline
-trigger:
-- master
-
-
-
-stages:
-- stage: BuildwebStage
- pool:
- vmImage: ubuntu-latest
- jobs:
- - job: BuildWebStage
- steps:
- - task: FlutterInstall@0
- inputs:
- mode: 'auto'
- channel: 'stable'
- version: 'latest'
-
- - task: FlutterBuild@0
- inputs:
- target: 'web'
- projectDirectory: '.'
- - task: CopyFiles@2
- inputs:
- SourceFolder: 'build/web'
- Contents: '**'
- TargetFolder: '$(build.artifactStagingDirectory)'
- - task: PublishBuildArtifacts@1
- displayName: "Publish Web"
- inputs:
- 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
- condition: succeded()
- jobs:
- - deployment: Deploy
\ No newline at end of file
diff --git a/azure/azure-pipelines.yml b/azure/azure-pipelines.yml
new file mode 100644
index 00000000..1d2f23f7
--- /dev/null
+++ b/azure/azure-pipelines.yml
@@ -0,0 +1,24 @@
+# Starter pipeline
+trigger:
+- master
+
+
+
+stages:
+- template: /azure/templates/build-web.yml
+ parameters:
+ name: environment
+- template: /azure/templates/build-android.yml
+ parameters:
+ name: environment
+- template: /azure/templates/build-ios.yml
+ parameters:
+ name: environment
+
+
+- stage: 'Dev'
+ displayName: 'Deploy to the dev environment'
+ dependsOn: Build
+ condition: succeded()
+ jobs:
+ - deployment: Deploy
\ No newline at end of file
diff --git a/azure/templates/build-android.yml b/azure/templates/build-android.yml
new file mode 100644
index 00000000..8921c66a
--- /dev/null
+++ b/azure/templates/build-android.yml
@@ -0,0 +1,94 @@
+parameters:
+ name: environment
+
+
+
+- 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"
+
+ # Download secure file from azure library
+ - task: DownloadSecureFile@1
+ inputs:
+ secureFile: '.env.${{ parameters.environment }}'
+
+ # Copy the .env file
+ - task: CopyFiles@2
+ inputs:
+ sourceFolder: '$(Agent.TempDirectory)'
+ contents: '**/*.env.development'
+ targetFolder: '$(YOUR_DEFINED_PROJECT_ROOT_FOLDER_VARIABLE)'
+ cleanTargetFolder: false
+
+ - 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'
\ No newline at end of file
diff --git a/azure/templates/build-ios.yml b/azure/templates/build-ios.yml
new file mode 100644
index 00000000..2db09a88
--- /dev/null
+++ b/azure/templates/build-ios.yml
@@ -0,0 +1,82 @@
+parameters:
+ name: environment
+
+- stage: iOSStage
+ pool:
+ vmImage: 'macos-latest'
+ dependsOn: []
+ displayName: iOS
+ jobs:
+
+ - job: iOSJob
+ displayName: iOS
+ steps:
+ # Download secure file from azure library
+ - task: DownloadSecureFile@1
+ inputs:
+ secureFile: '.env.${{ parameters.environment }}'
+
+ # Copy the .env file
+ - task: CopyFiles@2
+ inputs:
+ sourceFolder: '$(Agent.TempDirectory)'
+ contents: '**/*.env.development'
+ targetFolder: '$(YOUR_DEFINED_PROJECT_ROOT_FOLDER_VARIABLE)'
+ cleanTargetFolder: false
+
+ # 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'
\ No newline at end of file
diff --git a/azure/templates/build-web.yml b/azure/templates/build-web.yml
new file mode 100644
index 00000000..8cb2bb1c
--- /dev/null
+++ b/azure/templates/build-web.yml
@@ -0,0 +1,41 @@
+- stage: BuildwebStage
+ pool:
+ vmImage: ubuntu-latest
+ jobs:
+ - job: BuildWebStage
+ steps:
+
+ # Download secure file from azure library
+ - task: DownloadSecureFile@1
+ inputs:
+ secureFile: '.env.${{ parameters.environment }}'
+
+ # Copy the .env file
+ - task: CopyFiles@2
+ inputs:
+ sourceFolder: '$(Agent.TempDirectory)'
+ contents: '**/*.env.development'
+ targetFolder: '$(YOUR_DEFINED_PROJECT_ROOT_FOLDER_VARIABLE)'
+ cleanTargetFolder: false
+
+ - task: FlutterInstall@0
+ inputs:
+ mode: 'auto'
+ channel: 'stable'
+ version: 'latest'
+
+ - task: FlutterBuild@0
+ inputs:
+ target: 'web'
+ projectDirectory: '.'
+ - task: CopyFiles@2
+ inputs:
+ SourceFolder: 'build/web'
+ Contents: '**'
+ TargetFolder: '$(build.artifactStagingDirectory)'
+ - task: PublishBuildArtifacts@1
+ displayName: "Publish Web"
+ inputs:
+ PathtoPublish: '$(Build.ArtifactStagingDirectory)'
+ ArtifactName: 'drop'
+ publishLocation: 'Container'
\ No newline at end of file