Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added Azure CLI #32

Merged
merged 2 commits into from
Jan 6, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions plugins/azurecli.plugin/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

gpgkey=$"https://packages.microsoft.com/keys/microsoft.asc"
MalteKiefer marked this conversation as resolved.
Show resolved Hide resolved

rpm --import $gpgkey

cat <<EOF > /etc/yum.repos.d/azurecli.repo
[azurecli]
name=Azure Cli
baseurl=https://packages.microsoft.com/yumrepos/azure-cli
enabled=1
gpgcheck=1
gpgkey=$gpgkey
EOF

dnf -y install azure-cli
18 changes: 18 additions & 0 deletions plugins/azurecli.plugin/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"icon": "azurecli",
"label": "Azure Cli",
"description": "Microsoft Cloud computing control software.",
"license": "Closed Source",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can uniformize to "Proprietary"
(non blocking issue).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

"category": "Apps",
"scripts": {
"exec": {
"label": "Install",
"command": "run-as-root -s install.sh"
},
"undo": {
"label": "Remove",
"command": "run-as-root -s uninstall.sh"
},
"status": { "command": "rpm --quiet --query azure-cli" }
}
}
6 changes: 6 additions & 0 deletions plugins/azurecli.plugin/uninstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

if [ -f "/etc/yum.repos.d/azurecli.repo" ]; then
dnf -y remove azure-cli
rm -f /etc/yum.repos.d/azurecli.repo
fi