Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Architectures in odo registry #6959

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
```console
$ odo registry --devfile nodejs-react
NAME REGISTRY DESCRIPTION VERSIONS
nodejs-react StagingRegistry React is a free and open-source front-en... 2.0.2, 2.1.0, 2.2.0
nodejs-react DefaultDevfileRegistry React is a free and open-source front-en... 2.0.2, 2.1.0, 2.2.0
NAME REGISTRY DESCRIPTION ARCHITECTURES VERSIONS
nodejs-react StagingRegistry React is a free and open-source front-en... 2.0.2, 2.1.0, 2.2.0
nodejs-react DefaultDevfileRegistry React is a free and open-source front-en... 2.0.2, 2.1.0, 2.2.0
```
53 changes: 21 additions & 32 deletions docs/website/docs/command-reference/json-output.md
Original file line number Diff line number Diff line change
Expand Up @@ -368,56 +368,45 @@ odo registry -o json
```json
[
{
"name": "python",
"displayName": "Python",
"description": "Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together.",
"name": "java-openliberty",
"displayName": "Open Liberty Maven",
"description": "Java application based on Java 11 and Maven 3.8, using the Open Liberty runtime 22.0.0.1",
"registry": {
"name": "DefaultDevfileRegistry",
"url": "https://registry.devfile.io",
"secure": false
},
"language": "Python",
"language": "Java",
"tags": [
"Python",
"Pip",
"Flask"
"Java",
"Maven"
],
"projectType": "Python",
"version": "2.1.0",
"projectType": "Open Liberty",
"version": "0.9.0",
"versions": [
{
"version": "2.1.0",
"version": "0.9.0",
"isDefault": true,
"schemaVersion": "2.1.0",
"starterProjects": [
"flask-example"
"rest"
],
"commandGroups": {
"build": true,
"debug": true,
"deploy": false,
"run": true,
"test": false
}
},
{
"version": "3.0.0",
"isDefault": false,
"schemaVersion": "2.2.0",
"starterProjects": [
"flask-example"
],
"commandGroups": {
"build": true,
"debug": true,
"deploy": false,
"run": true,
"test": false
"build": false,
"debug": true,
"deploy": false,
"run": true,
"test": true
}
}
],
"starterProjects": [
"flask-example"
"rest"
],
"architectures": [
"amd64",
"ppc64le",
"s390x"
]
},
[...]
Expand Down
65 changes: 37 additions & 28 deletions docs/website/docs/command-reference/registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ These flags let you filter the listed Devfile stacks:
* `--devfile <name>` to list the Devfile stacks with this exact name
* `--devfile-registry <name>` to list the Devfile stack of this registry (this is the `name` used
when adding the registry to the preferences with `odo preference add registry <name> <url>`)
* `--filter <term>` to list the Devfile for which the term is found in the devfile name or description
* `--filter <term>` to list the Devfile for which the term is found in the devfile name, description or supported architectures

By default, the name, registry, description and versions of the Devfile stacks are displayed on a table.
By default, the name, registry, description, supported architectures, and versions of the Devfile stacks are displayed on a table.

Note that Devfile stacks with no architectures are supposed to be compatible with **all** architectures.

The flags below let you change the content of the output:

Expand Down Expand Up @@ -48,18 +50,20 @@ odo registry
<summary>Example</summary>

```console
$ odo registry
NAME REGISTRY DESCRIPTION VERSIONS
dotnet50 Staging Stack with .NET 5.0 1.0.3
dotnet50 DefaultDevfileRegistry Stack with .NET 5.0 1.0.3
dotnet60 Staging Stack with .NET 6.0 1.0.2
dotnet60 DefaultDevfileRegistry Stack with .NET 6.0 1.0.2
dotnetcore31 Staging Stack with .NET Core 3.1 1.0.3
dotnetcore31 DefaultDevfileRegistry Stack with .NET Core 3.1 1.0.3
go Staging Go is an open source programming languag... 1.0.2, 2.0.0
go DefaultDevfileRegistry Go is an open source programming languag... 1.0.2, 2.0.0
java-maven Staging Upstream Maven and OpenJDK 11 1.2.0
java-maven DefaultDevfileRegistry Upstream Maven and OpenJDK 11 1.2.0
$ odo registry
NAME REGISTRY DESCRIPTION ARCHITECTURES VERSIONS
dotnet50 Staging .NET 5.0 application 1.0.3
dotnet50 DefaultDevfileRegistry .NET 5.0 application 1.0.3
dotnet60 Staging .NET 6.0 application 1.0.2
dotnet60 DefaultDevfileRegistry .NET 6.0 application 1.0.2
dotnetcore31 Staging .NET Core 3.1 application 1.0.3
dotnetcore31 DefaultDevfileRegistry .NET Core 3.1 application 1.0.3
go Staging Go is an open source programming languag... 1.0.2, 1.1.0, 2.0.0, 2.1.0
go DefaultDevfileRegistry Go is an open source programming languag... 1.0.2, 1.1.0, 2.0.0, 2.1.0
java-maven Staging Java application based on Maven 3.6 and ... 1.2.0
java-maven DefaultDevfileRegistry Java application based on Maven 3.6 and ... 1.2.0
java-openliberty Staging Java application based on Java 11 and Ma... amd64, ppc64le, s390x 0.9.0
java-openliberty DefaultDevfileRegistry Java application based on Java 11 and Ma... amd64, ppc64le, s390x 0.9.0
[...]
```
</details>
Expand All @@ -76,12 +80,13 @@ odo registry --devfile-registry <registry>

```console
$ odo registry --devfile-registry Staging
NAME REGISTRY DESCRIPTION VERSIONS
dotnet50 Staging Stack with .NET 5.0 1.0.3
dotnet60 Staging Stack with .NET 6.0 1.0.2
dotnetcore31 Staging Stack with .NET Core 3.1 1.0.3
go Staging Go is an open source programming languag... 1.0.2, 2.0.0
java-maven Staging Upstream Maven and OpenJDK 11 1.2.0
NAME REGISTRY DESCRIPTION ARCHITECTURES VERSIONS
dotnet50 Staging .NET 5.0 application 1.0.3
dotnet60 Staging .NET 6.0 application 1.0.2
dotnetcore31 Staging .NET Core 3.1 application 1.0.3
go Staging Go is an open source programming languag... 1.0.2, 1.1.0, 2.0.0, 2.1.0
java-maven Staging Java application based on Maven 3.6 and ... 1.2.0
java-openliberty Staging Java application based on Java 11 and Ma... amd64, ppc64le, s390x 0.9.0
[...]
```
</details>
Expand Down Expand Up @@ -119,24 +124,28 @@ odo registry --devfile <devfile> --devfile-registry <registry> --details
<summary>Example</summary>

```console
$ odo registry --devfile java-maven --devfile-registry Staging --details
Name: java-maven
Display Name: Maven Java
$ odo registry list --devfile-registry Staging --devfile java-openliberty --details
Name: java-openliberty
Display Name: Open Liberty Maven
Registry: Staging
Registry URL: https://registry.stage.devfile.io
Version: 1.2.0
Description: Upstream Maven and OpenJDK 11
Version: 0.9.0
Description: Java application based on Java 11 and Maven 3.8, using the Open Liberty runtime 22.0.0.1
Tags: Java, Maven
Project Type: Maven
Project Type: Open Liberty
Language: Java
Starter Projects:
- springbootproject
- rest
Supported odo Features:
- Dev: Y
- Deploy: N
- Debug: Y
Architectures:
- amd64
- ppc64le
- s390x
Versions:
- 1.2.0
- 0.9.0

```
</details>
Expand Down
53 changes: 27 additions & 26 deletions docs/website/docs/user-guides/quickstart/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,33 @@ A full list of example applications can be viewed with the `odo registry` comman
<summary>Example</summary>

```shell
$ odo registry
NAME REGISTRY DESCRIPTION VERSIONS
dotnet50 DefaultDevfileRegistry Stack with .NET 5.0 1.0.3
dotnet60 DefaultDevfileRegistry Stack with .NET 6.0 1.0.2
dotnetcore31 DefaultDevfileRegistry Stack with .NET Core 3.1 1.0.3
go DefaultDevfileRegistry Go is an open source programming languag... 1.0.2, 2.0.0
java-maven DefaultDevfileRegistry Upstream Maven and OpenJDK 11 1.2.0
java-openliberty DefaultDevfileRegistry Java application Maven-built stack using... 0.9.0
java-openliberty-gradle DefaultDevfileRegistry Java application Gradle-built stack usin... 0.4.0
java-quarkus DefaultDevfileRegistry Quarkus with Java 1.3.0
java-springboot DefaultDevfileRegistry Spring Boot using Java 1.2.0, 2.0.0
java-vertx DefaultDevfileRegistry Upstream Vert.x using Java 1.2.0
java-websphereliberty DefaultDevfileRegistry Java application Maven-built stack using... 0.9.0
java-websphereliberty-gradle DefaultDevfileRegistry Java application Gradle-built stack usin... 0.4.0
java-wildfly DefaultDevfileRegistry Upstream WildFly 1.1.0
java-wildfly-bootable-jar DefaultDevfileRegistry Java stack with WildFly in bootable Jar ... 1.1.0
nodejs DefaultDevfileRegistry Stack with Node.js 16 2.1.1
nodejs-angular DefaultDevfileRegistry Angular is a development platform, built... 2.0.2
nodejs-nextjs DefaultDevfileRegistry Next.js gives you the best developer exp... 1.0.3
nodejs-nuxtjs DefaultDevfileRegistry Nuxt is the backbone of your Vue.js proj... 1.0.3
nodejs-react DefaultDevfileRegistry React is a free and open-source front-en... 2.0.2
nodejs-svelte DefaultDevfileRegistry Svelte is a radical new approach to buil... 1.0.3
nodejs-vue DefaultDevfileRegistry Vue is a JavaScript framework for buildi... 1.0.2
php-laravel DefaultDevfileRegistry Laravel is an open-source PHP framework,... 1.0.1
python DefaultDevfileRegistry Python is an interpreted, object-oriente... 2.1.0, 3.0.0
python-django DefaultDevfileRegistry Django is a high-level Python web framew... 2.1.0
$ odo registry
NAME REGISTRY DESCRIPTION ARCHITECTURES VERSIONS
dotnet50 DefaultDevfileRegistry .NET 5.0 application 1.0.3
dotnet60 DefaultDevfileRegistry .NET 6.0 application 1.0.2
dotnetcore31 DefaultDevfileRegistry .NET Core 3.1 application 1.0.3
go DefaultDevfileRegistry Go is an open source programming languag... 1.0.2, 1.1.0, 2.0.0, 2.1.0
java-maven DefaultDevfileRegistry Java application based on Maven 3.6 and ... 1.2.0
java-openliberty DefaultDevfileRegistry Java application based on Java 11 and Ma... amd64, ppc64le, s390x 0.9.0
java-openliberty-gradle DefaultDevfileRegistry Java application based on Java 11, Gradl... amd64, ppc64le, s390x 0.4.0
java-quarkus DefaultDevfileRegistry Java application using Quarkus and OpenJ... 1.3.0
java-springboot DefaultDevfileRegistry Spring Boot using Java 1.2.0, 2.0.0
java-vertx DefaultDevfileRegistry Java application using Vert.x and OpenJD... 1.2.0
java-websphereliberty DefaultDevfileRegistry Java application based Java 11 and Maven... amd64, ppc64le, s390x 0.9.0
java-websphereliberty-gradle DefaultDevfileRegistry Java application based on Java 11 and Gr... amd64, ppc64le, s390x 0.4.0
java-wildfly DefaultDevfileRegistry Java application based on Java 11, using... 1.1.0
java-wildfly-bootable-jar DefaultDevfileRegistry Java application using WildFly in bootab... 1.1.0
nodejs DefaultDevfileRegistry Node.js application 2.1.1, 2.2.0
nodejs-angular DefaultDevfileRegistry Angular is a development platform, built... 2.0.2, 2.1.0, 2.2.0
nodejs-nextjs DefaultDevfileRegistry Next.js gives you the best developer exp... 1.0.3, 1.1.0, 1.2.0
nodejs-nuxtjs DefaultDevfileRegistry Nuxt is the backbone of your Vue.js proj... 1.0.3, 1.1.0, 1.2.0
nodejs-react DefaultDevfileRegistry React is a free and open-source front-en... 2.0.2, 2.1.0, 2.2.0
nodejs-svelte DefaultDevfileRegistry Svelte is a radical new approach to buil... 1.0.3, 1.1.0, 1.2.0
nodejs-vue DefaultDevfileRegistry Vue is a JavaScript framework for buildi... 1.0.2, 1.1.0, 1.2.0
php-laravel DefaultDevfileRegistry Laravel is an open-source PHP framework,... 1.0.1, 2.0.0
python DefaultDevfileRegistry Python is an interpreted, object-oriente... 2.1.0, 3.0.0
python-django DefaultDevfileRegistry Django is a high-level Python web framew... 2.1.0
udi DefaultDevfileRegistry Universal Developer Image provides vario... 1.0.0

```
</details>
3 changes: 2 additions & 1 deletion pkg/api/registry.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package api

import (
schema "github.com/devfile/registry-support/index/generator/schema"
"github.com/devfile/registry-support/index/generator/schema"
)

// Registry is the main struct of devfile registry
Expand Down Expand Up @@ -33,6 +33,7 @@ type DevfileStack struct {
// Deprecated. Use Versions.StarterProjects instead.
DefaultStarterProjects []string `json:"starterProjects"`
DevfileData *DevfileData `json:"devfileData,omitempty"`
Architectures []string `json:"architectures,omitempty"`
}

type DevfileStackVersion struct {
Expand Down
Loading