How can I get the version of Concourse or the fly CLI via the API - concourse

I am downloading the fly Concourse CLI via the web interface or via the API endpoint: /api/v1/cli?arch=amd64&platform=darwin.
Is there a way to get via a similar API endpoint the version of Concourse or of the fly CLI?
I am using this in order to compare the existing fly CLI that the user has and the one he can download (suggesting him/her an update in case there is a newer version).

/api/v1/info should tell you the version of Concourse (which goes in lockstep with the version of the fly CLI).
Note that the fly cli will warn you if you are using a version of the CLI that's out of sync with the version of Concourse you are targetting.

Related

How to export jFrog Artifactory repositories through REST API or a jFrog CLI command?

Using the UI, I can export Artifactory repositories. I'll be able to do it as mentioned in the documentation.
But what if I want to do it through a Rest API call or a jFrog CLI command?
JFrog has a CLI that can be used for many kinds of command line, automated or maintenance tasks. This CLI integrates great with CI/CD and with on demand tasks like downloading a file or a full repository.
Another option is to use the Artifactory REST API, which can be used to download a whole repository or folder from it. There are a zillion options for the REST API.
For system export, you need to use the Export System REST API call.

How can I publish the vscode plugin in vscode marketplace using API?

My goal is to publish a extension in vscode marketplace without manually interact. Can someone make me aware, whether I can use extension API for this or there is another way using curl option?
You can use the vsce CLI. With this you can publish and update an extension from command line. Therefore you should be capable to automate that process in a CI/CD pipeline. There is also an article in the docs that explains how to use the tool.
Optionally, you can take a look to one of my extensions. There I automatically create releases using azure pipelines.

Publish NuGet Packages from TeamCity to Azure DevOps Artifacts

I am trying to configure the Azure Artifacts Credential Provider to allow me to connect to Azure DevOps and publish NuGet packages to the Artifacts feed. I have installed the credential provider on my build server. However every time that I run the build I get the following error:
Am I supposed to pass in a PAT to the Credential Provider or is the account that is running the build need to have access to Azure DevOps so that it can generate credentials? The documentation was a little unclear to me about how this works. My TeamCity instance is a little out of date so maybe I need to work on getting that upgraded first.
Please, add NuGet Credentials Provider build feature for your build configuration. Specify an URL for the feed (the same way as you did in NuGet Publish build step), a valid username + PAT (not a password in there).
The accepted answer seems to no longer be working. On TeamCity 2019.1.4 running on Windows Server 2016 and using .NET Core 2.2.105:
[push] WARNING: The credential plugin model used by 'C:\TeamCity\buildAgent\plugins\nuget-agent\bin\credential-provider\CredentialProvider.TeamCity.exe' is deprecated. Please contact the provider of the plugin for an alternative. More information about the recommended plugin model can be found at 'https://aka.ms/nuget-cross-platform-authentication-plugin'.
[17:18:31][push] Please provide credentials for: https://pkgs.dev.azure.com/org/project/_packaging/feed/nuget/v3/index.json
[17:18:31][push] Unable to load the service index for source https://pkgs.dev.azure.com/org/project/_packaging/feed/nuget/v3/index.json.
[17:18:31][push] Response status code does not indicate success: 401 (Unauthorized).
Manually installing and running the https://github.com/microsoft/artifacts-credprovider works from the command line if I log in to the server and set the env vars for non-interactive use, but does not work within the context of a TeamCity Build job.
Is there a newer TeamCity runner than can handle authentication for dotnet nuget push to Azure Artifacts?

Add Artifactory repository via CLI or Rest

Is it somehow possible to configure Artifactory via a CLI or a Rest API?
For example I'd like to add users or repositories.
It looks like its possible to configure it via https://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API#ArtifactoryRESTAPI-CreateRepository. But Artifactory Pro is necessary to use this features.

Source control for server side scripts in Azure Mobile Service

I am using Azure Mobile Services as the backend for my mobile app. Despite my best efforts, my server side scripts are getting complex now. Is there a way I can keep the insert, update, read, delete scripts for the tables in my service, in source control and maybe have a way to deploy them from within Visual Studio?
Have you checked out the node Azure Command Line Tools? This will likely hold the solution to your problems. These tools allow you to neatly manage your mobile service from your dev machine. The newly added cli tools for Mobile Services also support downloading your scripts. Just run the following command in your Azure Powershell:
azure mobile script download <service_name> <script_name>
The script name syntax is as follows:
For tables: table/.{insert|read|update|delete}
Apple Push Notification: shared/apnsFeedback
Scheduler: scheduler/
Once you have your scripts downloaded and placed on your local filesystem, you could put them in source control with your client that consumes your mobile service, or just throw them in their own git repository. You can't, however, sync your source control repository with your mobile service. In order to upload any changes you've made to your scripts, you'd need to execute the following command in the Azure-CLI again:
azure mobile script upload <service_name> <script_name>
I'm not sure if you can upload multiple scripts at once though. You could probably use some of the Azure-CLI Automation scripts I saw Glenn Block post on github. This could allow you to somehow automate uploading the scripts as a part of your build workflow.
Edit:
I found a few more resources that might help you with this:
Getting started with the CLI and backing up your scripts
More CLI – changing your Mobile Services workflow
These are some great resources from Josh Twist. I'm sure they will push you in the right direction.
Since this question has been answered, a new feature has been added to Azure Mobile Services - integration with Git source control. Basically you can enable this feature in the dashboard of your mobile service, and it converts the storage in a Git repository which you can clone / pull and push updates to.
You can find more information in the tutorial at http://www.windowsazure.com/en-us/develop/mobile/tutorials/store-scripts-in-source-control/.