From a2482fca8e8fe4ad6943ce0ff267d6603712aded Mon Sep 17 00:00:00 2001 From: Florent Benoit Date: Tue, 23 Feb 2021 16:03:49 +0100 Subject: [PATCH 01/11] chore(build): Do not build plugin-registry image PR check when only sidecar files are modified Change-Id: I09a09849c885256e1fba2c5c3c2f2632edd2e4f0 Signed-off-by: Florent Benoit --- .github/workflows/image-build-pr-check.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/image-build-pr-check.yml b/.github/workflows/image-build-pr-check.yml index 712aa981fc..1023aa6f1c 100644 --- a/.github/workflows/image-build-pr-check.yml +++ b/.github/workflows/image-build-pr-check.yml @@ -9,7 +9,15 @@ name: Image Build PR check -on: [push, pull_request] +on: + pull_request: + paths: + - '**/*' + - '!sidecars/**' + push: + paths: + - '**/*' + - '!sidecars/**' jobs: image-build: From 5bab021b38a40ae5d448b605973baf45b2e8aa0f Mon Sep 17 00:00:00 2001 From: Florent Benoit Date: Tue, 23 Feb 2021 18:28:08 +0100 Subject: [PATCH 02/11] Revert "chore(build): Do not build plugin-registry image PR check when only sidecar files are modified" This reverts commit ba7cb6541e266ee81558a3ace1eb1030e80cb794. --- .github/workflows/image-build-pr-check.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/image-build-pr-check.yml b/.github/workflows/image-build-pr-check.yml index 1023aa6f1c..712aa981fc 100644 --- a/.github/workflows/image-build-pr-check.yml +++ b/.github/workflows/image-build-pr-check.yml @@ -9,15 +9,7 @@ name: Image Build PR check -on: - pull_request: - paths: - - '**/*' - - '!sidecars/**' - push: - paths: - - '**/*' - - '!sidecars/**' +on: [push, pull_request] jobs: image-build: From dea9101ad1d696020c7dc9d1afbf621a392dd050 Mon Sep 17 00:00:00 2001 From: Florent BENOIT Date: Wed, 24 Feb 2021 19:08:09 +0100 Subject: [PATCH 03/11] feat(digest): Skip digest when the sha1 of an image is the one of the current commit (#859) Change-Id: Ic80f4289c9e2274936913732e4ba6c8c7577e33a Signed-off-by: Florent Benoit --- tools/build/src/registry/registry-helper.ts | 22 ++++++++++++++++++- .../tests/registry/registry-helper.spec.ts | 15 +++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/tools/build/src/registry/registry-helper.ts b/tools/build/src/registry/registry-helper.ts index ad6d7fd009..e16248c79e 100644 --- a/tools/build/src/registry/registry-helper.ts +++ b/tools/build/src/registry/registry-helper.ts @@ -10,8 +10,10 @@ import * as crypto from 'crypto'; +import { injectable, postConstruct } from 'inversify'; +import simpleGit, { SimpleGit } from 'simple-git'; + import Axios from 'axios'; -import { injectable } from 'inversify'; import { parse } from 'docker-image-name-parser'; /** @@ -19,6 +21,20 @@ import { parse } from 'docker-image-name-parser'; */ @injectable() export class RegistryHelper { + private shortSha1: string; + private git: SimpleGit; + + constructor() { + // reduce concurrent processes + this.git = simpleGit({ maxConcurrentProcesses: 1 }); + } + + @postConstruct() + async init(): Promise { + const sha1 = await this.git.revparse(['HEAD']); + this.shortSha1 = sha1.substring(0, 7); + } + async getImageDigest(imageName: string): Promise { if (imageName.startsWith('docker.io')) { imageName = imageName.replace('docker.io', 'index.docker.io'); @@ -30,6 +46,10 @@ export class RegistryHelper { if (dockerImageName.tag === 'nightly' || dockerImageName.tag === 'next') { return imageName; } + // do not grab digest of an image that is being published (if tag contains the current sha1) + if (dockerImageName.tag && dockerImageName.tag.includes(this.shortSha1)) { + return imageName; + } const uri = `https://${dockerImageName.host}/v2/${dockerImageName.remoteName}/manifests/${dockerImageName.tag}`; diff --git a/tools/build/tests/registry/registry-helper.spec.ts b/tools/build/tests/registry/registry-helper.spec.ts index f00fa9621c..86365b8db7 100644 --- a/tools/build/tests/registry/registry-helper.spec.ts +++ b/tools/build/tests/registry/registry-helper.spec.ts @@ -17,6 +17,7 @@ import Axios from 'axios'; import { Container } from 'inversify'; import { RegistryHelper } from '../../src/registry/registry-helper'; import { parse } from 'docker-image-name-parser'; +import simpleGit from 'simple-git'; jest.unmock('axios'); @@ -120,4 +121,18 @@ describe('Test RegistryHelper', () => { expect(axiosGet).toBeCalledTimes(0); expect(axiosHead).toBeCalledTimes(0); }); + + test('basics with current sha1', async () => { + const git = simpleGit({ maxConcurrentProcesses: 1 }); + const sha1 = await git.revparse(['HEAD']); + const shortSha1 = sha1.substring(0, 7); + + const axiosGet = jest.spyOn(Axios, 'get') as jest.Mock; + const imageName = `fake-docker-registry.com/dummy-org/dummy-image:go-${shortSha1}`; + const axiosHead = jest.spyOn(Axios, 'head') as jest.Mock; + const updatedImageName = await registryHelper.getImageDigest(imageName); + expect(updatedImageName).toBe(imageName); + expect(axiosGet).toBeCalledTimes(0); + expect(axiosHead).toBeCalledTimes(0); + }); }); From 9effcd7a5a5baa762ccb8f9ee256a5542dc6c1be Mon Sep 17 00:00:00 2001 From: Vitaliy Gulyy Date: Wed, 24 Feb 2021 20:14:38 +0200 Subject: [PATCH 04/11] Mermaid markdown preview and syntax highlight (#856) * Mermaid markdown preview and syntax highlight Signed-off-by: Vitaliy Gulyy * Combine Mermaid markdown preview and Mermaid syntas highlight extensions into one entry Signed-off-by: Vitaliy Gulyy --- che-theia-plugins.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/che-theia-plugins.yaml b/che-theia-plugins.yaml index be5aeed301..5460827520 100644 --- a/che-theia-plugins.yaml +++ b/che-theia-plugins.yaml @@ -741,3 +741,11 @@ plugins: extensions: - >- https://download.jboss.org/jbosstools/vscode/3rdparty/vscode-eslint/vscode-eslint-2.1.1-1e15d3.vsix + - repository: + url: 'https://github.com/mjbvz/vscode-markdown-mermaid' + revision: 1.9.2 + extensions: + - >- + https://github.com/redhat-developer/codeready-workspaces-vscode-extensions/releases/download/vf278912/vscode-markdown-mermaid-1.9.2.vsix + - >- + https://github.com/redhat-developer/codeready-workspaces-vscode-extensions/releases/download/vf278912/vscode-mermaid-syntax-highlight-d4247b5feadd92d429d69a6b511f5ed0e1011895.vsix From b1d8d98051f562af2cc792d641d5daf8d24a7802 Mon Sep 17 00:00:00 2001 From: che-bot <39771996+che-bot@users.noreply.github.com> Date: Wed, 24 Feb 2021 19:17:17 +0100 Subject: [PATCH 05/11] [release] Add 7.26.2 plugins in master (#858) Signed-off-by: Mykhailo Kuznietsov Co-authored-by: Mykhailo Kuznietsov --- che-editors.yaml | 6 +++--- che-plugins.yaml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/che-editors.yaml b/che-editors.yaml index 42dabcf9d0..9d26969269 100644 --- a/che-editors.yaml +++ b/che-editors.yaml @@ -101,7 +101,7 @@ editors: value: /remote-endpoint/plugin-remote-endpoint - name: REMOTE_ENDPOINT_VOLUME_NAME value: remote-endpoint - - id: eclipse/che-theia/7.26.1 + - id: eclipse/che-theia/7.26.2 title: Eclipse Theia displayName: theia-ide description: Eclipse Theia @@ -165,7 +165,7 @@ editors: discoverable: false containers: - name: theia-ide - image: "quay.io/eclipse/che-theia:7.26.1" + image: "quay.io/eclipse/che-theia:7.26.2" env: - name: THEIA_PLUGINS value: local-dir:///plugins @@ -190,7 +190,7 @@ editors: memoryLimit: "512M" initContainers: - name: remote-runtime-injector - image: "quay.io/eclipse/che-theia-endpoint-runtime-binary:7.26.1" + image: "quay.io/eclipse/che-theia-endpoint-runtime-binary:7.26.2" volumeMounts: - name: remote-endpoint path: "/remote-endpoint" diff --git a/che-plugins.yaml b/che-plugins.yaml index 5658a1f6cc..752d85ed20 100644 --- a/che-plugins.yaml +++ b/che-plugins.yaml @@ -130,7 +130,7 @@ plugins: - /go/bin/che-machine-exec - '--url' - '127.0.0.1:4444' - - id: eclipse/che-machine-exec-plugin/7.26.1 + - id: eclipse/che-machine-exec-plugin/7.26.2 displayName: Che machine-exec Service description: >- Che Plug-in with che-machine-exec service to provide creation terminal or @@ -149,7 +149,7 @@ plugins: cookiesAuthEnabled: true containers: - name: che-machine-exec - image: 'quay.io/eclipse/che-machine-exec:7.26.1' + image: 'quay.io/eclipse/che-machine-exec:7.26.2' ports: - exposedPort: 4444 command: From 92ea17b3e670fd03267ff5c0c432d7bae9715ad3 Mon Sep 17 00:00:00 2001 From: Florent Benoit Date: Thu, 25 Feb 2021 10:26:33 +0100 Subject: [PATCH 06/11] chore(build): Do not use rev-parse HEAD as on github we may have some extra HEAD on PR Using the log info, we're sure it's about the current commit --- tools/build/src/registry/registry-helper.ts | 16 +++++++++-- .../tests/registry/registry-helper.spec.ts | 28 ++++++++++++++----- 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/tools/build/src/registry/registry-helper.ts b/tools/build/src/registry/registry-helper.ts index e16248c79e..f32e0e517b 100644 --- a/tools/build/src/registry/registry-helper.ts +++ b/tools/build/src/registry/registry-helper.ts @@ -31,8 +31,17 @@ export class RegistryHelper { @postConstruct() async init(): Promise { - const sha1 = await this.git.revparse(['HEAD']); - this.shortSha1 = sha1.substring(0, 7); + const gitRootDirectory = await this.git.revparse(['--show-toplevel']); + const logOptions = { + format: { hash: '%H' }, + file: gitRootDirectory, + // keep only one result + n: '1', + }; + const result = await this.git.log(logOptions); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const hash = (result.latest as any).hash; + this.shortSha1 = hash.substring(0, 7); } async getImageDigest(imageName: string): Promise { @@ -48,6 +57,9 @@ export class RegistryHelper { } // do not grab digest of an image that is being published (if tag contains the current sha1) if (dockerImageName.tag && dockerImageName.tag.includes(this.shortSha1)) { + console.log( + `Do not fetch digest for ${imageName} as the tag ${dockerImageName.tag} includes the current sha1 ${this.shortSha1}` + ); return imageName; } diff --git a/tools/build/tests/registry/registry-helper.spec.ts b/tools/build/tests/registry/registry-helper.spec.ts index 86365b8db7..7f6f1bd090 100644 --- a/tools/build/tests/registry/registry-helper.spec.ts +++ b/tools/build/tests/registry/registry-helper.spec.ts @@ -20,21 +20,24 @@ import { parse } from 'docker-image-name-parser'; import simpleGit from 'simple-git'; jest.unmock('axios'); +const git = simpleGit({ maxConcurrentProcesses: 1 }); describe('Test RegistryHelper', () => { let container: Container; let registryHelper: RegistryHelper; - beforeEach(() => { - jest.restoreAllMocks(); - jest.resetAllMocks(); + beforeAll(() => { container = new Container(); - container.bind(RegistryHelper).toSelf().inSingletonScope(); registryHelper = container.get(RegistryHelper); }); + beforeEach(() => { + jest.restoreAllMocks(); + jest.resetAllMocks(); + }); + test('parser full', async () => { const image = parse('quay.io/eclipse/foo:tag'); expect(image.host).toBe('quay.io'); @@ -123,9 +126,20 @@ describe('Test RegistryHelper', () => { }); test('basics with current sha1', async () => { - const git = simpleGit({ maxConcurrentProcesses: 1 }); - const sha1 = await git.revparse(['HEAD']); - const shortSha1 = sha1.substring(0, 7); + const gitRootDirectory = await git.revparse(['--show-toplevel']); + const logOptions = { + format: { hash: '%H' }, + file: gitRootDirectory, + // keep only one result + n: '1', + }; + const result = await git.log(logOptions); + const latest = result.latest; + if (!latest) { + throw new Error(`Unable to find result when executing ${JSON.stringify(logOptions)}`); + } + const hash = latest.hash; + const shortSha1 = hash.substring(0, 7); const axiosGet = jest.spyOn(Axios, 'get') as jest.Mock; const imageName = `fake-docker-registry.com/dummy-org/dummy-image:go-${shortSha1}`; From 92200bf5390b81c20738df2b93f79d1fe5d71496 Mon Sep 17 00:00:00 2001 From: Sun Seng David TAN Date: Wed, 24 Feb 2021 17:13:12 +0100 Subject: [PATCH 07/11] feat(lombok): making lombok.jar available to java sidecar Signed-off-by: Sun Seng David TAN --- sidecars/java/Dockerfile | 3 +++ sidecars/java8/Dockerfile | 3 +++ 2 files changed, 6 insertions(+) diff --git a/sidecars/java/Dockerfile b/sidecars/java/Dockerfile index 6dcac03233..3d98444d81 100644 --- a/sidecars/java/Dockerfile +++ b/sidecars/java/Dockerfile @@ -11,6 +11,7 @@ FROM alpine:3.12.1 ENV HOME=/home/theia +ENV LOMBOK_VERSION=1.18.18 RUN mkdir /projects ${HOME} && \ # Change permissions to let any arbitrary user @@ -24,6 +25,8 @@ RUN apk --no-cache add openjdk11 --repository=http://dl-cdn.alpinelinux.org/alpi ENV JAVA_HOME /usr/lib/jvm/default-jvm/ ADD etc/before-start.sh /before-start.sh +RUN wget -O ${HOME}/lombok.jar https://projectlombok.org/downloads/lombok-${LOMBOK_VERSION}.jar + WORKDIR /projects ADD etc/entrypoint.sh /entrypoint.sh diff --git a/sidecars/java8/Dockerfile b/sidecars/java8/Dockerfile index c777aa540d..d6b8e519ac 100644 --- a/sidecars/java8/Dockerfile +++ b/sidecars/java8/Dockerfile @@ -11,6 +11,7 @@ FROM alpine:3.10.2 ENV HOME=/home/theia +ENV LOMBOK_VERSION=1.18.18 RUN mkdir /projects ${HOME} && \ # Change permissions to let any arbitrary user @@ -25,6 +26,8 @@ ADD etc/before-start.sh /before-start.sh ADD etc/entrypoint.sh /entrypoint.sh +RUN wget -O ${HOME}/lombok.jar https://projectlombok.org/downloads/lombok-${LOMBOK_VERSION}.jar + WORKDIR /projects ENTRYPOINT ["/entrypoint.sh"] From a8664025b9e3c94ed22e24d9ed0ea71ce3fce9bc Mon Sep 17 00:00:00 2001 From: Eric Williams Date: Thu, 25 Feb 2021 13:59:51 -0500 Subject: [PATCH 08/11] Bump copyright headers to 2021 (#846) Signed-off-by: Eric Williams --- .ci/cico-happy-path-pr-test.sh | 2 +- .ci/cico-plugin-registry-pr-test.sh | 2 +- .ci/digest-validation-pr.sh | 2 +- .ci/language-tests-runner.py | 2 +- .ci/sidecar-build-publish.sh | 2 +- .eslintrc.js | 2 +- .github/workflows/build-jobs.yml | 2 +- .github/workflows/image-build-pr-check.yml | 2 +- .github/workflows/pr-checks.yml | 2 +- .github/workflows/publish-content-push-main.yml | 2 +- .github/workflows/publish-plugin-report.yaml | 2 +- .github/workflows/publish-pr-check-content.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/shellcheck-pr-check.yml | 2 +- .github/workflows/sidecar-build-push.yaml | 2 +- .github/workflows/sidecar-pr-checks.yaml | 2 +- .github/workflows/typescript-pr-check.yml | 2 +- build/dockerfiles/entrypoint.sh | 2 +- build/dockerfiles/rhel.entrypoint.sh | 2 +- build/dockerfiles/rhel.install.sh | 2 +- cico_build_ci.sh | 2 +- cico_build_nightly.sh | 2 +- cico_build_release.sh | 2 +- cico_functions.sh | 2 +- deploy/kubernetes/che-plugin-registry/Chart.yaml | 2 +- deploy/kubernetes/che-plugin-registry/templates/configmap.yaml | 2 +- deploy/kubernetes/che-plugin-registry/templates/deployment.yaml | 2 +- deploy/kubernetes/che-plugin-registry/templates/ingress.yaml | 2 +- deploy/kubernetes/che-plugin-registry/templates/service.yaml | 2 +- deploy/kubernetes/che-plugin-registry/values.yaml | 2 +- deploy/openshift/che-plugin-registry.yml | 2 +- tools/automation/.ci/publish-report.sh | 2 +- tools/automation/src/check-plugin-updates.ts | 2 +- tools/automation/tests/pr-check.spec.ts | 2 +- tools/build/__mocks__/decompress.ts | 2 +- tools/build/__mocks__/fs-extra.ts | 2 +- tools/build/src/che-plugin/che-plugins-analyzer.ts | 2 +- tools/build/src/che-plugin/che-plugins-meta-info.ts | 2 +- tools/build/src/che-plugin/che-plugins-meta-yaml-generator.ts | 2 +- tools/build/src/che-plugin/che-plugins-module.ts | 2 +- tools/build/src/che-plugin/che-plugins-yaml.ts | 2 +- .../src/che-theia-plugin/che-theia-plugin-analyzer-meta-info.ts | 2 +- tools/build/src/che-theia-plugin/che-theia-plugin-module.ts | 2 +- tools/build/src/che-theia-plugin/che-theia-plugins-analyzer.ts | 2 +- tools/build/src/che-theia-plugin/che-theia-plugins-yaml.ts | 2 +- tools/build/src/common/common-endpoint-yaml.ts | 2 +- tools/build/src/common/common-env-yaml.ts | 2 +- tools/build/src/common/common-module.ts | 2 +- tools/build/src/common/common-volume-mount-yaml.ts | 2 +- tools/build/src/common/volume-mount-helper.ts | 2 +- tools/build/src/editor/che-editors-analyzer.ts | 2 +- tools/build/src/editor/che-editors-meta-info.ts | 2 +- tools/build/src/editor/che-editors-meta-yaml-generator.ts | 2 +- tools/build/src/editor/che-editors-yaml.ts | 2 +- tools/build/src/editor/editor-module.ts | 2 +- tools/build/src/entrypoint.ts | 2 +- tools/build/src/extensions/extension-module.ts | 2 +- tools/build/src/extensions/vsix-download.ts | 2 +- tools/build/src/extensions/vsix-info.ts | 2 +- tools/build/src/extensions/vsix-read-info.ts | 2 +- tools/build/src/extensions/vsix-unpack.ts | 2 +- tools/build/src/extensions/vsix-url-analyzer.ts | 2 +- tools/build/src/featured/featured-analyzer.ts | 2 +- tools/build/src/featured/featured-json.ts | 2 +- tools/build/src/featured/featured-module.ts | 2 +- tools/build/src/featured/featured-writer.ts | 2 +- tools/build/src/main.ts | 2 +- tools/build/src/recommendations/recommendations-analyzer.ts | 2 +- tools/build/src/recommendations/recommendations-module.ts | 2 +- tools/build/src/recommendations/recommendations-writer.ts | 2 +- tools/build/src/sidecar/plugin-module.ts | 2 +- tools/build/src/sidecar/sidecar-docker-image.ts | 2 +- tools/build/src/sidecar/sidecar.ts | 2 +- tools/build/src/util/deferred.ts | 2 +- tools/build/tests/che-plugin/che-plugin-analyzer.spec.ts | 2 +- .../tests/che-plugin/che-plugins-meta-yaml-generator.spec.ts | 2 +- .../tests/che-theia-plugin/che-theia-plugin-analyzer.spec.ts | 2 +- .../che-theia-plugins-meta-yaml-generator.spec.ts | 2 +- tools/build/tests/common/volume-mount-helper.spec.ts | 2 +- tools/build/tests/editor/che-editor-analyzer.spec.ts | 2 +- tools/build/tests/editor/che-editor-meta-yaml-generator.spec.ts | 2 +- tools/build/tests/entrypoint.spec.ts | 2 +- tools/build/tests/extensions/vsix-download.spec.ts | 2 +- tools/build/tests/extensions/vsix-info-mock.ts | 2 +- tools/build/tests/extensions/vsix-read-info.spec.ts | 2 +- tools/build/tests/extensions/vsix-unpack.spec.ts | 2 +- tools/build/tests/extensions/vsix-url-analyzer.spec.ts | 2 +- tools/build/tests/featured/featured-analyzer.spec.ts | 2 +- tools/build/tests/featured/featured-writer.spec.ts | 2 +- tools/build/tests/main.spec.ts | 2 +- tools/build/tests/packages/che-theia-plugins-generator.ts | 2 +- .../tests/recommendations/recommendations-analyzer.spec.ts | 2 +- .../build/tests/recommendations/recommendations-writer.spec.ts | 2 +- tools/build/tests/sidecar/sidecar-docker-image.spec.ts | 2 +- tools/build/tests/sidecar/sidecar.spec.ts | 2 +- tools/build/tests/util/deferred.spec.ts | 2 +- 96 files changed, 96 insertions(+), 96 deletions(-) diff --git a/.ci/cico-happy-path-pr-test.sh b/.ci/cico-happy-path-pr-test.sh index 74b45b2dee..341d7ef781 100644 --- a/.ci/cico-happy-path-pr-test.sh +++ b/.ci/cico-happy-path-pr-test.sh @@ -1,7 +1,7 @@ #!/bin/bash # shellcheck disable=SC1091,SC1090 # -# Copyright (c) 2012-2020 Red Hat, Inc. +# Copyright (c) 2012-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/.ci/cico-plugin-registry-pr-test.sh b/.ci/cico-plugin-registry-pr-test.sh index d9cd722b24..ac2d853d22 100644 --- a/.ci/cico-plugin-registry-pr-test.sh +++ b/.ci/cico-plugin-registry-pr-test.sh @@ -1,7 +1,7 @@ #!/bin/bash # shellcheck disable=SC1091,SC1090 # -# Copyright (c)2020 Red Hat, Inc. +# Copyright (c)2020-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/.ci/digest-validation-pr.sh b/.ci/digest-validation-pr.sh index 95de58da19..2e8e5940cb 100644 --- a/.ci/digest-validation-pr.sh +++ b/.ci/digest-validation-pr.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2012-2020 Red Hat, Inc. +# Copyright (c) 2012-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/.ci/language-tests-runner.py b/.ci/language-tests-runner.py index f49cd4af4a..ad9cbd8873 100644 --- a/.ci/language-tests-runner.py +++ b/.ci/language-tests-runner.py @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Red Hat, Inc. +# Copyright (c) 2020-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/.ci/sidecar-build-publish.sh b/.ci/sidecar-build-publish.sh index 6c0e1fde49..1f0986a983 100755 --- a/.ci/sidecar-build-publish.sh +++ b/.ci/sidecar-build-publish.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2020 Red Hat, Inc. +# Copyright (c) 2020-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/.eslintrc.js b/.eslintrc.js index 795b7bf89d..edbf53cb71 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -120,7 +120,7 @@ module.exports = { "*********************************************************************", { "pattern": "^ \\* Copyright \\(c\\) \\d{4}(-\\d{4})* Red Hat, Inc\\.$", - "template": " * Copyright (c) 2020 Red Hat, Inc." + "template": " * Copyright (c) 2021 Red Hat, Inc." }, " *", " * This program and the accompanying materials are made", diff --git a/.github/workflows/build-jobs.yml b/.github/workflows/build-jobs.yml index c5d978361a..0281617f58 100644 --- a/.github/workflows/build-jobs.yml +++ b/.github/workflows/build-jobs.yml @@ -1,5 +1,5 @@ # -# Copyright (c) 2020 Red Hat, Inc. +# Copyright (c) 2020-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/.github/workflows/image-build-pr-check.yml b/.github/workflows/image-build-pr-check.yml index 712aa981fc..1ac2a0144b 100644 --- a/.github/workflows/image-build-pr-check.yml +++ b/.github/workflows/image-build-pr-check.yml @@ -1,5 +1,5 @@ # -# Copyright (c) 2020 Red Hat, Inc. +# Copyright (c) 2020-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index 2889a692ec..8fa9b85770 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -1,5 +1,5 @@ # -# Copyright (c) 2020 Red Hat, Inc. +# Copyright (c) 2020-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/.github/workflows/publish-content-push-main.yml b/.github/workflows/publish-content-push-main.yml index 15c6b1aa38..374956bdc4 100644 --- a/.github/workflows/publish-content-push-main.yml +++ b/.github/workflows/publish-content-push-main.yml @@ -1,5 +1,5 @@ # -# Copyright (c) 2020 Red Hat, Inc. +# Copyright (c) 2020-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/.github/workflows/publish-plugin-report.yaml b/.github/workflows/publish-plugin-report.yaml index e3879ad8dd..a5d31adf94 100644 --- a/.github/workflows/publish-plugin-report.yaml +++ b/.github/workflows/publish-plugin-report.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Red Hat, Inc. +# Copyright (c) 2020-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/.github/workflows/publish-pr-check-content.yml b/.github/workflows/publish-pr-check-content.yml index b4877a8f7d..1f8059fca5 100644 --- a/.github/workflows/publish-pr-check-content.yml +++ b/.github/workflows/publish-pr-check-content.yml @@ -1,5 +1,5 @@ # -# Copyright (c) 2020 Red Hat, Inc. +# Copyright (c) 2020-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7b7e6161a5..0210e6b618 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,5 @@ # -# Copyright (c) 2020 Red Hat, Inc. +# Copyright (c) 2020-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/.github/workflows/shellcheck-pr-check.yml b/.github/workflows/shellcheck-pr-check.yml index a1bee5d17e..ae7829cefd 100644 --- a/.github/workflows/shellcheck-pr-check.yml +++ b/.github/workflows/shellcheck-pr-check.yml @@ -1,5 +1,5 @@ # -# Copyright (c) 2020 Red Hat, Inc. +# Copyright (c) 2020-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/.github/workflows/sidecar-build-push.yaml b/.github/workflows/sidecar-build-push.yaml index 520593fe8b..9c403fcc6a 100644 --- a/.github/workflows/sidecar-build-push.yaml +++ b/.github/workflows/sidecar-build-push.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2020 Red Hat, Inc. +# Copyright (c) 2020-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/.github/workflows/sidecar-pr-checks.yaml b/.github/workflows/sidecar-pr-checks.yaml index 0597e323b0..3c73921ff5 100644 --- a/.github/workflows/sidecar-pr-checks.yaml +++ b/.github/workflows/sidecar-pr-checks.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2020 Red Hat, Inc. +# Copyright (c) 2020-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/.github/workflows/typescript-pr-check.yml b/.github/workflows/typescript-pr-check.yml index dcb5e72f21..17f423c0f2 100644 --- a/.github/workflows/typescript-pr-check.yml +++ b/.github/workflows/typescript-pr-check.yml @@ -1,5 +1,5 @@ # -# Copyright (c) 2020 Red Hat, Inc. +# Copyright (c) 2020-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/build/dockerfiles/entrypoint.sh b/build/dockerfiles/entrypoint.sh index 4b4418ad9a..b1c3f7fde0 100755 --- a/build/dockerfiles/entrypoint.sh +++ b/build/dockerfiles/entrypoint.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2018-2020 Red Hat, Inc. +# Copyright (c) 2018-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/build/dockerfiles/rhel.entrypoint.sh b/build/dockerfiles/rhel.entrypoint.sh index b35a865928..76184a3831 100755 --- a/build/dockerfiles/rhel.entrypoint.sh +++ b/build/dockerfiles/rhel.entrypoint.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2018-2020 Red Hat, Inc. +# Copyright (c) 2018-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/build/dockerfiles/rhel.install.sh b/build/dockerfiles/rhel.install.sh index f111f6119d..1fbe9ba876 100755 --- a/build/dockerfiles/rhel.install.sh +++ b/build/dockerfiles/rhel.install.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2018-2020 Red Hat, Inc. +# Copyright (c) 2018-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/cico_build_ci.sh b/cico_build_ci.sh index b70bb134f3..22454b8408 100755 --- a/cico_build_ci.sh +++ b/cico_build_ci.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2018-2020 Red Hat, Inc. +# Copyright (c) 2018-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/cico_build_nightly.sh b/cico_build_nightly.sh index d415ffff61..5eb202ff86 100755 --- a/cico_build_nightly.sh +++ b/cico_build_nightly.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2018-2020 Red Hat, Inc. +# Copyright (c) 2018-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/cico_build_release.sh b/cico_build_release.sh index 334ac3ce5e..ffc467a527 100755 --- a/cico_build_release.sh +++ b/cico_build_release.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2018-2020 Red Hat, Inc. +# Copyright (c) 2018-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/cico_functions.sh b/cico_functions.sh index 7daddd4028..8fcd028523 100755 --- a/cico_functions.sh +++ b/cico_functions.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2018-2020 Red Hat, Inc. +# Copyright (c) 2018-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/deploy/kubernetes/che-plugin-registry/Chart.yaml b/deploy/kubernetes/che-plugin-registry/Chart.yaml index dd49a8261b..a5e222cc0c 100644 --- a/deploy/kubernetes/che-plugin-registry/Chart.yaml +++ b/deploy/kubernetes/che-plugin-registry/Chart.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2018-2020 Red Hat, Inc. +# Copyright (c) 2018-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/deploy/kubernetes/che-plugin-registry/templates/configmap.yaml b/deploy/kubernetes/che-plugin-registry/templates/configmap.yaml index 12c70bc140..9a58fb3b3e 100644 --- a/deploy/kubernetes/che-plugin-registry/templates/configmap.yaml +++ b/deploy/kubernetes/che-plugin-registry/templates/configmap.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2018-2020 Red Hat, Inc. +# Copyright (c) 2018-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/deploy/kubernetes/che-plugin-registry/templates/deployment.yaml b/deploy/kubernetes/che-plugin-registry/templates/deployment.yaml index 169ab6a258..bf07358052 100644 --- a/deploy/kubernetes/che-plugin-registry/templates/deployment.yaml +++ b/deploy/kubernetes/che-plugin-registry/templates/deployment.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2018-2020 Red Hat, Inc. +# Copyright (c) 2018-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/deploy/kubernetes/che-plugin-registry/templates/ingress.yaml b/deploy/kubernetes/che-plugin-registry/templates/ingress.yaml index 476808d82b..583d74ceea 100644 --- a/deploy/kubernetes/che-plugin-registry/templates/ingress.yaml +++ b/deploy/kubernetes/che-plugin-registry/templates/ingress.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2018-2020 Red Hat, Inc. +# Copyright (c) 2018-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/deploy/kubernetes/che-plugin-registry/templates/service.yaml b/deploy/kubernetes/che-plugin-registry/templates/service.yaml index ee23431a32..433d3d01f5 100644 --- a/deploy/kubernetes/che-plugin-registry/templates/service.yaml +++ b/deploy/kubernetes/che-plugin-registry/templates/service.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2018-2020 Red Hat, Inc. +# Copyright (c) 2018-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/deploy/kubernetes/che-plugin-registry/values.yaml b/deploy/kubernetes/che-plugin-registry/values.yaml index 12cb0a6951..ec6e272b60 100644 --- a/deploy/kubernetes/che-plugin-registry/values.yaml +++ b/deploy/kubernetes/che-plugin-registry/values.yaml @@ -1,5 +1,5 @@ # -# Copyright (c) 2018-2020 Red Hat, Inc. +# Copyright (c) 2018-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/deploy/openshift/che-plugin-registry.yml b/deploy/openshift/che-plugin-registry.yml index b503722e90..14477da778 100644 --- a/deploy/openshift/che-plugin-registry.yml +++ b/deploy/openshift/che-plugin-registry.yml @@ -1,5 +1,5 @@ # -# Copyright (c) 2018-2020 Red Hat, Inc. +# Copyright (c) 2018-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/tools/automation/.ci/publish-report.sh b/tools/automation/.ci/publish-report.sh index a1c3cd15bd..7d37f00334 100755 --- a/tools/automation/.ci/publish-report.sh +++ b/tools/automation/.ci/publish-report.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2020 Red Hat, Inc. +# Copyright (c) 2020-2021 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/tools/automation/src/check-plugin-updates.ts b/tools/automation/src/check-plugin-updates.ts index a89324b81d..8903610beb 100755 --- a/tools/automation/src/check-plugin-updates.ts +++ b/tools/automation/src/check-plugin-updates.ts @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/tools/automation/tests/pr-check.spec.ts b/tools/automation/tests/pr-check.spec.ts index e7d54cd429..4dc95fa87d 100644 --- a/tools/automation/tests/pr-check.spec.ts +++ b/tools/automation/tests/pr-check.spec.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/__mocks__/decompress.ts b/tools/build/__mocks__/decompress.ts index 324022fd33..fdb21c57b9 100644 --- a/tools/build/__mocks__/decompress.ts +++ b/tools/build/__mocks__/decompress.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/__mocks__/fs-extra.ts b/tools/build/__mocks__/fs-extra.ts index fc0ee7ef9b..f8f8c81376 100644 --- a/tools/build/__mocks__/fs-extra.ts +++ b/tools/build/__mocks__/fs-extra.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/che-plugin/che-plugins-analyzer.ts b/tools/build/src/che-plugin/che-plugins-analyzer.ts index 1ac06762dc..9234188336 100644 --- a/tools/build/src/che-plugin/che-plugins-analyzer.ts +++ b/tools/build/src/che-plugin/che-plugins-analyzer.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/che-plugin/che-plugins-meta-info.ts b/tools/build/src/che-plugin/che-plugins-meta-info.ts index 0affc4f6ad..e1bb5bd16a 100644 --- a/tools/build/src/che-plugin/che-plugins-meta-info.ts +++ b/tools/build/src/che-plugin/che-plugins-meta-info.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/che-plugin/che-plugins-meta-yaml-generator.ts b/tools/build/src/che-plugin/che-plugins-meta-yaml-generator.ts index 8235faf32f..b3d00fb505 100644 --- a/tools/build/src/che-plugin/che-plugins-meta-yaml-generator.ts +++ b/tools/build/src/che-plugin/che-plugins-meta-yaml-generator.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/che-plugin/che-plugins-module.ts b/tools/build/src/che-plugin/che-plugins-module.ts index f70a5f1951..37ab8a6dc3 100644 --- a/tools/build/src/che-plugin/che-plugins-module.ts +++ b/tools/build/src/che-plugin/che-plugins-module.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/che-plugin/che-plugins-yaml.ts b/tools/build/src/che-plugin/che-plugins-yaml.ts index dbba0ae020..d802c8267b 100644 --- a/tools/build/src/che-plugin/che-plugins-yaml.ts +++ b/tools/build/src/che-plugin/che-plugins-yaml.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/che-theia-plugin/che-theia-plugin-analyzer-meta-info.ts b/tools/build/src/che-theia-plugin/che-theia-plugin-analyzer-meta-info.ts index 65d2548903..4d2871b66a 100644 --- a/tools/build/src/che-theia-plugin/che-theia-plugin-analyzer-meta-info.ts +++ b/tools/build/src/che-theia-plugin/che-theia-plugin-analyzer-meta-info.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/che-theia-plugin/che-theia-plugin-module.ts b/tools/build/src/che-theia-plugin/che-theia-plugin-module.ts index a816ee9227..58079d388c 100644 --- a/tools/build/src/che-theia-plugin/che-theia-plugin-module.ts +++ b/tools/build/src/che-theia-plugin/che-theia-plugin-module.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/che-theia-plugin/che-theia-plugins-analyzer.ts b/tools/build/src/che-theia-plugin/che-theia-plugins-analyzer.ts index 9ba046a295..085ddbb06a 100644 --- a/tools/build/src/che-theia-plugin/che-theia-plugins-analyzer.ts +++ b/tools/build/src/che-theia-plugin/che-theia-plugins-analyzer.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/che-theia-plugin/che-theia-plugins-yaml.ts b/tools/build/src/che-theia-plugin/che-theia-plugins-yaml.ts index 623d6b7795..d1cbacb3e6 100644 --- a/tools/build/src/che-theia-plugin/che-theia-plugins-yaml.ts +++ b/tools/build/src/che-theia-plugin/che-theia-plugins-yaml.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/common/common-endpoint-yaml.ts b/tools/build/src/common/common-endpoint-yaml.ts index b0f05b0146..0e027d966a 100644 --- a/tools/build/src/common/common-endpoint-yaml.ts +++ b/tools/build/src/common/common-endpoint-yaml.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/common/common-env-yaml.ts b/tools/build/src/common/common-env-yaml.ts index 6431c0d182..0ce310d10e 100644 --- a/tools/build/src/common/common-env-yaml.ts +++ b/tools/build/src/common/common-env-yaml.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/common/common-module.ts b/tools/build/src/common/common-module.ts index 55fbfea9d4..4f95e4584a 100644 --- a/tools/build/src/common/common-module.ts +++ b/tools/build/src/common/common-module.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/common/common-volume-mount-yaml.ts b/tools/build/src/common/common-volume-mount-yaml.ts index 2c7e53327e..3b63878866 100644 --- a/tools/build/src/common/common-volume-mount-yaml.ts +++ b/tools/build/src/common/common-volume-mount-yaml.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/common/volume-mount-helper.ts b/tools/build/src/common/volume-mount-helper.ts index 10ccc6a552..a3fae75c13 100644 --- a/tools/build/src/common/volume-mount-helper.ts +++ b/tools/build/src/common/volume-mount-helper.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/editor/che-editors-analyzer.ts b/tools/build/src/editor/che-editors-analyzer.ts index d62e5ddbf2..4270e228b6 100644 --- a/tools/build/src/editor/che-editors-analyzer.ts +++ b/tools/build/src/editor/che-editors-analyzer.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/editor/che-editors-meta-info.ts b/tools/build/src/editor/che-editors-meta-info.ts index 1301a613ec..1aa6062e31 100644 --- a/tools/build/src/editor/che-editors-meta-info.ts +++ b/tools/build/src/editor/che-editors-meta-info.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/editor/che-editors-meta-yaml-generator.ts b/tools/build/src/editor/che-editors-meta-yaml-generator.ts index 5723519c60..13e326a5ec 100644 --- a/tools/build/src/editor/che-editors-meta-yaml-generator.ts +++ b/tools/build/src/editor/che-editors-meta-yaml-generator.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/editor/che-editors-yaml.ts b/tools/build/src/editor/che-editors-yaml.ts index b1ee71dd8a..bad907ca70 100644 --- a/tools/build/src/editor/che-editors-yaml.ts +++ b/tools/build/src/editor/che-editors-yaml.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/editor/editor-module.ts b/tools/build/src/editor/editor-module.ts index faf74f3ebf..8341a3f3c2 100644 --- a/tools/build/src/editor/editor-module.ts +++ b/tools/build/src/editor/editor-module.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/entrypoint.ts b/tools/build/src/entrypoint.ts index ce373cb5ff..973667f073 100644 --- a/tools/build/src/entrypoint.ts +++ b/tools/build/src/entrypoint.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/extensions/extension-module.ts b/tools/build/src/extensions/extension-module.ts index 8603c4eb26..4bd5469fad 100644 --- a/tools/build/src/extensions/extension-module.ts +++ b/tools/build/src/extensions/extension-module.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/extensions/vsix-download.ts b/tools/build/src/extensions/vsix-download.ts index 6d9f538f32..732d1bf47d 100644 --- a/tools/build/src/extensions/vsix-download.ts +++ b/tools/build/src/extensions/vsix-download.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/extensions/vsix-info.ts b/tools/build/src/extensions/vsix-info.ts index 0a2b8ec68e..3c93d10e82 100644 --- a/tools/build/src/extensions/vsix-info.ts +++ b/tools/build/src/extensions/vsix-info.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/extensions/vsix-read-info.ts b/tools/build/src/extensions/vsix-read-info.ts index 955c969e55..426abf67db 100644 --- a/tools/build/src/extensions/vsix-read-info.ts +++ b/tools/build/src/extensions/vsix-read-info.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/extensions/vsix-unpack.ts b/tools/build/src/extensions/vsix-unpack.ts index 1894c5597d..07374cec67 100644 --- a/tools/build/src/extensions/vsix-unpack.ts +++ b/tools/build/src/extensions/vsix-unpack.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/extensions/vsix-url-analyzer.ts b/tools/build/src/extensions/vsix-url-analyzer.ts index 918853c84e..cecd5cb0c8 100644 --- a/tools/build/src/extensions/vsix-url-analyzer.ts +++ b/tools/build/src/extensions/vsix-url-analyzer.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/featured/featured-analyzer.ts b/tools/build/src/featured/featured-analyzer.ts index a4483e5e3f..a07043caa2 100644 --- a/tools/build/src/featured/featured-analyzer.ts +++ b/tools/build/src/featured/featured-analyzer.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/featured/featured-json.ts b/tools/build/src/featured/featured-json.ts index d35a4b8b80..cce14a2eb4 100644 --- a/tools/build/src/featured/featured-json.ts +++ b/tools/build/src/featured/featured-json.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/featured/featured-module.ts b/tools/build/src/featured/featured-module.ts index 2c2a7e70f8..c9085fdfcd 100644 --- a/tools/build/src/featured/featured-module.ts +++ b/tools/build/src/featured/featured-module.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/featured/featured-writer.ts b/tools/build/src/featured/featured-writer.ts index dd27fa6907..a56bcc8092 100644 --- a/tools/build/src/featured/featured-writer.ts +++ b/tools/build/src/featured/featured-writer.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/main.ts b/tools/build/src/main.ts index 85d1ebe5c4..c3d65f43df 100755 --- a/tools/build/src/main.ts +++ b/tools/build/src/main.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/recommendations/recommendations-analyzer.ts b/tools/build/src/recommendations/recommendations-analyzer.ts index 81e31f083a..ba10deafe2 100644 --- a/tools/build/src/recommendations/recommendations-analyzer.ts +++ b/tools/build/src/recommendations/recommendations-analyzer.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/recommendations/recommendations-module.ts b/tools/build/src/recommendations/recommendations-module.ts index 074dca7cc0..3988576f2b 100644 --- a/tools/build/src/recommendations/recommendations-module.ts +++ b/tools/build/src/recommendations/recommendations-module.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/recommendations/recommendations-writer.ts b/tools/build/src/recommendations/recommendations-writer.ts index 18ce690ee7..e06fb159b1 100644 --- a/tools/build/src/recommendations/recommendations-writer.ts +++ b/tools/build/src/recommendations/recommendations-writer.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/sidecar/plugin-module.ts b/tools/build/src/sidecar/plugin-module.ts index ebf36c0214..68aaa4ed72 100644 --- a/tools/build/src/sidecar/plugin-module.ts +++ b/tools/build/src/sidecar/plugin-module.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/sidecar/sidecar-docker-image.ts b/tools/build/src/sidecar/sidecar-docker-image.ts index c9a7550330..9d73ae9eec 100644 --- a/tools/build/src/sidecar/sidecar-docker-image.ts +++ b/tools/build/src/sidecar/sidecar-docker-image.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/sidecar/sidecar.ts b/tools/build/src/sidecar/sidecar.ts index 7d4a3c7830..663473405e 100644 --- a/tools/build/src/sidecar/sidecar.ts +++ b/tools/build/src/sidecar/sidecar.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/src/util/deferred.ts b/tools/build/src/util/deferred.ts index 5b65848acf..090d628124 100644 --- a/tools/build/src/util/deferred.ts +++ b/tools/build/src/util/deferred.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/tests/che-plugin/che-plugin-analyzer.spec.ts b/tools/build/tests/che-plugin/che-plugin-analyzer.spec.ts index ef13058ebb..09d9085ffb 100644 --- a/tools/build/tests/che-plugin/che-plugin-analyzer.spec.ts +++ b/tools/build/tests/che-plugin/che-plugin-analyzer.spec.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/tests/che-plugin/che-plugins-meta-yaml-generator.spec.ts b/tools/build/tests/che-plugin/che-plugins-meta-yaml-generator.spec.ts index babb93a11b..2452fbbe21 100644 --- a/tools/build/tests/che-plugin/che-plugins-meta-yaml-generator.spec.ts +++ b/tools/build/tests/che-plugin/che-plugins-meta-yaml-generator.spec.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/tests/che-theia-plugin/che-theia-plugin-analyzer.spec.ts b/tools/build/tests/che-theia-plugin/che-theia-plugin-analyzer.spec.ts index e5a37e4d5b..6acbcff346 100644 --- a/tools/build/tests/che-theia-plugin/che-theia-plugin-analyzer.spec.ts +++ b/tools/build/tests/che-theia-plugin/che-theia-plugin-analyzer.spec.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/tests/che-theia-plugin/che-theia-plugins-meta-yaml-generator.spec.ts b/tools/build/tests/che-theia-plugin/che-theia-plugins-meta-yaml-generator.spec.ts index 59935d8842..2038f226d7 100644 --- a/tools/build/tests/che-theia-plugin/che-theia-plugins-meta-yaml-generator.spec.ts +++ b/tools/build/tests/che-theia-plugin/che-theia-plugins-meta-yaml-generator.spec.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/tests/common/volume-mount-helper.spec.ts b/tools/build/tests/common/volume-mount-helper.spec.ts index 3d94a92469..b9855660c8 100644 --- a/tools/build/tests/common/volume-mount-helper.spec.ts +++ b/tools/build/tests/common/volume-mount-helper.spec.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/tests/editor/che-editor-analyzer.spec.ts b/tools/build/tests/editor/che-editor-analyzer.spec.ts index fb5848e6ea..fee8b71815 100644 --- a/tools/build/tests/editor/che-editor-analyzer.spec.ts +++ b/tools/build/tests/editor/che-editor-analyzer.spec.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/tests/editor/che-editor-meta-yaml-generator.spec.ts b/tools/build/tests/editor/che-editor-meta-yaml-generator.spec.ts index b9992b2721..b9a710c495 100644 --- a/tools/build/tests/editor/che-editor-meta-yaml-generator.spec.ts +++ b/tools/build/tests/editor/che-editor-meta-yaml-generator.spec.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/tests/entrypoint.spec.ts b/tools/build/tests/entrypoint.spec.ts index 10f8896db7..46aaca680b 100644 --- a/tools/build/tests/entrypoint.spec.ts +++ b/tools/build/tests/entrypoint.spec.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/tests/extensions/vsix-download.spec.ts b/tools/build/tests/extensions/vsix-download.spec.ts index b27b7f481b..053b543985 100644 --- a/tools/build/tests/extensions/vsix-download.spec.ts +++ b/tools/build/tests/extensions/vsix-download.spec.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/tests/extensions/vsix-info-mock.ts b/tools/build/tests/extensions/vsix-info-mock.ts index 55d7d77146..b20145b730 100644 --- a/tools/build/tests/extensions/vsix-info-mock.ts +++ b/tools/build/tests/extensions/vsix-info-mock.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/tests/extensions/vsix-read-info.spec.ts b/tools/build/tests/extensions/vsix-read-info.spec.ts index ae128ffef4..e8565c3c7b 100644 --- a/tools/build/tests/extensions/vsix-read-info.spec.ts +++ b/tools/build/tests/extensions/vsix-read-info.spec.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/tests/extensions/vsix-unpack.spec.ts b/tools/build/tests/extensions/vsix-unpack.spec.ts index b573e8cac0..a59a2bbf4a 100644 --- a/tools/build/tests/extensions/vsix-unpack.spec.ts +++ b/tools/build/tests/extensions/vsix-unpack.spec.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/tests/extensions/vsix-url-analyzer.spec.ts b/tools/build/tests/extensions/vsix-url-analyzer.spec.ts index a6584ba83d..fa6fae70d5 100644 --- a/tools/build/tests/extensions/vsix-url-analyzer.spec.ts +++ b/tools/build/tests/extensions/vsix-url-analyzer.spec.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/tests/featured/featured-analyzer.spec.ts b/tools/build/tests/featured/featured-analyzer.spec.ts index 80684c0146..125aca1e24 100644 --- a/tools/build/tests/featured/featured-analyzer.spec.ts +++ b/tools/build/tests/featured/featured-analyzer.spec.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/tests/featured/featured-writer.spec.ts b/tools/build/tests/featured/featured-writer.spec.ts index 6fade8d33d..e56f6577f1 100644 --- a/tools/build/tests/featured/featured-writer.spec.ts +++ b/tools/build/tests/featured/featured-writer.spec.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/tests/main.spec.ts b/tools/build/tests/main.spec.ts index 8b42f57ab4..3481055179 100644 --- a/tools/build/tests/main.spec.ts +++ b/tools/build/tests/main.spec.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/tests/packages/che-theia-plugins-generator.ts b/tools/build/tests/packages/che-theia-plugins-generator.ts index 50bafe4a22..65177dcae6 100644 --- a/tools/build/tests/packages/che-theia-plugins-generator.ts +++ b/tools/build/tests/packages/che-theia-plugins-generator.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/tests/recommendations/recommendations-analyzer.spec.ts b/tools/build/tests/recommendations/recommendations-analyzer.spec.ts index 553e5d46ad..8d97fd434c 100644 --- a/tools/build/tests/recommendations/recommendations-analyzer.spec.ts +++ b/tools/build/tests/recommendations/recommendations-analyzer.spec.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/tests/recommendations/recommendations-writer.spec.ts b/tools/build/tests/recommendations/recommendations-writer.spec.ts index dfbc2e62e4..dedf103914 100644 --- a/tools/build/tests/recommendations/recommendations-writer.spec.ts +++ b/tools/build/tests/recommendations/recommendations-writer.spec.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/tests/sidecar/sidecar-docker-image.spec.ts b/tools/build/tests/sidecar/sidecar-docker-image.spec.ts index 9c1b6fd05e..f07eced31b 100644 --- a/tools/build/tests/sidecar/sidecar-docker-image.spec.ts +++ b/tools/build/tests/sidecar/sidecar-docker-image.spec.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/tests/sidecar/sidecar.spec.ts b/tools/build/tests/sidecar/sidecar.spec.ts index 268494bb7a..43eae4caf1 100644 --- a/tools/build/tests/sidecar/sidecar.spec.ts +++ b/tools/build/tests/sidecar/sidecar.spec.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 diff --git a/tools/build/tests/util/deferred.spec.ts b/tools/build/tests/util/deferred.spec.ts index 0588ae7be5..b77e400297 100644 --- a/tools/build/tests/util/deferred.spec.ts +++ b/tools/build/tests/util/deferred.spec.ts @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2020 Red Hat, Inc. + * Copyright (c) 2020-2021 Red Hat, Inc. * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 From fe2c904dfc8116597bbe97d1fa4040a327f77b04 Mon Sep 17 00:00:00 2001 From: Florent BENOIT Date: Thu, 25 Feb 2021 20:40:59 +0100 Subject: [PATCH 09/11] feat(devfile): Generates devfile.yaml in addition to meta.yaml for che-editors and che-plugins (#853) Change-Id: Ibefbb93bc1eab00cdbfc1fe1e2ed2caac87166ce Signed-off-by: Florent Benoit --- tools/build/src/devfile/devfile-module.ts | 18 ++ .../src/devfile/meta-yaml-to-devfile-yaml.ts | 167 ++++++++++++++++ tools/build/src/inversify-binding.ts | 2 + tools/build/src/meta-yaml/index-writer.ts | 14 +- tools/build/src/meta-yaml/meta-yaml-writer.ts | 11 +- .../tests/_data/meta/che-theia-meta.yaml | 109 ++++++++++ .../meta/container-minimal-endpoint.yaml | 9 + .../_data/meta/container-no-endpoints.yaml | 6 + .../_data/meta/machine-exec-plugin-meta.yaml | 33 +++ .../build/tests/_data/meta/no-container.yaml | 17 ++ .../tests/_data/meta/vscode-extension.yaml | 25 +++ .../devfile/meta-yaml-to-devfile-yaml.spec.ts | 189 ++++++++++++++++++ tools/build/tests/inversify-binding.spec.ts | 4 + .../tests/meta-yaml/index-writer.spec.ts | 4 + .../tests/meta-yaml/meta-yaml-writer.spec.ts | 63 ++++++ 15 files changed, 667 insertions(+), 4 deletions(-) create mode 100644 tools/build/src/devfile/devfile-module.ts create mode 100644 tools/build/src/devfile/meta-yaml-to-devfile-yaml.ts create mode 100644 tools/build/tests/_data/meta/che-theia-meta.yaml create mode 100644 tools/build/tests/_data/meta/container-minimal-endpoint.yaml create mode 100644 tools/build/tests/_data/meta/container-no-endpoints.yaml create mode 100644 tools/build/tests/_data/meta/machine-exec-plugin-meta.yaml create mode 100644 tools/build/tests/_data/meta/no-container.yaml create mode 100644 tools/build/tests/_data/meta/vscode-extension.yaml create mode 100644 tools/build/tests/devfile/meta-yaml-to-devfile-yaml.spec.ts diff --git a/tools/build/src/devfile/devfile-module.ts b/tools/build/src/devfile/devfile-module.ts new file mode 100644 index 0000000000..970622a773 --- /dev/null +++ b/tools/build/src/devfile/devfile-module.ts @@ -0,0 +1,18 @@ +/********************************************************************** + * Copyright (c) 2021 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + ***********************************************************************/ +import { ContainerModule, interfaces } from 'inversify'; + +import { MetaYamlToDevfileYaml } from './meta-yaml-to-devfile-yaml'; + +const devfileModule = new ContainerModule((bind: interfaces.Bind) => { + bind(MetaYamlToDevfileYaml).toSelf().inSingletonScope(); +}); + +export { devfileModule }; diff --git a/tools/build/src/devfile/meta-yaml-to-devfile-yaml.ts b/tools/build/src/devfile/meta-yaml-to-devfile-yaml.ts new file mode 100644 index 0000000000..25c7d62f34 --- /dev/null +++ b/tools/build/src/devfile/meta-yaml-to-devfile-yaml.ts @@ -0,0 +1,167 @@ +/********************************************************************** + * Copyright (c) 2021 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + ***********************************************************************/ + +import { injectable } from 'inversify'; + +/** + * Convert meta.yaml into a devfile 2.0 syntax + */ +@injectable() +export class MetaYamlToDevfileYaml { + // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types + componentsFromContainer(container: any): any[] { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const components: any[] = []; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const component: any = { + name: container.name, + container: { + image: container.image, + }, + }; + if (container.command) { + component.container.args = container.command; + } + if (container.env) { + component.container.env = container.env; + } + if (container.volumes) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + component.container.volumeMounts = container.volumes.map((volume: any) => ({ + name: volume.name, + path: volume.mountPath, + })); + + // add volume components + // eslint-disable-next-line @typescript-eslint/no-explicit-any + container.volumes.map((volume: any) => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const volumeComponent: any = { + name: volume.name, + volume: {}, + }; + if (volume.ephemeral === true) { + volumeComponent.volume.ephemeral = true; + } + components.push(volumeComponent); + }); + } + if (container.mountSources) { + component.container.mountSources = container.mountSources; + } + if (container.memoryLimit) { + component.container.memoryLimit = container.memoryLimit; + } + if (container.memoryRequest) { + component.container.memoryRequest = container.memoryRequest; + } + if (container.cpuLimit) { + component.container.cpuLimit = container.cpuLimit; + } + if (container.cpuRequest) { + component.container.cpuRequest = container.cpuRequest; + } + + components.push(component); + + // replace 127.0.0.1 by 0.0.0.0 + return components.map(iteratingComponent => + JSON.parse(JSON.stringify(iteratingComponent).replace(/127\.0\.0\.1/g, '0.0.0.0')) + ); + } + + // eslint-disable-next-line @typescript-eslint/no-explicit-any,@typescript-eslint/explicit-module-boundary-types + convert(metaYaml: any): any | undefined { + // do not handle VS Code extensions as they can't be converted into devfile 2.0 + if (!metaYaml || metaYaml.type === 'VS Code extension') { + return; + } + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const devfileYaml: any = { + schemaVersion: '2.1.0', + metadata: { + name: metaYaml.displayName, + }, + }; + + // for each container, add a component + const metaYamlSpec = metaYaml.spec; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + let components: any[] = []; + if (metaYamlSpec.containers && metaYamlSpec.containers.length === 1) { + // handle only one container from meta.yaml + const container = metaYamlSpec.containers[0]; + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const componentsFromContainer: any[] = this.componentsFromContainer(container); + // add all endpoints + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const endpoints: any[] = []; + if (metaYamlSpec.endpoints && metaYamlSpec.endpoints.length > 0) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + metaYamlSpec.endpoints.forEach((endpoint: any) => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const devfileEndpoint: any = { + name: endpoint.name, + attributes: endpoint.attributes, + }; + devfileEndpoint.targetPort = endpoint.targetPort; + if (endpoint.public === true) { + devfileEndpoint.exposure = 'public'; + } + + // if it's secured, remove secure option for now + if (devfileEndpoint.attributes && devfileEndpoint.attributes.secure === true) { + devfileEndpoint.secure = false; + delete devfileEndpoint.attributes['secure']; + } + + // move protocol upper than inside attributes + if (devfileEndpoint.attributes && devfileEndpoint.attributes.protocol) { + devfileEndpoint.protocol = devfileEndpoint.attributes.protocol; + delete devfileEndpoint.attributes['protocol']; + } + + endpoints.push(devfileEndpoint); + }); + } + // last component is the container component + componentsFromContainer[componentsFromContainer.length - 1].container.endpoints = endpoints; + components = components.concat(componentsFromContainer); + } + if (metaYamlSpec.initContainers && metaYamlSpec.initContainers.length === 1) { + // handle only one container from meta.yaml + const initContainer = metaYamlSpec.initContainers[0]; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const componentsFromContainer: any[] = this.componentsFromContainer(initContainer); + + // add a command + const commands = devfileYaml.commands || []; + commands.push({ + id: 'init-container-command', + apply: { + component: componentsFromContainer[componentsFromContainer.length - 1].name, + }, + }); + devfileYaml.commands = commands; + + // add event + const events = devfileYaml.events || {}; + const preStartEvents = events.preStart || []; + preStartEvents.push('init-container-command'); + events.preStart = preStartEvents; + devfileYaml.events = events; + components = components.concat(componentsFromContainer); + } + devfileYaml.components = components; + return devfileYaml; + } +} diff --git a/tools/build/src/inversify-binding.ts b/tools/build/src/inversify-binding.ts index 155e159f72..3e8982ea1a 100644 --- a/tools/build/src/inversify-binding.ts +++ b/tools/build/src/inversify-binding.ts @@ -18,6 +18,7 @@ import { Container } from 'inversify'; import { chePluginsModule } from './che-plugin/che-plugins-module'; import { cheTheiaPluginModule } from './che-theia-plugin/che-theia-plugin-module'; import { commonModule } from './common/common-module'; +import { devfileModule } from './devfile/devfile-module'; import { editorModule } from './editor/editor-module'; import { extensionsModule } from './extensions/extension-module'; import { featuredModule } from './featured/featured-module'; @@ -51,6 +52,7 @@ export class InversifyBinding { this.container.load(commonModule); this.container.load(chePluginsModule); this.container.load(cheTheiaPluginModule); + this.container.load(devfileModule); this.container.load(editorModule); this.container.load(extensionsModule); this.container.load(featuredModule); diff --git a/tools/build/src/meta-yaml/index-writer.ts b/tools/build/src/meta-yaml/index-writer.ts index 31fef12d88..13337fac5f 100644 --- a/tools/build/src/meta-yaml/index-writer.ts +++ b/tools/build/src/meta-yaml/index-writer.ts @@ -24,6 +24,16 @@ export class IndexWriter { @named('OUTPUT_ROOT_DIRECTORY') private outputRootDirectory: string; + getLinks(plugin: MetaYamlPluginInfo): { self: string; devfile?: string } { + const links: { self: string; devfile?: string } = { + self: `/v3/plugins/${plugin.id}`, + }; + if (plugin.type === 'Che Editor' || plugin.type === 'Che Plugin') { + links.devfile = `/v3/plugins/${plugin.id}/devfile.yaml`; + } + return links; + } + async write(generatedMetaYamlPluginInfos: MetaYamlPluginInfo[]): Promise { const v3PluginsFolder = path.resolve(this.outputRootDirectory, 'v3', 'plugins'); await fs.ensureDir(v3PluginsFolder); @@ -33,9 +43,7 @@ export class IndexWriter { id: plugin.id, description: plugin.description, displayName: plugin.displayName, - links: { - self: `/v3/plugins/${plugin.id}`, - }, + links: this.getLinks(plugin), name: plugin.name, publisher: plugin.publisher, type: plugin.type, diff --git a/tools/build/src/meta-yaml/meta-yaml-writer.ts b/tools/build/src/meta-yaml/meta-yaml-writer.ts index 3fb95e8f62..68beb4e553 100644 --- a/tools/build/src/meta-yaml/meta-yaml-writer.ts +++ b/tools/build/src/meta-yaml/meta-yaml-writer.ts @@ -16,6 +16,7 @@ import * as path from 'path'; import { inject, injectable, named } from 'inversify'; import { MetaYamlPluginInfo } from './meta-yaml-plugin-info'; +import { MetaYamlToDevfileYaml } from '../devfile/meta-yaml-to-devfile-yaml'; @injectable() export class MetaYamlWriter { @@ -27,6 +28,9 @@ export class MetaYamlWriter { @named('EMBED_VSIX') private embedVsix: boolean; + @inject(MetaYamlToDevfileYaml) + private metaYamlToDevfileYaml: MetaYamlToDevfileYaml; + public static readonly DEFAULT_ICON = '/v3/images/eclipse-che-logo.png'; convertIdToPublisherAndName(id: string): [string, string] { @@ -155,9 +159,14 @@ export class MetaYamlWriter { metaYamlPluginGenerated.push(generated); const pluginPath = path.resolve(pluginsFolder, computedId, version, 'meta.yaml'); - await fs.ensureDir(path.dirname(pluginPath)); promises.push(fs.writeFile(pluginPath, yamlString)); + const devfileYaml = this.metaYamlToDevfileYaml.convert(metaYaml); + if (devfileYaml) { + const devfilePath = path.resolve(pluginsFolder, computedId, version, 'devfile.yaml'); + const devfileYamlString = jsyaml.safeDump(devfileYaml, { lineWidth: 120 }); + promises.push(fs.writeFile(devfilePath, devfileYamlString)); + } }) ); return Promise.all(promises); diff --git a/tools/build/tests/_data/meta/che-theia-meta.yaml b/tools/build/tests/_data/meta/che-theia-meta.yaml new file mode 100644 index 0000000000..00f5b8cc94 --- /dev/null +++ b/tools/build/tests/_data/meta/che-theia-meta.yaml @@ -0,0 +1,109 @@ +apiVersion: v2 +publisher: eclipse +name: che-theia +version: next +type: Che Editor +displayName: theia-ide +title: Eclipse Theia development version. +description: 'Eclipse Theia, get the latest release each day.' +icon: /v3/images/eclipse-che-logo.png +category: Editor +repository: 'https://github.com/eclipse/che-theia' +firstPublicationDate: '2019-03-07' +latestUpdateDate: '2021-02-19' +spec: + endpoints: + - name: theia + public: true + targetPort: 3100 + attributes: + protocol: http + type: ide + secure: true + cookiesAuthEnabled: true + discoverable: false + - name: webviews + public: true + targetPort: 3100 + attributes: + protocol: http + type: webview + secure: true + cookiesAuthEnabled: true + discoverable: false + unique: true + - name: mini-browser + public: true + targetPort: 3100 + attributes: + protocol: http + type: mini-browser + secure: true + cookiesAuthEnabled: true + discoverable: false + unique: true + - name: theia-dev + public: true + targetPort: 3130 + attributes: + protocol: http + type: ide-dev + discoverable: false + - name: theia-redirect-1 + public: true + targetPort: 13131 + attributes: + protocol: http + discoverable: false + - name: theia-redirect-2 + public: true + targetPort: 13132 + attributes: + protocol: http + discoverable: false + - name: theia-redirect-3 + public: true + targetPort: 13133 + attributes: + protocol: http + discoverable: false + containers: + - name: theia-ide + image: 'quay.io/eclipse/che-theia:next' + env: + - name: THEIA_PLUGINS + value: 'local-dir:///plugins' + - name: HOSTED_PLUGIN_HOSTNAME + value: 0.0.0.0 + - name: HOSTED_PLUGIN_PORT + value: '3130' + - name: THEIA_HOST + value: 127.0.0.1 + mountSources: true + ports: + - exposedPort: 3100 + - exposedPort: 3130 + - exposedPort: 13131 + - exposedPort: 13132 + - exposedPort: 13133 + memoryLimit: 512M + memoryRequest: 50M + cpuLimit: 1500m + cpuRequest: 100m + volumes: + - name: plugins + mountPath: /plugins + - name: theia-local + mountPath: /home/theia/.theia + initContainers: + - name: remote-runtime-injector + image: 'quay.io/eclipse/che-theia-endpoint-runtime-binary:next' + env: + - name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE + value: /remote-endpoint/plugin-remote-endpoint + - name: REMOTE_ENDPOINT_VOLUME_NAME + value: remote-endpoint + volumes: + - name: remote-endpoint + mountPath: /remote-endpoint + ephemeral: true diff --git a/tools/build/tests/_data/meta/container-minimal-endpoint.yaml b/tools/build/tests/_data/meta/container-minimal-endpoint.yaml new file mode 100644 index 0000000000..e08ebbd6a1 --- /dev/null +++ b/tools/build/tests/_data/meta/container-minimal-endpoint.yaml @@ -0,0 +1,9 @@ +displayName: minimal-endpoint +type: Che Plugin +spec: + endpoints: + - name: www + targetPort: 3100 + containers: + - name: minimal-endpoint + image: 'quay.io/minimal-endpoint' diff --git a/tools/build/tests/_data/meta/container-no-endpoints.yaml b/tools/build/tests/_data/meta/container-no-endpoints.yaml new file mode 100644 index 0000000000..226ce06745 --- /dev/null +++ b/tools/build/tests/_data/meta/container-no-endpoints.yaml @@ -0,0 +1,6 @@ +displayName: no-endpoint +type: Che Plugin +spec: + containers: + - name: no-endpoint + image: 'quay.io/no-endpoint' diff --git a/tools/build/tests/_data/meta/machine-exec-plugin-meta.yaml b/tools/build/tests/_data/meta/machine-exec-plugin-meta.yaml new file mode 100644 index 0000000000..785ee01231 --- /dev/null +++ b/tools/build/tests/_data/meta/machine-exec-plugin-meta.yaml @@ -0,0 +1,33 @@ +apiVersion: v2 +publisher: eclipse +name: che-machine-exec-plugin +version: nightly +type: Che Plugin +displayName: Che machine-exec Service +title: Che machine-exec Service +description: Che Plug-in with che-machine-exec service to provide creation terminal or tasks for Eclipse Che workspace containers. +icon: /v3/images/eclipse-che-logo.png +category: Other +repository: 'https://github.com/eclipse/che-machine-exec/' +firstPublicationDate: '2019-11-07' +latestUpdateDate: '2021-02-19' +spec: + endpoints: + - name: che-machine-exec + public: true + targetPort: 4444 + attributes: + protocol: ws + type: terminal + discoverable: false + secure: true + cookiesAuthEnabled: true + containers: + - name: che-machine-exec + image: 'quay.io/eclipse/che-machine-exec:nightly' + ports: + - exposedPort: 4444 + command: + - /go/bin/che-machine-exec + - '--url' + - '127.0.0.1:4444' diff --git a/tools/build/tests/_data/meta/no-container.yaml b/tools/build/tests/_data/meta/no-container.yaml new file mode 100644 index 0000000000..7d10be360e --- /dev/null +++ b/tools/build/tests/_data/meta/no-container.yaml @@ -0,0 +1,17 @@ +apiVersion: v2 +publisher: eclipse +name: che-theia +version: next +type: Che Editor +displayName: no-container +title: Eclipse Theia development version. +description: 'Eclipse Theia, get the latest release each day.' +icon: /v3/images/eclipse-che-logo.png +category: Editor +repository: 'https://github.com/eclipse/che-theia' +firstPublicationDate: '2019-03-07' +latestUpdateDate: '2021-02-19' +spec: + initContainers: + - name: foo + image: 'quay.io/foobar:next' diff --git a/tools/build/tests/_data/meta/vscode-extension.yaml b/tools/build/tests/_data/meta/vscode-extension.yaml new file mode 100644 index 0000000000..8d7f322cb1 --- /dev/null +++ b/tools/build/tests/_data/meta/vscode-extension.yaml @@ -0,0 +1,25 @@ +apiVersion: v2 +publisher: redhat-developer +name: che-omnisharp-plugin +version: latest +type: VS Code extension +displayName: omnisharp-theia-plugin +title: omnisharp-theia-plugin +description: omnisharp-theia-plugin +icon: /v3/images/eclipse-che-logo.png +category: Other +repository: 'https://github.com/redhat-developer/omnisharp-theia-plugin' +firstPublicationDate: '2019-12-03' +latestUpdateDate: '2021-02-19' +spec: + containers: + - image: 'quay.io/eclipse/che-plugin-sidecar@sha256:f398e3ffd5200c56bf56a6f7f9e8db4aa3f639a6125850f169414528260dce8a' + name: theia-omnisharp + volumes: + - name: nuget + mountPath: /home/theia/.nuget + memoryLimit: 1Gi + cpuRequest: 30m + cpuLimit: 500m + extensions: + - 'https://github.com/redhat-developer/omnisharp-theia-plugin/releases/download/v0.0.6/omnisharp_theia_plugin.theia' diff --git a/tools/build/tests/devfile/meta-yaml-to-devfile-yaml.spec.ts b/tools/build/tests/devfile/meta-yaml-to-devfile-yaml.spec.ts new file mode 100644 index 0000000000..71a1739b92 --- /dev/null +++ b/tools/build/tests/devfile/meta-yaml-to-devfile-yaml.spec.ts @@ -0,0 +1,189 @@ +/********************************************************************** + * Copyright (c) 2021 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + ***********************************************************************/ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import 'reflect-metadata'; + +import * as fs from 'fs-extra'; +import * as jsYaml from 'js-yaml'; +import * as path from 'path'; + +import { Container } from 'inversify'; +import { MetaYamlToDevfileYaml } from '../../src/devfile/meta-yaml-to-devfile-yaml'; + +describe('Test MetaYamlToDevfileYaml', () => { + let container: Container; + + let metaYamlToDevfileYaml: MetaYamlToDevfileYaml; + + beforeEach(() => { + jest.restoreAllMocks(); + jest.resetAllMocks(); + + container = new Container(); + container.bind(MetaYamlToDevfileYaml).toSelf().inSingletonScope(); + metaYamlToDevfileYaml = container.get(MetaYamlToDevfileYaml); + }); + + test('machine-exec', async () => { + const metaYamlPath = path.resolve(__dirname, '..', '_data', 'meta', 'machine-exec-plugin-meta.yaml'); + const metaYamlContent = await fs.readFile(metaYamlPath, 'utf-8'); + const metaYaml = jsYaml.safeLoad(metaYamlContent); + const devfileYaml = metaYamlToDevfileYaml.convert(metaYaml); + expect(devfileYaml.schemaVersion).toBe('2.1.0'); + expect(devfileYaml.metadata?.name).toBe('Che machine-exec Service'); + expect(devfileYaml.components).toBeDefined(); + expect(devfileYaml.components?.length).toBe(1); + const component = devfileYaml.components[0]; + expect(component.name).toBe('che-machine-exec'); + const componentContainer = component.container; + expect(componentContainer.image).toBe('quay.io/eclipse/che-machine-exec:nightly'); + expect(componentContainer.args).toStrictEqual(['/go/bin/che-machine-exec', '--url', '0.0.0.0:4444']); + + expect(componentContainer.endpoints).toBeDefined(); + expect(componentContainer.endpoints?.length).toBe(1); + const endpoint = componentContainer.endpoints[0]; + expect(endpoint.name).toBe('che-machine-exec'); + expect(endpoint.exposure).toBe('public'); + const endpointAttributes = endpoint.attributes; + expect(endpointAttributes.type).toBe('terminal'); + }); + + test('che-theia', async () => { + const metaYamlPath = path.resolve(__dirname, '..', '_data', 'meta', 'che-theia-meta.yaml'); + const metaYamlContent = await fs.readFile(metaYamlPath, 'utf-8'); + const metaYaml = jsYaml.safeLoad(metaYamlContent); + const devfileYaml = metaYamlToDevfileYaml.convert(metaYaml); + expect(devfileYaml.schemaVersion).toBe('2.1.0'); + expect(devfileYaml.metadata?.name).toBe('theia-ide'); + expect(devfileYaml.components).toBeDefined(); + expect(devfileYaml.components?.length).toBe(5); + const theiaIdeComponent = devfileYaml.components[2]; + expect(theiaIdeComponent.name).toBe('theia-ide'); + const theiaIdeComponentContainer = theiaIdeComponent.container; + expect(theiaIdeComponentContainer.image).toBe('quay.io/eclipse/che-theia:next'); + + expect(theiaIdeComponentContainer.endpoints).toBeDefined(); + expect(theiaIdeComponentContainer.endpoints?.length).toBe(7); + const theiaIdeFirstEndpoint = theiaIdeComponentContainer.endpoints[0]; + expect(theiaIdeFirstEndpoint.name).toBe('theia'); + expect(theiaIdeFirstEndpoint.exposure).toBe('public'); + const theiaIdeFirstEndpointAttributes = theiaIdeFirstEndpoint.attributes; + expect(theiaIdeFirstEndpointAttributes.type).toBe('ide'); + + expect(theiaIdeComponentContainer.env).toBeDefined(); + expect(theiaIdeComponentContainer.env?.length).toBe(4); + const theiaIdeFirstEnv = theiaIdeComponentContainer.env[0]; + expect(theiaIdeFirstEnv.name).toBe('THEIA_PLUGINS'); + expect(theiaIdeFirstEnv.value).toBe('local-dir:///plugins'); + + const theiaHostEnv = theiaIdeComponentContainer.env.find((env: any) => env.name === 'THEIA_HOST'); + expect(theiaHostEnv.name).toBe('THEIA_HOST'); + // 127.0.0.1 should have been replaced by 0.0.0.0 + expect(theiaHostEnv.value).toBe('0.0.0.0'); + + expect(theiaIdeComponentContainer.volumeMounts).toBeDefined(); + expect(theiaIdeComponentContainer.volumeMounts?.length).toBe(2); + const theiaIdeFirstVolumeMount = theiaIdeComponentContainer.volumeMounts[0]; + expect(theiaIdeFirstVolumeMount.name).toBe('plugins'); + expect(theiaIdeFirstVolumeMount.path).toBe('/plugins'); + + const remoteRuntimeInjectorComponent = devfileYaml.components[4]; + expect(remoteRuntimeInjectorComponent.name).toBe('remote-runtime-injector'); + const remoteRuntimeInjectorComponentContainer = remoteRuntimeInjectorComponent.container; + expect(remoteRuntimeInjectorComponentContainer.image).toBe( + 'quay.io/eclipse/che-theia-endpoint-runtime-binary:next' + ); + + const pluginsVolumeComponent = devfileYaml.components[0]; + expect(pluginsVolumeComponent.name).toBe('plugins'); + expect(pluginsVolumeComponent.volume).toStrictEqual({}); + + const theiaLocalVolumeComponent = devfileYaml.components[1]; + expect(theiaLocalVolumeComponent.name).toBe('theia-local'); + expect(theiaLocalVolumeComponent.volume).toStrictEqual({}); + + const remoteEndpointVolumeComponent = devfileYaml.components[3]; + expect(remoteEndpointVolumeComponent.name).toBe('remote-endpoint'); + expect(remoteEndpointVolumeComponent.volume).toBeDefined(); + expect(remoteEndpointVolumeComponent.volume.ephemeral).toBeTruthy(); + + expect(devfileYaml.commands).toBeDefined(); + expect(devfileYaml.commands?.length).toBe(1); + const devfileFirstCommand = devfileYaml.commands[0]; + expect(devfileFirstCommand.id).toBe('init-container-command'); + expect(devfileFirstCommand.apply).toStrictEqual({ component: 'remote-runtime-injector' }); + + expect(devfileYaml.events).toBeDefined(); + expect(devfileYaml.events.preStart).toBeDefined(); + expect(devfileYaml.events?.preStart?.length).toBe(1); + const preStartFirstEvent = devfileYaml.events.preStart[0]; + expect(preStartFirstEvent).toBe('init-container-command'); + }); + + test('no container', async () => { + const metaYamlPath = path.resolve(__dirname, '..', '_data', 'meta', 'no-container.yaml'); + const metaYamlContent = await fs.readFile(metaYamlPath, 'utf-8'); + const metaYaml = jsYaml.safeLoad(metaYamlContent); + const devfileYaml = metaYamlToDevfileYaml.convert(metaYaml); + expect(devfileYaml.schemaVersion).toBe('2.1.0'); + expect(devfileYaml.metadata?.name).toBe('no-container'); + expect(devfileYaml.components).toBeDefined(); + expect(devfileYaml.components?.length).toBe(1); + const component = devfileYaml.components[0]; + expect(component.name).toBe('foo'); + const componentContainer = component.container; + expect(componentContainer.image).toBe('quay.io/foobar:next'); + }); + + test('vscode extension', async () => { + const metaYamlPath = path.resolve(__dirname, '..', '_data', 'meta', 'vscode-extension.yaml'); + const metaYamlContent = await fs.readFile(metaYamlPath, 'utf-8'); + const metaYaml = jsYaml.safeLoad(metaYamlContent); + const devfileYaml = metaYamlToDevfileYaml.convert(metaYaml); + expect(devfileYaml).toBeUndefined(); + }); + + test('container without endpoints', async () => { + const metaYamlPath = path.resolve(__dirname, '..', '_data', 'meta', 'container-no-endpoints.yaml'); + const metaYamlContent = await fs.readFile(metaYamlPath, 'utf-8'); + const metaYaml = jsYaml.safeLoad(metaYamlContent); + const devfileYaml = metaYamlToDevfileYaml.convert(metaYaml); + expect(devfileYaml.schemaVersion).toBe('2.1.0'); + expect(devfileYaml.metadata?.name).toBe('no-endpoint'); + expect(devfileYaml.components).toBeDefined(); + expect(devfileYaml.components?.length).toBe(1); + const component = devfileYaml.components[0]; + expect(component.name).toBe('no-endpoint'); + const componentContainer = component.container; + expect(componentContainer.image).toBe('quay.io/no-endpoint'); + }); + + test('container with minimal endpoint', async () => { + const metaYamlPath = path.resolve(__dirname, '..', '_data', 'meta', 'container-minimal-endpoint.yaml'); + const metaYamlContent = await fs.readFile(metaYamlPath, 'utf-8'); + const metaYaml = jsYaml.safeLoad(metaYamlContent); + const devfileYaml = metaYamlToDevfileYaml.convert(metaYaml); + expect(devfileYaml.schemaVersion).toBe('2.1.0'); + expect(devfileYaml.metadata?.name).toBe('minimal-endpoint'); + expect(devfileYaml.components).toBeDefined(); + expect(devfileYaml.components?.length).toBe(1); + const component = devfileYaml.components[0]; + expect(component.name).toBe('minimal-endpoint'); + const componentContainer = component.container; + expect(componentContainer.image).toBe('quay.io/minimal-endpoint'); + + expect(componentContainer.endpoints).toBeDefined(); + expect(componentContainer.endpoints?.length).toBe(1); + const wwwEndpoint = componentContainer.endpoints[0]; + expect(wwwEndpoint.name).toBe('www'); + expect(wwwEndpoint.exposure).toBeUndefined(); + expect(wwwEndpoint.attributes).toBeUndefined(); + }); +}); diff --git a/tools/build/tests/inversify-binding.spec.ts b/tools/build/tests/inversify-binding.spec.ts index 610bf7fbd5..24da32ac46 100644 --- a/tools/build/tests/inversify-binding.spec.ts +++ b/tools/build/tests/inversify-binding.spec.ts @@ -25,6 +25,7 @@ import { FeaturedAnalyzer } from '../src/featured/featured-analyzer'; import { FeaturedWriter } from '../src/featured/featured-writer'; import { IndexWriter } from '../src/meta-yaml/index-writer'; import { InversifyBinding } from '../src/inversify-binding'; +import { MetaYamlToDevfileYaml } from '../src/devfile/meta-yaml-to-devfile-yaml'; import { MetaYamlWriter } from '../src/meta-yaml/meta-yaml-writer'; import { RecommendationsAnalyzer } from '../src/recommendations/recommendations-analyzer'; import { RecommendationsWriter } from '../src/recommendations/recommendations-writer'; @@ -56,6 +57,9 @@ describe('Test InversifyBinding', () => { expect(container.get(CheTheiaPluginsAnalyzer)).toBeDefined(); expect(container.get(CheTheiaPluginsMetaYamlGenerator)).toBeDefined(); + // check devfile module + expect(container.get(MetaYamlToDevfileYaml)).toBeDefined(); + // check editor module expect(container.get(CheEditorsAnalyzer)).toBeDefined(); expect(container.get(CheEditorsMetaYamlGenerator)).toBeDefined(); diff --git a/tools/build/tests/meta-yaml/index-writer.spec.ts b/tools/build/tests/meta-yaml/index-writer.spec.ts index 8ff5350294..04af7ede83 100644 --- a/tools/build/tests/meta-yaml/index-writer.spec.ts +++ b/tools/build/tests/meta-yaml/index-writer.spec.ts @@ -79,6 +79,7 @@ describe('Test IndexWriter', () => { expect(jsonOutput[0].id).toBe('my-publisher/my-che-editor-name/latest'); expect(jsonOutput[0].description).toBe('my-che-plugin'); expect(jsonOutput[0].links.self).toBe('/v3/plugins/my-publisher/my-che-editor-name/latest'); + expect(jsonOutput[0].links.devfile).toBe('/v3/plugins/my-publisher/my-che-editor-name/latest/devfile.yaml'); expect(jsonOutput[0].name).toBe('my-che-editor-name'); expect(jsonOutput[0].publisher).toBe('my-publisher'); expect(jsonOutput[0].type).toBe('Che Editor'); @@ -87,6 +88,7 @@ describe('Test IndexWriter', () => { expect(jsonOutput[1].id).toBe('my-publisher/my-che-plugin-name/latest'); expect(jsonOutput[1].description).toBe('my-che-plugin'); expect(jsonOutput[1].links.self).toBe('/v3/plugins/my-publisher/my-che-plugin-name/latest'); + expect(jsonOutput[1].links.devfile).toBe('/v3/plugins/my-publisher/my-che-plugin-name/latest/devfile.yaml'); expect(jsonOutput[1].name).toBe('my-che-plugin-name'); expect(jsonOutput[1].publisher).toBe('my-publisher'); expect(jsonOutput[1].type).toBe('Che Plugin'); @@ -95,6 +97,8 @@ describe('Test IndexWriter', () => { expect(jsonOutput[2].id).toBe('my-publisher/my-name/latest'); expect(jsonOutput[2].description).toBe('my-description'); expect(jsonOutput[2].links.self).toBe('/v3/plugins/my-publisher/my-name/latest'); + // no devfile generation for VS Code extensions + expect(jsonOutput[2].links.devfile).toBeUndefined(); expect(jsonOutput[2].name).toBe('my-name'); expect(jsonOutput[2].publisher).toBe('my-publisher'); expect(jsonOutput[2].type).toBe('VS Code extension'); diff --git a/tools/build/tests/meta-yaml/meta-yaml-writer.spec.ts b/tools/build/tests/meta-yaml/meta-yaml-writer.spec.ts index 56641dc72d..5721933556 100644 --- a/tools/build/tests/meta-yaml/meta-yaml-writer.spec.ts +++ b/tools/build/tests/meta-yaml/meta-yaml-writer.spec.ts @@ -15,6 +15,7 @@ import * as moment from 'moment'; import { Container } from 'inversify'; import { MetaYamlPluginInfo } from '../../src/meta-yaml/meta-yaml-plugin-info'; +import { MetaYamlToDevfileYaml } from '../../src/devfile/meta-yaml-to-devfile-yaml'; import { MetaYamlWriter } from '../../src/meta-yaml/meta-yaml-writer'; import { VsixInfo } from '../../src/extensions/vsix-info'; @@ -27,10 +28,16 @@ describe('Test MetaYamlWriter', () => { let embedVsix = false; const vsixInfos = new Map(); + const metaYamlToDevfileYamlConvertMethod = jest.fn(); + const metaYamlToDevfileYaml = { + convert: metaYamlToDevfileYamlConvertMethod, + } as any; + function initContainer() { container = new Container(); container.bind('string').toConstantValue('/fake-output').whenTargetNamed('OUTPUT_ROOT_DIRECTORY'); container.bind('boolean').toConstantValue(embedVsix).whenTargetNamed('EMBED_VSIX'); + container.bind(MetaYamlToDevfileYaml).toConstantValue(metaYamlToDevfileYaml); container.bind(MetaYamlWriter).toSelf().inSingletonScope(); } @@ -387,4 +394,60 @@ spec: {} // no version written with disable Latest expect(fsWriteFileSpy).toHaveBeenCalledTimes(1); }); + + test('meta yaml --> devfile yaml', async () => { + initContainer(); + metaYamlWriter = container.get(MetaYamlWriter); + + const fsCopyFileSpy = jest.spyOn(fs, 'copyFile'); + const fsEnsureDirSpy = jest.spyOn(fs, 'ensureDir'); + const fsWriteFileSpy = jest.spyOn(fs, 'writeFile'); + + fsEnsureDirSpy.mockReturnValue(); + fsCopyFileSpy.mockReturnValue(); + fsWriteFileSpy.mockReturnValue(); + + metaPluginYaml = { + apiVersion: 'v2', + id: 'foo/bar', + publisher: 'foo', + name: 'bar', + version: '0.0.1', + displayName: 'minimal-endpoint', + title: 'minimal-endpoint', + description: 'minimal-endpoint', + icon: '/v3/images/eclipse-che-logo.png', + category: 'Other', + repository: 'http://fake-repository', + firstPublicationDate: '2019-01-01', + latestUpdateDate, + type: 'Che Plugin', + spec: { + endpoints: [ + { + name: 'www', + targetPort: 3100, + }, + ], + containers: [ + { + name: 'minimal-endpoint', + image: 'quay.io/minimal-endpoint', + }, + ], + }, + } as any; + + const metaYamlPlugins: MetaYamlPluginInfo[] = [metaPluginYaml]; + metaYamlToDevfileYamlConvertMethod.mockReturnValue({ devfileFakeResult: 'dummy' }); + await metaYamlWriter.write(metaYamlPlugins); + + expect(fsWriteFileSpy).toHaveBeenCalledTimes(2); + + expect(fsWriteFileSpy).toHaveBeenNthCalledWith( + 2, + '/fake-output/v3/plugins/foo/bar/latest/devfile.yaml', + 'devfileFakeResult: dummy\n' + ); + }); }); From 29b45bde25f39832f606cf22895c3d95bc376f18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Pupier?= Date: Thu, 25 Feb 2021 21:54:41 +0100 Subject: [PATCH 10/11] Upgrade VS Code Camel to 0.0.21 eclipse/che#19123 (#851) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit the Camel K binary used by default is newer (upgrade to 1.3.1) Signed-off-by: Aurélien Pupier --- sidecars/camelk/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sidecars/camelk/Dockerfile b/sidecars/camelk/Dockerfile index 347b934d42..74ff0601c4 100644 --- a/sidecars/camelk/Dockerfile +++ b/sidecars/camelk/Dockerfile @@ -9,7 +9,7 @@ # Red Hat, Inc. - initial API and implementation FROM quay.io/eclipse/che-sidecar-kubernetes-tooling:1.2.1-6144144 -ENV KAMEL_VERSION 1.2.1 +ENV KAMEL_VERSION 1.3.1 RUN curl -L https://github.com/apache/camel-k/releases/download/v${KAMEL_VERSION}/camel-k-client-${KAMEL_VERSION}-linux-64bit.tar.gz | tar -C /usr/local/bin -xz \ && chmod +x /usr/local/bin/kamel From 8dec90b47a76622da90da7e4538b1ed95374875e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Pupier?= Date: Thu, 25 Feb 2021 21:55:08 +0100 Subject: [PATCH 11/11] Upgrade VS Code Camel to 0.0.21 eclipse/che#19123 (#852) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Aurélien Pupier --- che-theia-plugins.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/che-theia-plugins.yaml b/che-theia-plugins.yaml index 5460827520..5460557d5e 100644 --- a/che-theia-plugins.yaml +++ b/che-theia-plugins.yaml @@ -189,7 +189,7 @@ plugins: https://download.jboss.org/jbosstools/vscode/3rdparty/vscode-yaml/vscode-yaml-0.8.0.vsix - repository: url: 'https://github.com/camel-tooling/vscode-camelk' - revision: 0.0.20 + revision: 0.0.21 sidecar: directory: camelk name: vscode-camelk @@ -198,7 +198,7 @@ plugins: cpuRequest: 30m extensions: - >- - https://download.jboss.org/jbosstools/vscode/stable/vscode-camelk/vscode-camelk-0.0.20-83.vsix + https://download.jboss.org/jbosstools/vscode/stable/vscode-camelk/vscode-camelk-0.0.21-109.vsix - >- https://download.jboss.org/jbosstools/vscode/3rdparty/vscode-kubernetes-tools/vscode-kubernetes-tools-1.2.1.vsix - >-