From 1eaf9db0d64e286fc4bf27094373b4a4e75240ac Mon Sep 17 00:00:00 2001 From: Florent Benoit Date: Tue, 25 May 2021 16:28:48 +0200 Subject: [PATCH] fix(convert): When converting devfile v1 to v2, registryUrl attribute is forgotten Related to https://github.com/eclipse/che/issues/19829 Change-Id: Ia7dd9aec31f0c6b5326c4d645bfbf4f87ac8e69e Signed-off-by: Florent Benoit --- .../src/node/che-server-devfile-service-impl.ts | 4 ++++ .../tests/_data/devfile-go-v1.yaml | 1 + 2 files changed, 5 insertions(+) diff --git a/extensions/eclipse-che-theia-remote-impl-che-server/src/node/che-server-devfile-service-impl.ts b/extensions/eclipse-che-theia-remote-impl-che-server/src/node/che-server-devfile-service-impl.ts index 889673341..dca93c56d 100644 --- a/extensions/eclipse-che-theia-remote-impl-che-server/src/node/che-server-devfile-service-impl.ts +++ b/extensions/eclipse-che-theia-remote-impl-che-server/src/node/che-server-devfile-service-impl.ts @@ -321,6 +321,10 @@ export class CheServerDevfileServiceImpl implements DevfileService { if (componentV1.reference) { devfileV2Component.plugin.url = componentV1.reference; } + if (componentV1.registryUrl) { + devfileV2Component.plugin.registryUrl = componentV1.registryUrl; + } + if (componentV1.cpuLimit) { devfileV2Component.plugin.cpuLimit = componentV1.cpuLimit; } diff --git a/extensions/eclipse-che-theia-remote-impl-che-server/tests/_data/devfile-go-v1.yaml b/extensions/eclipse-che-theia-remote-impl-che-server/tests/_data/devfile-go-v1.yaml index 9c4a8b8a5..71444343a 100644 --- a/extensions/eclipse-che-theia-remote-impl-che-server/tests/_data/devfile-go-v1.yaml +++ b/extensions/eclipse-che-theia-remote-impl-che-server/tests/_data/devfile-go-v1.yaml @@ -17,6 +17,7 @@ projects: components: - type: chePlugin id: golang/go/latest + registryUrl: https://my-registry.fake alias: go-plugin memoryLimit: 512Mi env: