Added a TODO task as the code using while condition is failing like a mention to pass the branch name to the catalogInfoPath

Signed-off-by: cmoulliard <cmoulliard@redhat.com>
This commit is contained in:
cmoulliard
2024-01-04 18:16:26 +01:00
parent 39bc3d0d7d
commit 1a49b1d137
2 changed files with 15 additions and 1 deletions
@@ -48,6 +48,8 @@ integrations:
**NOTE**: As backstage will issue HTTPS/TLS requests to the gitea instance, it is needed to configure `gitea` with a valid certificate or at least with a
self-signed certificate `gitea cert --host localhost -ca`. Don't forget to set the env var `NODE_EXTRA_CA_CERTS` to point to the CA pem file before to launch backstage !
**WARNING**: Please pass the branch name part of the `catalogInfoPath` for the action `register` till we will fix this issue (e.g `main/catalog-info.yaml`) !
When done, you can use the action in your template:
```yaml
@@ -147,7 +149,7 @@ spec:
action: catalog:register
input:
repoContentsUrl: ${{ steps['publish'].output.repoContentsUrl }}
catalogInfoPath: '/catalog-info.yaml'
catalogInfoPath: 'main/catalog-info.yaml'
output:
links:
@@ -302,6 +302,16 @@ export function createPublishGiteaAction(options: {
gitAuthorInfo,
});
/*
TODO: This code is commented till it will be fixed.
When we use the code hereafter, we got the following error:
"Unable to read url, Error: Unknown encoding: undefined\n at DefaultLocationService.processEntities"
as commented here: Still getting the error: https://github.com/backstage/backstage/pull/21890#issuecomment-1876733870
Such an issue do not exist using sleep 3s.
WARNING: To allow to register within the catalog the new project, it is also needed to pass within the catalogInfoPath the branch name (e.g: main/catalog-info.yaml)
// Check if the repo is available
let response: Response;
response = await checkGiteaOrgRepo(integrationConfig.config, {
@@ -317,6 +327,8 @@ export function createPublishGiteaAction(options: {
defaultBranch,
});
}
*/
await sleep(3000);
const repoContentsUrl = `${integrationConfig.config.baseUrl}/${owner}/${repo}/+/refs/${defaultBranch}`;
ctx.output('remoteUrl', remoteUrl);