diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 019b5bb0..4e375f16 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -11,11 +11,11 @@ # - feature/* pr: - branches: - include: - - main - - release/* - - feature/* + branches: + include: + - main + - release/* + - feature/* trigger: branches: @@ -23,102 +23,118 @@ trigger: - main variables: - #-if false - - name: IsReleaseBranch - value: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')] - #-endif - - template: build/variables.yml +#-if false +- name: IsReleaseBranch + value: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')] +#-endif +- template: build/variables.yml stages: - #-if false - # This special if is used to remove those Dotnet_New stages for generated application. - - stage: Dotnet_New_GeneratedApp - jobs: - - template: .template.config/build/stage-donetnew.yaml +#-if false +# This special if is used to remove those Dotnet_New stages for generated application. +- stage: Dotnet_New_GeneratedApp + jobs: + - template: .template.config/build/stage-donetnew.yaml + +- stage: Build_Staging_GeneratedApp + dependsOn: Dotnet_New_GeneratedApp + jobs: + - template: build/stage-build.yml + parameters: + pathToSrc: '$(Pipeline.Workspace)/GeneratedApp/src' + solutionName: 'GeneratedApp' + pathToInfoPlist: '$(Pipeline.Workspace)/GeneratedApp/src/app/GeneratedApp.Mobile/iOS/Info.plist' + pathToAndroidManifest: '$(Pipeline.Workspace)/GeneratedApp/src/app/GeneratedApp.Mobile/Android/AndroidManifest.xml' + applicationEnvironment: Generated_Staging + androidKeyStoreFile: $(InternalKeystore) + androidVariableGroup: 'ApplicationTemplate.Distribution.Internal.Android' + iosProvisioningProfileFile: $(InternalProvisioningProfile) + iosCertificateFile: $(InternalCertificate) + iosVariableGroup: 'ApplicationTemplate.Distribution.Internal.iOS' - - stage: Build_Staging_GeneratedApp - dependsOn: Dotnet_New_GeneratedApp - jobs: - - template: build/stage-build.yml - parameters: - pathToSrc: "$(Pipeline.Workspace)/GeneratedApp/src" - solutionName: "GeneratedApp" - pathToInfoPlist: "$(Pipeline.Workspace)/GeneratedApp/src/app/GeneratedApp.Mobile/iOS/Info.plist" - pathToAndroidManifest: "$(Pipeline.Workspace)/GeneratedApp/src/app/GeneratedApp.Mobile/Android/AndroidManifest.xml" - applicationEnvironment: Generated_Staging - androidKeyStoreFile: $(InternalKeystore) - androidVariableGroup: "ApplicationTemplate.Distribution.Internal.Android" - iosProvisioningProfileFile: $(InternalProvisioningProfile) - iosCertificateFile: $(InternalCertificate) - iosVariableGroup: "ApplicationTemplate.Distribution.Internal.iOS" +- stage: Publish_Template_Package + condition: and(succeeded(), eq(variables['IsLightBuild'], 'false'), eq(variables['IsReleaseBranch'], 'true')) + dependsOn: + - Build_Staging_GeneratedApp + - Build_Staging + jobs: + - template: .template.config/build/stage-publish-template.yml - - stage: Publish_Template_Package - condition: and(succeeded(), eq(variables['IsLightBuild'], 'false'), eq(variables['IsReleaseBranch'], 'true')) - dependsOn: - - Build_Staging_GeneratedApp - - Build_Staging - jobs: - - template: .template.config/build/stage-publish-template.yml +#-endif +- stage: Build_Staging +#-if false + dependsOn: [] +#-endif + jobs: + - template: build/stage-build.yml + parameters: + applicationEnvironment: Staging + androidKeyStoreFile: $(InternalKeystore) + androidVariableGroup: 'ApplicationTemplate.Distribution.Internal.Android' + iosProvisioningProfileFile: $(InternalProvisioningProfile) + iosCertificateFile: $(InternalCertificate) + iosVariableGroup: 'ApplicationTemplate.Distribution.Internal.iOS' + BannerVersionNameText: "STAGING" - #-endif - - stage: Build_Staging - #-if false - dependsOn: [] - #-endif - jobs: - - template: build/stage-build.yml - parameters: - applicationEnvironment: Staging - androidKeyStoreFile: $(InternalKeystore) - androidVariableGroup: "ApplicationTemplate.Distribution.Internal.Android" - iosProvisioningProfileFile: $(InternalProvisioningProfile) - iosCertificateFile: $(InternalCertificate) - iosVariableGroup: "ApplicationTemplate.Distribution.Internal.iOS" - BannerVersionNameText: "STAGING" +- stage: TestFairy_TestFlight_Staging + condition: and(succeeded(), eq(variables['IsLightBuild'], 'false')) + dependsOn: Build_Staging + jobs: + - template: build/stage-release-testfairy.yml + parameters: + applicationEnvironment: Staging + deploymentEnvironment: TestFairy + androidVariableGroup: "ApplicationTemplate.Distribution.Internal.Android" + iosVariableGroup: "ApplicationTemplate.Distribution.Internal.Ios" - - stage: TestFairy_TestFlight_Staging - condition: and(succeeded(), eq(variables['IsLightBuild'], 'false')) - dependsOn: Build_Staging - jobs: - - template: build/stage-release-testfairy.yml - parameters: - applicationEnvironment: Staging - deploymentEnvironment: TestFairy - androidVariableGroup: "ApplicationTemplate.Distribution.Internal.Android" - iosVariableGroup: "ApplicationTemplate.Distribution.Internal.Ios" + - template: build/stage-release-appstore.yml + parameters: + applicationEnvironment: Staging + deploymentEnvironment: TestFlight - - template: build/stage-release-appstore.yml - parameters: - applicationEnvironment: Staging - deploymentEnvironment: TestFlight +- stage: Build_Production + dependsOn: Build_Staging + condition: and(succeeded(), eq(variables['IsLightBuild'], 'false')) + jobs: + - template: build/stage-build.yml + parameters: + applicationEnvironment: Production + androidKeyStoreFile: $(GooglePlayKeystore) + androidVariableGroup: 'ApplicationTemplate.Distribution.GooglePlay' + iosProvisioningProfileFile: $(AppStoreProvisioningProfile) + iosCertificateFile: $(AppStoreCertificate) + iosVariableGroup: 'ApplicationTemplate.Distribution.AppStore' - - stage: Build_Production - dependsOn: Build_Staging - condition: and(succeeded(), eq(variables['IsLightBuild'], 'false')) - jobs: - - template: build/stage-build.yml - parameters: - applicationEnvironment: Production - androidKeyStoreFile: $(GooglePlayKeystore) - androidVariableGroup: "ApplicationTemplate.Distribution.GooglePlay" - iosProvisioningProfileFile: $(AppStoreProvisioningProfile) - iosCertificateFile: $(AppStoreCertificate) - iosVariableGroup: "ApplicationTemplate.Distribution.AppStore" +- stage: AppCenter_Production + condition: and(succeeded(), eq(variables['IsLightBuild'], 'false')) + dependsOn: Build_Production + jobs: + - template: build/stage-release-appcenter.yml + parameters: + applicationEnvironment: Production + deploymentEnvironment: 'AppCenter Prod' + appCenterWindowsSlug: $(AppCenterWindowsSlug_Production) + appCenteriOSSlug: $(AppCenteriOSSlug_Production) + appCenterAndroidSlug: $(AppCenterAndroidSlug_Production) + androidKeyStoreFile: $(GooglePlayKeystore) + androidVariableGroup: 'ApplicationTemplate.Distribution.GooglePlay' + appCenterServiceConnectionName: $(AppCenterServiceConnection) + appCenterDistributionGroup: $(AppCenterDistributionGroup) - - stage: AppStore - condition: and(succeeded(), eq(variables['IsLightBuild'], 'false')) - dependsOn: Build_Production - jobs: - - template: build/stage-release-appstore.yml - parameters: - applicationEnvironment: Production - deploymentEnvironment: AppStore +- stage: AppStore + condition: and(succeeded(), eq(variables['IsLightBuild'], 'false')) + dependsOn: Build_Production + jobs: + - template: build/stage-release-appstore.yml + parameters: + applicationEnvironment: Production + deploymentEnvironment: AppStore - - stage: GooglePlay - condition: and(succeeded(), eq(variables['IsLightBuild'], 'false')) - dependsOn: Build_Production - jobs: - - template: build/stage-release-googleplay.yml - parameters: - applicationEnvironment: Production - deploymentEnvironment: GooglePlay +- stage: GooglePlay + condition: and(succeeded(), eq(variables['IsLightBuild'], 'false')) + dependsOn: Build_Production + jobs: + - template: build/stage-release-googleplay.yml + parameters: + applicationEnvironment: Production + deploymentEnvironment: GooglePlay