From ee6d423fc3664a9027b0cba24655a6da09db4261 Mon Sep 17 00:00:00 2001 From: Benoy Bose Date: Thu, 13 Mar 2025 14:57:20 +0530 Subject: [PATCH] Adding `install firebase tools` --- .firebaserc | 3 ++- fitlien-services-pipeline.yaml | 21 +++++++++++++-------- functions/.env.example | 6 +++--- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.firebaserc b/.firebaserc index c5726f5..4e10561 100644 --- a/.firebaserc +++ b/.firebaserc @@ -1,5 +1,6 @@ { "projects": { - "default": "fitlien-dev" + "default": "fitlien-dev", + "prod": "fitlien" } } diff --git a/fitlien-services-pipeline.yaml b/fitlien-services-pipeline.yaml index 2bc8bdf..31cfb9d 100644 --- a/fitlien-services-pipeline.yaml +++ b/fitlien-services-pipeline.yaml @@ -17,10 +17,10 @@ steps: inputs: targetType: "inline" script: | - Write-Host "##vso[build.updatebuildnumber]${buildNumber}" + Write-Host "##vso[build.updatebuildnumber]$(buildNumber)" - - task: NodeTool@0 - displayName: "Install Node" + - task: UseNode@1 + displayName: "Setting up node" inputs: version: "20" @@ -35,7 +35,7 @@ steps: targetType: "inline" script: | $pkg = Get-Content -Path "$(System.DefaultWorkingDirectory)/functions/package.json" -Raw | ConvertFrom-Json - $pkg.version = "${{ parameters.buildNumber }}" + $pkg.version = "$(buildNumber)" $pkg | ConvertTo-Json -Depth 100 | Set-Content -Path "$(System.DefaultWorkingDirectory)/functions/package.json" - task: CmdLine@2 @@ -44,12 +44,11 @@ steps: script: | cp "$(System.DefaultWorkingDirectory)/functions/.env.example" "$(System.DefaultWorkingDirectory)/functions/.env" - - task: ReplaceTokens@3 + - task: replacetokens@6 displayName: "Replace tokens in .env file" inputs: - targetFiles: "$(System.DefaultWorkingDirectory)/functions/.env" - tokenPrefix: "#{" - tokenSuffix: "}#" + root: "$(System.DefaultWorkingDirectory)/functions/" + sources: .env - task: Npm@1 displayName: "npm run build" @@ -81,3 +80,9 @@ steps: SourceFolder: "$(System.DefaultWorkingDirectory)" Contents: "fitlien-services-$(buildNumber).zip" TargetFolder: "$(System.ArtifactsDirectory)" + + - task: CmdLine@2 + displayName: "install firebase tools" + inputs: + script: curl -sL firebase.tools | upgrade=true bash + workingDirectory: $(Agent.ToolsDirectory) diff --git a/functions/.env.example b/functions/.env.example index ed58607..1b1a5fd 100644 --- a/functions/.env.example +++ b/functions/.env.example @@ -1,6 +1,6 @@ MAILGUN_API_KEY=#{MAILGUN_API_KEY}# MAILGUN_SERVER=#{MAILGUN_SERVER}# MAILGUN_FROM_ADDRESS=#{MAILGUN_FROM_ADDRESS}# -TWILIO_ACCOUNT_SID=AC5cfaae728ba68fb1aa6756d973b6e32b -TWILIO_AUTH_TOKEN=886ed704c7918078f361f5f88b42ffc0 -TWILIO_PHONE_NUMBER=+12315005309 +TWILIO_ACCOUNT_SID=#{TWILIO_ACCOUNT_SID}# +TWILIO_AUTH_TOKEN=#{TWILIO_ACCOUNT_SID}# +TWILIO_PHONE_NUMBER=#{TWILIO_PHONE_NUMBER}#