Skip to content

Commit 6218f07

Browse files
authored
Redirect all links to new functions cdn domain (#4384)
* Redirect all links to new functions cdn domain * Update readme * retrigger checks
1 parent d959d74 commit 6218f07

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/How to parse v2 Templates.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
### Bundle feed
44

5-
The templates come from the extension [bundle feed](https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/index-v2.json) under the `templates.v2` property.
5+
The templates come from the extension [bundle feed](https://cdn.functions.azure.com/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/index-v2.json) under the `templates.v2` property.
66
The extension looks at the `bundleVersions` to determine what the latest version is. It then uses the three properties `functions`, `userPrompts`, and `resources` to retrieve the jsons used to parse the templates.
77

88
**NOTE: For v1, we use `bindings` instead of `userPrompts`**

src/templates/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Azure Function Templates
22

3-
The code in this folder is used to parse and model the [function templates](https://github.com/Azure/azure-webjobs-sdk-templates) provided by the [Azure Functions CLI Feed](https://aka.ms/AAbbk68). The Functions CLI Feed provides a central location to get the latest version of all templates used for functions.
3+
The code in this folder is used to parse and model the [function templates](https://github.com/Azure/azure-webjobs-sdk-templates) provided by the [Azure Functions CLI Feed](https://aka.ms/funcCliFeedV4). The Functions CLI Feed provides a central location to get the latest version of all templates used for functions.
44

55
## Template Sources
66

@@ -24,9 +24,9 @@ Backup templates should be updated every time there is a major change in the lat
2424
2525
## Script Templates
2626

27-
Basic script templates (i.e. http and timer) are retrieved from the 'templates' property in each entry of the [CLI Feed](https://aka.ms/AAbbk68). More advanced templates (i.e. blob and cosmos) are retrieved from another feed specific to the extension bundle for that project. For example, the default bundle is 'Microsoft.Azure.Functions.ExtensionBundle' and the matching feed is https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/index-v2.json
27+
Basic script templates (i.e. http and timer) are retrieved from the 'templates' property in each entry of the [CLI Feed](https://aka.ms/funcCliFeedV4). More advanced templates (i.e. blob and cosmos) are retrieved from another feed specific to the extension bundle for that project. For example, the default bundle is 'Microsoft.Azure.Functions.ExtensionBundle' and the matching feed is https://cdn.functions.azure.com/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/index-v2.json
2828

29-
> NOTE: Both template feeds support 'staging' environments for us to test against before moving to production. The main CLI Feed uses a "vX-prerelease" tag, while the bundle feed has a completely different url leveraging "functionscdnstaging" instead of "functionscdn".
29+
> NOTE: Both template feeds support 'staging' environments for us to test against before moving to production. The main CLI Feed uses a "vX-prerelease" tag, while the bundle feed has a completely different url leveraging "cdn-staging.functions.azure.com" instead of "cdn.functions.azure.com ".
3030
3131
In both cases, the templates are split into three parts: templates.json, bindings.json, and resources.json. See below for an example of the schema for the TimerTrigger template:
3232

src/utils/bundleFeedUtils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export namespace bundleFeedUtils {
6868

6969
export async function getReleaseV2(templateVersion: string): Promise<ITemplatesReleaseV2> {
7070
// build the url ourselves because the index-v2.json file is no longer publishing version updates for v2 templates
71-
const functionsCdn: string = 'https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/';
71+
const functionsCdn: string = 'https://cdn.functions.azure.com/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/';
7272
return {
7373
functions: `${functionsCdn}${templateVersion}/StaticContent/v2/templates/templates.json`,
7474
bindings: `${functionsCdn}${templateVersion}/StaticContent/v2/bindings/userPrompts.json`,
@@ -113,10 +113,10 @@ export namespace bundleFeedUtils {
113113
let url: string;
114114
const templateProvider = ext.templateProvider.get(context);
115115
if (!envVarUri && bundleId === defaultBundleId && templateProvider.templateSource !== TemplateSource.Staging) {
116-
url = 'https://aka.ms/AA66i2x';
116+
url = 'https://aka.ms/bundleFeedUtilsV2';
117117
} else {
118-
const suffix: string = templateProvider.templateSource === TemplateSource.Staging ? 'staging' : '';
119-
const baseUrl: string = envVarUri || `https://functionscdn${suffix}.azureedge.net/public`;
118+
const suffix: string = templateProvider.templateSource === TemplateSource.Staging ? '-staging' : '';
119+
const baseUrl: string = envVarUri || `https://cdn${suffix}.functions.azure.com/public`;
120120
url = `${baseUrl}/ExtensionBundles/${bundleId}/index-v2.json`;
121121
}
122122

src/utils/cliFeedUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { localize } from '../localize';
1111
import { feedUtils } from './feedUtils';
1212

1313
export namespace cliFeedUtils {
14-
const funcCliFeedV4Url: string = 'https://aka.ms/AAbbk68';
14+
const funcCliFeedV4Url: string = 'https://aka.ms/funcCliFeedV4';
1515

1616
interface ICliFeed {
1717
tags: {

0 commit comments

Comments
 (0)