Azure branch support
This commit is contained in:
@@ -45,7 +45,7 @@ describe('AzurePreparer', () => {
|
||||
metadata: {
|
||||
annotations: {
|
||||
[LOCATION_ANNOTATION]:
|
||||
'url:https://dev.azure.com/backstage-org/backstage-project/_git/template-repo?path=%2Ftemplate.yaml',
|
||||
'url:https://dev.azure.com/backstage-org/backstage-project/_git/template-repo?path=%2Ftemplate.yaml&version=GBmaster',
|
||||
},
|
||||
name: 'graphql-starter',
|
||||
title: 'GraphQL Service',
|
||||
@@ -112,6 +112,7 @@ describe('AzurePreparer', () => {
|
||||
url:
|
||||
'https://dev.azure.com/backstage-org/backstage-project/_git/template-repo',
|
||||
dir: expect.any(String),
|
||||
ref: 'master',
|
||||
});
|
||||
});
|
||||
|
||||
@@ -124,6 +125,7 @@ describe('AzurePreparer', () => {
|
||||
url:
|
||||
'https://dev.azure.com/backstage-org/backstage-project/_git/template-repo',
|
||||
dir: expect.any(String),
|
||||
ref: 'master',
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ export class AzurePreparer implements PreparerBase {
|
||||
|
||||
const parsedGitLocation = parseGitUrl(location);
|
||||
const repositoryCheckoutUrl = parsedGitLocation.toString('https');
|
||||
const ref = parsedGitLocation.ref;
|
||||
const tempDir = await fs.promises.mkdtemp(
|
||||
path.join(workingDirectory, templateId),
|
||||
);
|
||||
@@ -63,6 +64,7 @@ export class AzurePreparer implements PreparerBase {
|
||||
|
||||
await git.clone({
|
||||
url: repositoryCheckoutUrl,
|
||||
ref: ref,
|
||||
dir: tempDir,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user