backstage update tutorial, part 2

This commit is contained in:
Christopher Hase 2025-04-24 13:40:17 +02:00
parent 97a09ce1b3
commit 4ed3dc8d2a

View file

@ -2,6 +2,8 @@
title: Backstage Update Tutorial title: Backstage Update Tutorial
--- ---
The first Backstage update was performed as described in the ticket https://jira.telekom-mms.com/browse/IPCEICIS-2299 from version 1.28 to version 1.36.1.
This document provides a detailed guide on the process to update Backstage locally on your machine from version 1.36.1 to 1.38.1. This document provides a detailed guide on the process to update Backstage locally on your machine from version 1.36.1 to 1.38.1.
Later updates can be performed accordingly. (The fixing of deprecated imports should not be necessary, again.) Later updates can be performed accordingly. (The fixing of deprecated imports should not be necessary, again.)
@ -17,7 +19,7 @@ Later updates can be performed accordingly. (The fixing of deprecated imports sh
Before you start, make sure you have the following installed on your machine: Before you start, make sure you have the following installed on your machine:
1. **Node.js**: Backstage requires Node.js. You can download it from the [Node.js website](https://nodejs.org/). It is recommended to use the LTS version. 1. **Node.js**: Backstage requires Node.js. You can download it from the [Node.js website](https://nodejs.org/).
2. **Yarn**: Backstage uses Yarn as its package manager. 2. **Yarn**: Backstage uses Yarn as its package manager.
3. **Git** 3. **Git**
4. **Docker** 4. **Docker**
@ -26,7 +28,7 @@ Before you start, make sure you have the following installed on your machine:
To download the latest version of our Backstage-EDP app, use git to clone it from the OSC repository at https://forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/DevFW-CICD/backstage-edp.git. To download the latest version of our Backstage-EDP app, use git to clone it from the OSC repository at https://forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/DevFW-CICD/backstage-edp.git.
Make sure yarn ist installed locally. In the project path run: Make sure yarn ist installed locally. If it hasn't been installed yet, run in the project path:
```bash ```bash
yarn install yarn install
``` ```
@ -42,11 +44,11 @@ This will update all relevant components to the newest versions.
## Fix deprecated import <a name="fix-deprecated-import"></a> ## Fix deprecated import <a name="fix-deprecated-import"></a>
In a text editor of your choice open the file '/backstage-edp/packages/backend/src/plugins/proxy.ts' and implement the two following changes. In a text editor of your choice open the file <I>'/backstage-edp/packages/backend/src/plugins/proxy.ts'</I> and implement the two following changes.
### Update import ### Update import
First, replace the deprecated import First (due to changes in the library) replace the deprecated import
```typescript ```typescript
import { createRouter } from '@backstage/plugin-proxy-backend'; import { createRouter } from '@backstage/plugin-proxy-backend';
@ -60,7 +62,7 @@ with the following import:
### Update method call createRouter() ### Update method call createRouter()
Secondly replace the deprecated call of method createRouter() Secondly (due to a changed signature) replace the <B>old</B> call of method createRouter()
```typescript ```typescript
return await createRouter({ return await createRouter({
@ -70,7 +72,7 @@ Secondly replace the deprecated call of method createRouter()
}); });
``` ```
with the following call of method createRouter(): with the following <B>new</B> method call:
```typescript ```typescript
return await createRouter({ return await createRouter({