Skip to content

Instantly share code, notes, and snippets.

@dlmelendez
Created November 28, 2019 00:04
Show Gist options
  • Save dlmelendez/b706f58939dd5cd44461c1f7d0988f12 to your computer and use it in GitHub Desktop.
Save dlmelendez/b706f58939dd5cd44461c1f7d0988f12 to your computer and use it in GitHub Desktop.
Firebase Hosting Azure Pipeline Deploy
trigger:
- firebase-demo
pool:
vmImage: 'windows-2019'
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- task: CmdLine@2
inputs:
script: 'npm install -g firebase-tools'
workingDirectory: '$(Agent.ToolsDirectory)'
displayName: 'install firebase tools'
- task: DotNetCoreCLI@2
inputs:
command: 'build'
projects: '**/ElCamino.DocFx.WebAppRefresh.Sample.sln'
arguments: '-c $(BuildConfiguration)'
displayName: 'build web project'
- task: CmdLine@2
inputs:
script: 'firebase deploy --token "$(FIREBASE_TOKEN)" -m "$(Build.BuildNumber)"'
workingDirectory: '$(System.DefaultWorkingDirectory)\\sample\\ElCamino.DocFx.WebAppRefresh.Sample\\'
displayName: 'firebase publish -m "$(Build.BuildNumber)"'
@Hesamedin
Copy link

Thanks for the gist. I have a question. How did you generate the FIREBASE_TOKEN?

@dlmelendez
Copy link
Author

Full blog post is here to explain the whole e2e setup including the firebase token: https://elcamino.cloud/articles/2019-11-27-google-firebase-is-nice-but-better-with-a-dash-of-azure-devops.html

@Hesamedin
Copy link

Ok, I figure. It has defined here:
https://firebase.google.com/docs/cli#cli-ci-systems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment