Additional review comments

Signed-off-by: R-Beck-2020 <78100403+R-Beck-2020@users.noreply.github.com>
This commit is contained in:
R-Beck-2020
2024-01-12 13:43:38 +00:00
parent c4f43d5cc8
commit 187b30b1ce
2 changed files with 18 additions and 2 deletions
+2 -2
View File
@@ -75,9 +75,9 @@ dev.azure.com/build-definition: <build-definition-name>
If your pipeline is in a different project to the source code, you will need to specify this in the project annotation.
```yaml
dev.azure.com/project-repo: <project1>/<my-repo>
dev.azure.com/project-repo: <project-with-source-code>/<my-repo>
dev.azure.com/build-definition: <build-definition-name>
dev.azure.com/project: <project2>
dev.azure.com/project: <project-with-build-code>
```
#### Azure Pipelines Only
@@ -18,6 +18,22 @@ import { Entity } from '@backstage/catalog-model';
import { getAnnotationValuesFromEntity } from './getAnnotationValuesFromEntity';
describe('getAnnotationValuesFromEntity', () => {
describe('without any annotations', () => {
it('should return ???', () => {
const entity: Entity = {
apiVersion: 'backstage.io/v1alpha1',
kind: 'Component',
metadata: {
namespace: 'default',
name: 'project-repo',
},
};
expect(() => getAnnotationValuesFromEntity(entity)).toThrow(
'Expected "dev.azure.com" annotations were not found',
);
});
});
describe('with valid project-repo annotation', () => {
it('should return project and repo', () => {
const entity: Entity = {