From f6a9c55907004a0a8b2cf808bcd9aee86342f2aa Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Wed, 12 Jun 2024 14:53:18 -0500 Subject: [PATCH] build: remove unneeded installs/secrets (#42467) build: remove unneeded azure installs/secrets --- .github/workflows/macos-pipeline.yml | 11 +--- script/azure_cli_deb_install.sh | 91 ---------------------------- 2 files changed, 1 insertion(+), 101 deletions(-) delete mode 100755 script/azure_cli_deb_install.sh diff --git a/.github/workflows/macos-pipeline.yml b/.github/workflows/macos-pipeline.yml index cbd2c399e7d7..975ec96c852c 100644 --- a/.github/workflows/macos-pipeline.yml +++ b/.github/workflows/macos-pipeline.yml @@ -34,17 +34,10 @@ concurrency: cancel-in-progress: true env: - # Old Azure Storage Variables - AZURE_STORAGE_ACCOUNT: ${{ secrets.AZURE_STORAGE_ACCOUNT }} - AZURE_STORAGE_KEY: ${{ secrets.AZURE_STORAGE_KEY }} - AZURE_STORAGE_CONTAINER_NAME: ${{ secrets.AZURE_STORAGE_CONTAINER_NAME }} - ELECTRON_ARTIFACTS_BLOB_STORAGE: ${{ secrets.ELECTRON_ARTIFACTS_BLOB_STORAGE }} - # New Azure Storage Variables - AZURE_AKS_CACHE_STORAGE_KEY: ${{ secrets.AZURE_AKS_CACHE_STORAGE_KEY }} - AZURE_AKS_CACHE_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_AKS_CACHE_STORAGE_CONNECTION_STRING }} AZURE_AKS_CACHE_STORAGE_ACCOUNT: ${{ secrets.AZURE_AKS_CACHE_STORAGE_ACCOUNT }} AZURE_AKS_CACHE_SHARE_NAME: ${{ secrets.AZURE_AKS_CACHE_SHARE_NAME }} AZURE_AKS_CACHE_SAS_TOKEN: ${{ secrets.AZURE_AKS_CACHE_SAS_TOKEN }} + ELECTRON_ARTIFACTS_BLOB_STORAGE: ${{ secrets.ELECTRON_ARTIFACTS_BLOB_STORAGE }} ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }} ELECTRON_GITHUB_TOKEN: ${{ secrets.ELECTRON_GITHUB_TOKEN }} GN_CONFIG: ${{ inputs.gn-config }} @@ -73,8 +66,6 @@ jobs: - name: Set GIT_CACHE_PATH to make gclient to use the cache run: | echo "GIT_CACHE_PATH=$(pwd)/git-cache" >> $GITHUB_ENV - - name: Install Azure CLI - run: sudo bash ./src/electron/script/azure_cli_deb_install.sh - name: Install Dependencies run: | cd src/electron diff --git a/script/azure_cli_deb_install.sh b/script/azure_cli_deb_install.sh deleted file mode 100755 index e2dde20e1f46..000000000000 --- a/script/azure_cli_deb_install.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/env bash - -####################################################################################################################### -# This script does three fundamental things: # -# 1. Add Microsoft's GPG Key has a trusted source of apt packages. # -# 2. Add Microsoft's repositories as a source for apt packages. # -# 3. Installs the Azure CLI from those repositories. # -# Given the nature of this script, it must be executed with elevated privileges, i.e. with `sudo`. # -# # -# Copied from https://azurecliprod.blob.core.windows.net/$root/deb_install.sh # -####################################################################################################################### - -set -e - -if [[ $# -ge 1 && $1 == "-y" ]]; then - global_consent=0 -else - global_consent=1 -fi - -function assert_consent { - if [[ $2 -eq 0 ]]; then - return 0 - fi - - echo -n "$1 [Y/n] " - read consent - if [[ ! "${consent}" == "y" && ! "${consent}" == "Y" && ! "${consent}" == "" ]]; then - echo "'${consent}'" - exit 1 - fi -} - -global_consent=0 # Artificially giving global consent after review-feedback. Remove this line to enable interactive mode - -setup() { - - assert_consent "Add packages necessary to modify your apt-package sources?" ${global_consent} - set -v - export DEBIAN_FRONTEND=noninteractive - apt-get update - apt-get install -y apt-transport-https lsb-release gnupg curl - set +v - - assert_consent "Add Microsoft as a trusted package signer?" ${global_consent} - set -v - curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.gpg - set +v - - assert_consent "Add the Azure CLI Repository to your apt sources?" ${global_consent} - set -v - # Use env var DIST_CODE for the package dist name if provided - if [[ -z $DIST_CODE ]]; then - CLI_REPO=$(lsb_release -cs) - shopt -s nocasematch - ERROR_MSG="Unable to find a package for your system. Please check if an existing package in https://packages.microsoft.com/repos/azure-cli/dists/ can be used in your system and install with the dist name: 'curl -sL https://aka.ms/InstallAzureCLIDeb | sudo DIST_CODE= bash'" - if [[ ! $(curl -sL https://packages.microsoft.com/repos/azure-cli/dists/) =~ $CLI_REPO ]]; then - DIST=$(lsb_release -is) - if [[ $DIST =~ "Ubuntu" ]]; then - CLI_REPO="jammy" - elif [[ $DIST =~ "Debian" ]]; then - CLI_REPO="bookworm" - elif [[ $DIST =~ "LinuxMint" ]]; then - CLI_REPO=$(cat /etc/os-release | grep -Po 'UBUNTU_CODENAME=\K.*') || true - if [[ -z $CLI_REPO ]]; then - echo $ERROR_MSG - exit 1 - fi - else - echo $ERROR_MSG - exit 1 - fi - fi - else - CLI_REPO=$DIST_CODE - if [[ ! $(curl -sL https://packages.microsoft.com/repos/azure-cli/dists/) =~ $CLI_REPO ]]; then - echo "Unable to find an azure-cli package with DIST_CODE=$CLI_REPO in https://packages.microsoft.com/repos/azure-cli/dists/." - exit 1 - fi - fi - echo "deb [arch=$(dpkg --print-architecture)] https://packages.microsoft.com/repos/azure-cli/ ${CLI_REPO} main" \ - > /etc/apt/sources.list.d/azure-cli.list - apt-get update - set +v - - assert_consent "Install the Azure CLI?" ${global_consent} - apt-get install -y azure-cli - -} - -setup # ensure the whole file is downloaded before executing \ No newline at end of file