Jira integration in Backstage giving 404 error - annotations

I'm currently testing Backstage for my company, and I tried various continuous integration pipelines like Github, Jira, Jenkins, and more. But I'm facing an issue with the Jira plugin. Maybe it's just a bad setup.
In my component, I can see the Jira entity, but every time, it says:
failed to fetch data, status 404: Not Found
When I look in the browser's console (network), I can see this 404, and this is the query used:
http://localhost:7007/api/proxy/jira/api/rest/api/latest/project/undefined
Why do I have undefined? Is it because the jira/project-key variable is not at the right place? Actually, it's in the catalog-info.yaml under metadata.
I followed all documentation I could find, but one section is not enough clear for me. It's about the annotations thing. It says `Add annotation to the yaml config file of a component. I created a component yesterday, but I don't see any file for it.
Thanks in advance.

Ok, I found the solution.
In the documentation, the file, called catalog-info.yaml, is not the one at the Backstage repository's root, but to a file in a different repository that will be used as component template in Backstage.
If you create a new repository (ex a fork from Symfony), you will have to add the file catalog-info.yaml with various informations if you want to use this repository as template for your projects.

Related

Is there a way to import GitHub issues to JIRA?

My team use Jira and we often work with open source software which are hosted on GitHub.
I often get request from my PM to update the status which can sometimes easily be followed using the GitHub public issue openend on one of those open source project.
Is there a way I can link a GitHub issue to a Jira ticket and sync all the GitHub comment in this Jira ticket ?
Answer is yes, it is.
If you want some manual import, you can check this Atlassian Community post.
As explained in here, you can perform with applying following steps:
Get list of issues in JSON format using following link from the browser
https://api.github.com/repos/\<repo-owner-name>/<repo-name>/issues?state:open
Convert JSON to CSV using any online converter
User Jira's External system import > choose CSV and upload the file.
Or, if you are looking for some programmatic way, you can check following page on zmccdn.

Merge multiple projects into single project TFS/ADO

I was exploring following GitHub page to understand the migration and merge of projects from Azure DevOps Server to Azure DevOps Services
https://github.com/nkdAgility/azure-devops-migration-tools
I see in the documentation, the following feature was mentioned. But, unfortunately, I could not see any relevant documentation for the same. Please help with this.
Merge many projects into a single project
You do it through the configuration file as part of the tool. It requires tinkering and trial and error to get it working but is a very useful. In the config file you state a source and a target and the amend the parama you want and then run the tool. It not very well documented though but is still a powerful tool.

"Site has not yet been deployed" after netlify deployment

I already tried a million times and not able to figure out where I am going wrong. I tried simple static website repo. I even added parcel bundler. I just get same error message.
I even forked netlify's own demo repo. And I got same message. Why I am not able to deploy the site?
I looked at forums, blogs and even answer in this forum and I am not finding clue to this exact message. I didn't have netlify.toml file. I added that file too and I don't see any change in deployment status.
Initially I was trying to just create site online by connecting to GitHub repo. When I tried Netlify-CLI I could see some deploy action happen. But server was not render. Found a guide here: https://github.com/Tanu-N-Prabhu/Multiplication-Table-App
Followed last 3 steps under Deployment section:
Go to your Netlify Dashboard to the project. Click on Site has not yet been Deployed. Again click on Deploy Preview this will unlock the Preview Deploy which is a temporary URL.
After viewing the Preview, click on Publish deploy option to deploy your project.
Now your project is live and deployed on the internet.
These steps worked. But Javascript files were not rendering. I wonder why the whole process is so cumbersome when they advertise everything is taken care by Netlify automatically? There is no document for Site has not yet been deployed on their site and google search only leads me to Page not found forum page.
You must add the --prod.
The command should look like this: netlify deploy --prod.
This fixed it for me.

How to display a VSTS Build Badge in a README.md file hosted on GitHub?

I have developed a tiny library that I chose to host on GitHub. The code is being built by a VSTS build and published as a NuGet package.
I have written a README.md file and I am trying to include a Build badge on it, as described in the Microsoft documentation. Consequently, I have added the following line in the MD file and replaced the placeholders accordindly:
![Build status](https://{my-organisation}.visualstudio.com/{my-project}/_apis/build/status/{my-build-definition-name}?branch=master)
The problem is that the link is not accessible to anyone that is not logged-in on VSTS and I end up with a 'broken' link on my readme page:
Question
What must be done to make the VSTS Build Badge available to a GitHub repo?
I suppose you must include an authentication token of sorts in order to have at least read-access to the VSTS build from your GitHub page.
Note that the documentation lists also multiple pending issues, including MicrosoftDocs/vsts-docs issue 1499:
Build status badge added to GitHub readme doesn't show up.
So this is still in progress.
On that last issue, it says:
This is due to public vs. private projects.
If you make your project public the image URL will render.
There are other potential workarounds we are looking at for the doc.
See "Change the project visibility, public or private".

Is there a way to import Jira issues to GitHub?

I've tried exporting issues from both GitHub and Jira to CSV files, but I've never tried exporting Jira issue then importing it to GitHub, is this possible? If so, what would be the best way to approach something like this?
There is simply not a "Import issues from JIRA" feature in GitHub.
The way I see it you have two options, either to integrate your current JIRA instance with GitHub or migrate the JIRA issues into GitHub issues using your own criteria and migration script.
GitHub and JIRA Integration
I would very much like to add all the instructions here but it's one of those cases where a link to the documentation makes much more sense.
There's also a video on youtube which is quite short and easy to follow.
Migrating JIRA issues into GitHub Issues
In order to do this you would have to write your own script that reads issues from the JIRA REST API and creates new ones using GitHub Issues REST API.
Note that JIRA and GitHub issues are different in nature, so your script would have to choose how to migrate one type of issue to another.
I hope this helps.
Another way is to export the JIRA issues as XML file.
The following project provides Python 2 scripts to import such a file into a GitHub project via its REST API:
https://github.com/hbrands/jira-issues-importer
Besides issues with comments, it imports milestones, labels and components as labels. References to issues in comments are to some degree converted. Also, JIRA relationships like "blocks" and "depends on" are migrated to special issue comments in GitHub.
It avoids the problem of running into abuse rate limits by using a special Issue Import API.
Please read the sections about the features, caveats, assumptions and prerequisites on the project site. Be sure to test the issue migration with a GitHub test project first.
Here are the things you need to do for export from JIRA and import to GitHub.
First export issues (to a csv file) from JIRA with the feilds you need.
Then read the csv file line by line and use the github api to create issue in GH.
https://github.com/susinda/github-client/blob/master/src/main/java/org/wso2/git/client/GitRestApiExecutor.java
Here is a sample client to do the job[1], readme contains the steps,feel free to modify it and use if that does not match with your requirement https://github.com/susinda/github-client
Try this node module https://github.com/gavinr/github-csv-tools, need to download issue form Jira and use this to upload on GitHub.
https://github.com/parcelLab/jira-to-github is a (pretty old) project to migrate JIRA issues to Github.
Export the issues from JIRA
First, create a full export to XML as described in this guide:
https://confluence.atlassian.com/adminjiracloud/exporting-issues-776636787.html
You'll need the exported entities.xml from JIRA to upload the
issues to your GitHub repository using the GitHub API.
Run the import to GitHub
Run node index.js to use the script