On a self hosted gitlab instance, in the web view of a repository it's possible to create a new file. There is also a drop down "Select a template type".
It has entries like .gitignore and LICENSE.
Is it possible to define a custom file template? I could not find any mentions of it in the documentation.
Related
I want to create Azure DevOps pipelines, but instead of writing new yaml files, use prepared ones that are in a github repository.
I have connected GitHub to my Azure DevOps account, but I Can't see an option to use yaml files in that repository.
I only have an option to create a new pipeline yaml, and then set it in the repo folder structure.
If I try and set it on the location of the yaml file I want to use, which is already in the repo, I get - of course, an error stating there's a file there.
My work around is to set a new yaml file with a different name, copy the content from the existing file and then delete that one and rename the new file to the name of the file I copied from.
Surely there must be a better, easier, more logical and short way.
I would appreciate any help.
Under project settings you should link your Github account.
Then you can go and create a new pipeline and select the Github location
after this step, your available github repositories will appear and you can select your existing .YML file.
Existing pipeline:
I've created a resource group on Azure containing all of my resources for my project that is coming to a close and I'd like to not be charged for the resources I will soon no longer be using. I'd like to come back to this project in the future however so my question is: is there a way of backing up my entire resource configuration so I can just redeploy it with ease in the future?
Many thanks.
Yes, You Can Export Resources from ResourceGroup which will generate a new template and that exported template you can download and you can import the template later when you need.
Select the resources from your resource group which you want to export and click on the export template.
Once the Template is generated you can find an Option of download template as shown below.
When you select custom deployment you can deploy the template which you downloaded.
Exported Azure ARM template contains a lot's of useless information, let's say snapshots. I would like export actual resource definitions only.
Is it possible to filter unnecessary items out? I would like to convert this template to Bicep (to deploy all the resources into an another subscription) and now I have to clear manually all the unused items from the exported ARM template.
Thank you Gopa. Posting your suggestion as an answer to help other community members.
Exporting an ARM template from the resource group or resource will give you a template that is a snapshot of the current properties so it includes all the properties which were changed after the initial deployment.
You can also try exporting templates from the deployment history too which will give you an option to export your initial version without the changes you made after each deployment.
You can maintain all resources in source control as ARM templates and use CI/CD to deploy, whenever there is a change, so you can have our latest version of ARM templates and use it to build up a new environment when a need comes.
You can export the template that was used to deploy existing resources. The template you get is exactly the one that was used for deployment.
Export template after deployment
Select the resource group you want to export.
Select the link under Deployments.
Select one of the deployments from the deployment history.
Select Template. The template used for this deployment is displayed, and is available for download.
I am trying to create a link to a local file within the description section of a task in Azure DevOps.
I have tried using the extension file:///H:\Documents\test.xlsx The link appears as a hyperlink, however it is not clickable.
How to create local file link in description section of work item
within Azure Devops?
I am afraid this is not achievable in Azure devops. The description section of the work item cannot add the link associated with the local file.
You can attach local files as attachments to work item.
Choose the Attachment tab icon to attach a file with supplemental information.
I have a project which I plan to open-source at some point. Currently I keep all of my API keys in a class which is not checked in - I have just linked the project to Azure but the API key class not being present causes the deployment to fail.
How can I hide secret API keys in a public project and still have it deploy to Azure?
I have read quite a few posts (this one for instance) but cannot find a solution that allows me to do what I want - does anyone know what I should do here? Is it possible?
For an Azure Web App, you can specify config values on the Configure tab in the portal (under "app settings"). These will override values specified in your Web.config file.
This means you can leave these settings out of your public repository.
For developing locally, you can put the settings in a separate XML file. To do this, update the appSettings in your Web.config like this:
<appSettings file="mysettings.xml" />
Then create mysettings.xml and put your actual settings in a new <appSettings> element there.
You can then add mysettings.xml to your .gitignore file so it won't be checked in to your public repository.
Azure doesn't mind that your mysettings.xml file doesn't exist, and will pick up the settings you specify in the portal instead.