Set-AzApiManagementPolicy in az cli - azure-cli

Is there an az cli equivalent command to azure powershell's Set-AzApiManagementPolicy? Since az apim is still in preview I doubt it, but perhaps there's an az rest command I'm missing.

As I expected az rest has this functionality. I should've spend a few more minutes looking.

Related

Is there a way to specify an isolation mode with az acr build?

I want to pass in --isolation hyperv to the az acr build, but I can't find an equivalent in the docs. Is there a way to do this?
You cannot pass in the isolation parameter to az acr build.
If you create a Azure DevOps build agent, you could create your docker image using whatever parameters you want, then push it to the container registry. Make sure to select a v3 VM type if you wish to use Hyper-V isolation.

Is it possible to deploy to openshift using Circle CI?

Currently learning about CI CD for an upcoming project. Currently our project is being hosted on bitbucket and thus can't use Travis CI. Was thinking of using Circle CI in this case. Searched through the internet for examples of how to configure circle CI to deploy to openshift. Does anyone have experience with this?
In this case you do not want to use automatic webhook based build triggering in Openshift based on accepted pull requests in GitHub, but just simply trigger a build by CircleCI via e.g. the Openshift (oc start-build <buildconfig_name> --follow) CLI tool.

how to provide --from-file parameter via jenkins openshift build plugin

I want to convert the below openshift command to run from jenkins pipeline by
openshift build plugin.
oc start-build ${appName}-docker --from-file=microservicesdemoapp/target/myapp.jar -n ${project}
The problem is that I can't find how to provide the --from-file parameter via the plugin.
It would just get passed as an individual quoted argument similar to below:
openshift.startBuild("${applicationName}", "--from-dir=.", "--wait=true", "-n
${projectName}")

gcloud beta functions command says "Invalid choice functions"

I'm following the google cloud functions tutorial here: https://cloud.google.com/functions/docs/quickstart
I install google-cloud-sdk and source both path.bash.inc and completion.bash.inc.
The gsutil command step works and creates the storage bucket.
When I run gcloud beta functions deploy helloWorld --stage-bucket [BUCKET_NAME] --trigger-topic hello_world replacing with my [BUCKET_NAME] I get usage help and the following error:
```
ERROR: (gcloud.beta) Invalid choice: 'functions'.
Valid choices are [app, auth, bigtable, compute, config, container, dataflow, dataproc, debug, deployment-manager, emulators, error-reporting, iam, init, logging, ml, organizations, projects, pubsub, service-management, source, sql, test].
```
I'm not sure how the gcloud command works, but I can see the functions directory in the lib/surface/ directory of the google-cloud-sdk.
Why does gcloud beta functions not work? How can I make it work?
Make sure you have the latest cloud SDK installed.
I got the same error and it seems I had version 137 while the latest is 152.
After running gcloud components update it was solved.
The functions are in subscription-only beta phase right now. From Quickstart:
Beta
This is a Beta release of Google Cloud Functions. This API might be
changed in backward-incompatible ways and is not subject to any SLA or
deprecation policy.
Want to get advance access to the latest and greatest? Click here to become a beta tester.
The gcloud cmd might be checking beta subscriptions. Did you subscribe?
Also make sure you have the most recent cloud SDK version.

How to add git repository, using Azure CLI to the app?

I am using Azure cli. I have created app by using azure cli command. azure site create $SITENAME --location $LOCATION --hostname $HOSTNAME -s $SUBSCRIPTIONID.
Now i want to connect it with my git account using Azure CLI.
If you use the new CLI 2.0 (https://github.com/Azure/azure-cli) you should be able to use the following command:
az appservice web source-control config-local-git -g {group} -n {webapp name}
git remote add azure https://<deploy_user_name>#MyApp.scm.azurewebsites.net/MyApp.git
If this doesn't work for your scenario, please post a feature request to our repo.
If you wish to customize continious deployment, I'm afraid there is no way to use Azure CLI in this case now.
Please use Azure web-portal to do it - details are here
You can also use Visual Studio Team Services and have the compile website, and then execute your ARM template, through release management to update environment.