Include JSON schema for devfile 2.1.0-alpha (#19552)

Signed-off-by: Pavol Baran <pbaran@redhat.com>
7.30.x
Pavol Baran 2021-04-12 14:46:15 +02:00 committed by GitHub
parent f58c54f601
commit 880adbdec0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 1884 additions and 4 deletions

View File

@ -23,7 +23,8 @@ public class Constants {
public static final String CURRENT_API_VERSION = "1.0.0";
public static final List<String> SUPPORTED_VERSIONS = List.of(CURRENT_API_VERSION, "2.0.0");
public static final List<String> SUPPORTED_VERSIONS =
List.of(CURRENT_API_VERSION, "2.0.0", "2.1.0-alpha");
public static final String EDITOR_COMPONENT_TYPE = "cheEditor";

View File

@ -83,7 +83,9 @@ public class DevfileSchemaValidatorTest {
{"devfile/devfile_v2_just_schemaVersion.yaml"},
{"devfile/devfile_v2_sample-devfile.yaml"},
{"devfile/devfile_v2_simple-devfile.yaml"},
{"devfile/devfile_v2_spring-boot-http-booster-devfile.yaml"}
{"devfile/devfile_v2_spring-boot-http-booster-devfile.yaml"},
{"devfile/devfile_v2-1-0-alpha_just_schemaVersion.yaml"},
{"devfile/devfile_v2-1-0-alpha_simple-devfile.yaml"},
};
}
@ -261,11 +263,19 @@ public class DevfileSchemaValidatorTest {
},
{
"devfile/devfile_v2_invalid_schemaVersion.yaml",
"Version 'a.b.c' of the devfile is not supported. Supported versions are '[1.0.0, 2.0.0]'."
"Version 'a.b.c' of the devfile is not supported. Supported versions are '[1.0.0, 2.0.0, 2.1.0-alpha]'."
},
{
"devfile/devfile_v2_unsupported_schemaVersion.yaml",
"Version '22.33.44' of the devfile is not supported. Supported versions are '[1.0.0, 2.0.0]'."
"Version '22.33.44' of the devfile is not supported. Supported versions are '[1.0.0, 2.0.0, 2.1.0-alpha]'."
},
{
"devfile/devfile_v2-1-0-alpha_unsupported_schemaVersion.yaml",
"Version '2.1.0-beta' of the devfile is not supported. Supported versions are '[1.0.0, 2.0.0, 2.1.0-alpha]'."
},
{
"devfile/devfile_v2-1-0-alpha_with_invalid_plugin_definition.yaml",
"(/components/0/plugin):The object must not have a property whose name is \"plugin\".(/components/0):The object must have a property whose name is \"name\".Exactly one of the following sets of problems must be resolved.: [(/components/0):The object must have a property whose name is \"container\".(/components/0):The object must have a property whose name is \"kubernetes\".(/components/0):The object must have a property whose name is \"openshift\".(/components/0):The object must have a property whose name is \"volume\".]"
}
};
}

View File

@ -0,0 +1,14 @@
#
# Copyright (c) 2012-2018 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
#
# Contributors:
# Red Hat, Inc. - initial API and implementation
#
---
schemaVersion: 2.1.0-alpha

View File

@ -0,0 +1,26 @@
#
# Copyright (c) 2012-2018 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
#
# Contributors:
# Red Hat, Inc. - initial API and implementation
#
schemaVersion: 2.1.0-alpha
metadata:
name: spring-petclinic
components:
- name: maven
container:
image: quay.io/eclipse/che-java8-maven:nightly
volumeMounts:
- name: mavenrepo
path: /root/.m2
env:
- name: ENV_VAR
value: value
memoryLimit: 1536M

View File

@ -0,0 +1,14 @@
#
# Copyright (c) 2012-2018 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
#
# Contributors:
# Red Hat, Inc. - initial API and implementation
#
---
schemaVersion: 2.1.0-beta

View File

@ -0,0 +1,26 @@
#
# Copyright (c) 2012-2018 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
#
# Contributors:
# Red Hat, Inc. - initial API and implementation
#
schemaVersion: 2.1.0-alpha
metadata:
name: test-project
attributes:
type: workspace
projects:
- name: test-project
git:
remotes:
origin: https://github.com/Test/Project
components:
- plugin:
name: java language server
id: redhat/java11/0.57.0