CircleCI-Public / azure-cli-orb

CircleCI orb to install and configure the Azure CLI
https://circleci.com/orbs/registry/orb/circleci/azure-cli
MIT License
2 stars 13 forks source link

Can't install azure-cli #27

Open NdagiStanley opened 1 year ago

NdagiStanley commented 1 year ago

Orb version

1.2.2

What happened

Update and install the Azure CLI failed.

View the CircleCI config below from the Usage Examples:

version: '2.1'
orbs:
  azure-cli: circleci/azure-cli@1.2.2
jobs:
  verify-install:
    executor: azure-cli/default
    steps:
      - azure-cli/install
      - run:
          command: az -v
          name: Verify Azure CLI is installed
workflows:
  example-workflow:
    jobs:
      - verify-install

See logs below:

#!/bin/bash -eo pipefail
# Verify the CLI isn't already installed
# Use which instead of command -v for wider coverage of envs

if which az > /dev/null; then
  echo "Azure CLI installed already."
  exit 0
fi

# Set sudo to work whether logged in as root user or non-root user

if [[ $EUID == 0 ]]; then export SUDO=""; else export SUDO="sudo"; fi

# https://github.com/CircleCI-Public/azure-cli-orb/issues/15
# https://manpages.debian.org/unstable/apt/apt-get.8.en.html
$SUDO apt-get --allow-releaseinfo-change-suite update && $SUDO apt-get -qqy install apt-transport-https

if [[ $(command -v lsb_release) == "" ]]; then
  echo "Installing lsb_release"
  $SUDO apt-get -qqy install lsb-release
fi

# Create an environment variable for the correct distribution
export AZ_REPO=$(lsb_release -cs)

# Modify your sources list

echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | \
  $SUDO tee /etc/apt/sources.list.d/azure-cli.list

if [[ $(command -v curl) == "" ]]; then
  echo "Installing curl"
  $SUDO apt-get -qqy install curl
fi

# Get the Microsoft signing key

curl -L https://packages.microsoft.com/keys/microsoft.asc | $SUDO apt-key add -

# Update and install the Azure CLI

# https://github.com/CircleCI-Public/azure-cli-orb/issues/15
# https://manpages.debian.org/unstable/apt/apt-get.8.en.html
$SUDO apt-get --allow-releaseinfo-change-suite update
$SUDO apt-get -qqy install \
  ca-certificates \
  azure-cli
echo "Azure CLI is now installed."

E: Command line option --allow-releaseinfo-change-suite is not understood in combination with the other options
Installing lsb_release
E: Failed to fetch http://deb.debian.org/debian/pool/main/d/distro-info-data/distro-info-data_0.36_all.deb  404  Not Found
E: Failed to fetch http://deb.debian.org/debian/pool/main/l/lsb/lsb-release_9.20161125_all.deb  404  Not Found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Exited with code exit status 100

CircleCI received exit code 100

Expected behavior

It should install azure-cli