Open benjdlambert opened 2 months ago
Hi,
I'm currently trying to set up a dev environment for the Jenkins plugin. To do that, I mainly copied from the linguist
plugin that @awanlin used to create a sample. I copied all the stuff, created a very simple Backstage app and everything seems to be working fine. I can run frontend & backend separately or just start the full Backstage app with yarn dev
. When doing the latter, the app starts & shows me my entities. It only starts to fail when adding the EntityJenkinsRunCard
to the EntityPage.tsx
:
<Grid item md={6}>
<EntityLatestJenkinsRunCard
branch="main,master"
variant="gridItem"
/>
</Grid>
As soon as the EntityJenkinsRunCard
is added, I get the below error in the UI (nothing in the logs though). No matter if the Jenkins annotation is defined or not.
TypeError
Cannot read properties of null (reading 'useContext')
Do you have an idea what could be going on here? Once I manage to resolve this issue, I can contribute the dev setup for Jenkins :)
EDIT: I'm sorry, I didn't check other issues first because I assumed that I did something wrong. I now did that and my problems could be related to https://github.com/backstage/community-plugins/issues/501
Hi @KatharinaSick, thank you for looking into this 🙏 Could you share a branch so that we can look better at the issue?
Of course! Thank you :slightly_smiling_face: I pushed everything to https://github.com/KatharinaSick/backstage-community-plugins/tree/jenkins-dev-env
In my app-config.local.yaml
I just have the Jenkins configuration:
jenkins:
baseUrl: https://jenkins-instance.com
username: xxx
apiKey: xxx
Of course! Thank you 🙂 I pushed everything to https://github.com/KatharinaSick/backstage-community-plugins/tree/jenkins-dev-env
In my
app-config.local.yaml
I just have the Jenkins configuration:jenkins: baseUrl: https://jenkins-instance.com username: xxx apiKey: xxx
@KatharinaSick I think the issue was due to a mismatch on the installed dependencies. Running yarn dedupe
in workspace/jenkins
should fix the issue
Of course! Thank you 🙂 I pushed everything to https://github.com/KatharinaSick/backstage-community-plugins/tree/jenkins-dev-env
In my
app-config.local.yaml
I just have the Jenkins configuration:jenkins: baseUrl: https://jenkins-instance.com username: xxx apiKey: xxx
Hello @KatharinaSick when will you make a pull request on the backstage-comunity repository?
Thanks a lot for your help @vinzscam! :slightly_smiling_face: I just opened a PR.
I'm sorry that it took so long. I was on vacation and then got sick, that's why I was offline for so long.
Thanks a lot for your help @vinzscam! 🙂 I just opened a PR.
I'm sorry that it took so long. I was on vacation and then got sick, that's why I was offline for so long.
No worries, thank you so much for dedicating your time to this, I hope you feel better!
Since we moved over the plugins from
backstage/backstage
the migrated plugins maybe do not already have a dev setup.For a start, we should ensure that all workspaces, and their plugins have the ability to start standalone using
yarn start
.This means copying implementations and prior art from
backstage/backstage
like the following:auth backend
src/dev/index.ts
home frontend
src/dev/index.tsx
Once we have done a few PR's and have examples, this ticket might turn into a
good first issue
.