From ff016d48d1041f249ae77b27314f4a7a177876a7 Mon Sep 17 00:00:00 2001 From: Franck Cornu Date: Tue, 21 May 2024 16:40:30 -0400 Subject: [PATCH] - Updated CI --- .github/workflows/publish.yml | 6 ------ deploy/deploy-teams.ps1 | 2 -- deploy/variables.ci.ps1 | 19 +++---------------- 3 files changed, 3 insertions(+), 24 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index dca4e83..302d0c6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -310,12 +310,6 @@ jobs: run: | npm install -g @microsoft/teamsfx-cli@2.0.1 - - name: Load variables - shell: pwsh - working-directory: ./ - run: | - ./deploy/variables.ci.ps1 -Verbose - - name: Run PowerShell deployment shell: pwsh working-directory: ./ diff --git a/deploy/deploy-teams.ps1 b/deploy/deploy-teams.ps1 index 4730d35..5b0cd15 100644 --- a/deploy/deploy-teams.ps1 +++ b/deploy/deploy-teams.ps1 @@ -51,8 +51,6 @@ switch ($Env) { # More info about TeamsFx CI/CD deployment: # https://github.com/OfficeDev/TeamsFx/blob/main/docs/cicd_insider/others-script-cd-template.sh -Write-Verbose $env:GITHUB_ENV - $appFolderPath = Join-Path -Path $PSScriptRoot -ChildPath "..\apps\teams" Write-Verbose "[TeamsFx] Set path to '$appFolderPath'..." diff --git a/deploy/variables.ci.ps1 b/deploy/variables.ci.ps1 index 9516afe..4a811b9 100644 --- a/deploy/variables.ci.ps1 +++ b/deploy/variables.ci.ps1 @@ -2,6 +2,8 @@ # Variables script for CI deployment # ----------------------------------------- +dir env: + # -----------------------------[Deployment credentials] ------------------------------------ $global:ENV_AzDeployAppId = $env:ENV_AzDeployAppId $global:ENV_AzDeployAppCertificateValue = $env:ENV_AzDeployAppCertificateValue @@ -21,19 +23,4 @@ $global:ENV_M365AccountName = $env:ENV_M365AccountName $global:ENV_M365AccountPassword = $env:ENV_M365AccountPassword $global:ENV_M365TenantId = $env:ENV_M365TenantId -$global:ENV_EnvName = $env:ENV_EnvName - - -# Export variables as .env files so it can be consumed by other jobs -Write-Verbose "Exporting CI variables as artifact" - -Get-Variable -Scope Global | Where-Object { $_.Name.StartsWith("ENV_") } | ForEach-Object { - $name= $_.Name - $value = $_.Value - - Write-Verbose "Exporting $name" - - Add-Content -Path $env:GITHUB_ENV -Value "$name=$value" -Encoding utf8 - - Write-Host $env:GITHUB_ENV -} \ No newline at end of file +$global:ENV_EnvName = $env:ENV_EnvName \ No newline at end of file