Additional review comments
Signed-off-by: R-Beck-2020 <78100403+R-Beck-2020@users.noreply.github.com>
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user