generated from nventive/Template
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
82 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,110 +1,89 @@ | ||
parameters: | ||
parameters: | ||
applicationEnvironment: '' # e.g. "Staging", "Production" | ||
deploymentEnvironment: '' # e.g. "GooglePlay", "AppStore", "AppCenter" | ||
appCenterWindowsSlug: '' | ||
appCenteriOSSlug: '' | ||
appCenterAndroidSlug: '' | ||
androidKeyStoreFile: '' | ||
deploymentEnvironment: '' # e.g. "GooglePlay", "AppStore", "AppCenter" "Firebase App Distribution" | ||
androidVariableGroup: '' | ||
appCenterServiceConnectionName: '' | ||
appCenterDistributionGroup: '' | ||
serviceConnectionKeyFileName: "" | ||
|
||
jobs: | ||
- deployment: AppCenter_Android | ||
- deployment: Firebase_Android | ||
pool: | ||
vmImage: $(windowsHostedAgentImage) | ||
variables: | ||
- name: artifactName | ||
value: $(AndroidArtifactName)_${{ parameters.applicationEnvironment }} | ||
- name: releaseNotesArtifactName | ||
value: ReleaseNotes_${{ parameters.applicationEnvironment }} | ||
- group: ${{ parameters.androidVariableGroup }} | ||
- pathToAab: '$(Pipeline.Workspace)/$(AndroidArtifactName)_${{ parameters.applicationEnvironment }}/*Signed.aab' | ||
environment: ${{ parameters.deploymentEnvironment }} | ||
strategy: | ||
runOnce: | ||
deploy: | ||
steps: | ||
- download: current | ||
displayName: "Download Artifact" | ||
artifact: $(artifactName) | ||
steps: | ||
# Step 1: Install Firebase tools | ||
- script: "npm install -g firebase-tools" | ||
displayName: "Install Firebase Tools" | ||
|
||
- download: current | ||
displayName: "Download Release Notes" | ||
artifact: $(releaseNotesArtifactName) | ||
# Step 2: Download the service connection key file | ||
- task: DownloadSecureFile@1 | ||
inputs: | ||
secureFile: ${{ parameters.serviceConnectionKeyFileName }} | ||
name: DistributionServiceConnection | ||
displayName: "Download Firebase Service Connection" | ||
|
||
- task: AppCenterDistribute@3 | ||
displayName: Deploy Android to AppCenter | ||
inputs: | ||
serverEndpoint: ${{ parameters.appCenterServiceConnectionName }} | ||
distributionGroupId: ${{ parameters.appCenterDistributionGroup }} | ||
appSlug: ${{ parameters.appCenterAndroidSlug }} | ||
appFile: '$(Pipeline.Workspace)/$(artifactName)/*Signed.aab' | ||
releaseNotesOption: file | ||
releaseNotesFile: "$(Pipeline.Workspace)/$(releaseNotesArtifactName)/ReleaseNotes-Excerpt.md" | ||
isSilent: true | ||
# Step 3: Deploy to Firebase App Distribution | ||
- script: | | ||
echo "Deploying to Firebase App Distribution..." | ||
echo "App ID: $(ApplicationIdentifier)" | ||
echo "Path to AAB: $(pathToAab)" | ||
firebase appdistribution:distribute $(pathToAab) \ | ||
--app $(ApplicationIdentifier) | ||
env: | ||
GOOGLE_APPLICATION_CREDENTIALS: $(DistributionServiceConnection.secureFilePath) | ||
displayName: "Deploy to Firebase" | ||
- task: DeleteFiles@1 | ||
displayName: "Remove Downloaded Artifacts (Build)" | ||
condition: always() | ||
inputs: | ||
SourceFolder: $(Pipeline.Workspace)/$(artifactName) | ||
RemoveSourceFolder: true | ||
Contents: '**' | ||
|
||
- task: DeleteFiles@1 | ||
displayName: "Remove Downloaded Artifacts (Release Notes)" | ||
condition: always() | ||
inputs: | ||
SourceFolder: $(Pipeline.Workspace)/$(releaseNotesArtifactName) | ||
RemoveSourceFolder: true | ||
Contents: '**' | ||
# - deployment: AppCenter_iOS | ||
# pool: | ||
# vmImage: $(macOSHostedAgentImage) | ||
# variables: | ||
# - name: artifactName | ||
# value: $(iOSArtifactName)_${{ parameters.applicationEnvironment }} | ||
# - name: releaseNotesArtifactName | ||
# value: ReleaseNotes_${{ parameters.applicationEnvironment }} | ||
# environment: ${{ parameters.deploymentEnvironment }} | ||
# strategy: | ||
# runOnce: | ||
# deploy: | ||
# steps: | ||
# - download: current | ||
# displayName: "Download Artifact" | ||
# artifact: $(artifactName) | ||
|
||
- deployment: AppCenter_iOS | ||
pool: | ||
vmImage: $(macOSHostedAgentImage) | ||
variables: | ||
- name: artifactName | ||
value: $(iOSArtifactName)_${{ parameters.applicationEnvironment }} | ||
- name: releaseNotesArtifactName | ||
value: ReleaseNotes_${{ parameters.applicationEnvironment }} | ||
environment: ${{ parameters.deploymentEnvironment }} | ||
strategy: | ||
runOnce: | ||
deploy: | ||
steps: | ||
- download: current | ||
displayName: "Download Artifact" | ||
artifact: $(artifactName) | ||
|
||
- download: current | ||
displayName: "Download Release Notes" | ||
artifact: $(releaseNotesArtifactName) | ||
# - download: current | ||
# displayName: "Download Release Notes" | ||
# artifact: $(releaseNotesArtifactName) | ||
|
||
- task: AppCenterDistribute@3 | ||
displayName: Deploy iOS to AppCenter | ||
inputs: | ||
serverEndpoint: ${{ parameters.appCenterServiceConnectionName }} | ||
appSlug: ${{ parameters.appCenteriOSSlug }} | ||
appFile: $(Pipeline.Workspace)/$(artifactName)/*.ipa | ||
symbolsDsymFiles: $(Pipeline.Workspace)/$(artifactName)/*.dSYM | ||
symbolsIncludeParentDirectory: true | ||
distributionGroupId: ${{ parameters.appCenterDistributionGroup }} | ||
releaseNotesOption: file | ||
releaseNotesFile: "$(Pipeline.Workspace)/$(releaseNotesArtifactName)/ReleaseNotes-Excerpt.md" | ||
isSilent: true | ||
# - task: AppCenterDistribute@3 | ||
# displayName: Deploy iOS to AppCenter | ||
# inputs: | ||
# serverEndpoint: ${{ parameters.appCenterServiceConnectionName }} | ||
# appSlug: ${{ parameters.appCenteriOSSlug }} | ||
# appFile: $(Pipeline.Workspace)/$(artifactName)/*.ipa | ||
# symbolsDsymFiles: $(Pipeline.Workspace)/$(artifactName)/*.dSYM | ||
# symbolsIncludeParentDirectory: true | ||
# distributionGroupId: ${{ parameters.appCenterDistributionGroup }} | ||
# releaseNotesOption: file | ||
# releaseNotesFile: "$(Pipeline.Workspace)/$(releaseNotesArtifactName)/ReleaseNotes-Excerpt.md" | ||
# isSilent: true | ||
|
||
- task: DeleteFiles@1 | ||
displayName: "Remove Downloaded Artifacts (Build)" | ||
condition: always() | ||
inputs: | ||
SourceFolder: $(Pipeline.Workspace)/$(artifactName) | ||
RemoveSourceFolder: true | ||
Contents: '**' | ||
# - task: DeleteFiles@1 | ||
# displayName: "Remove Downloaded Artifacts (Build)" | ||
# condition: always() | ||
# inputs: | ||
# SourceFolder: $(Pipeline.Workspace)/$(artifactName) | ||
# RemoveSourceFolder: true | ||
# Contents: '**' | ||
|
||
- task: DeleteFiles@1 | ||
displayName: "Remove Downloaded Artifacts (Release Notes)" | ||
condition: always() | ||
inputs: | ||
SourceFolder: $(Pipeline.Workspace)/$(releaseNotesArtifactName) | ||
RemoveSourceFolder: true | ||
Contents: '**' | ||
# - task: DeleteFiles@1 | ||
# displayName: "Remove Downloaded Artifacts (Release Notes)" | ||
# condition: always() | ||
# inputs: | ||
# SourceFolder: $(Pipeline.Workspace)/$(releaseNotesArtifactName) | ||
# RemoveSourceFolder: true | ||
# Contents: '**' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters