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

Updated the devfile metadata to be more consistent #134

Merged
merged 13 commits into from
Oct 18, 2022
Merged
Show file tree
Hide file tree
Changes from 3 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
39 changes: 21 additions & 18 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ The following are required to build the devfile index container image containing

7) Open a pull request against this repository with a brief description of the change.


### Updating

Updating an existing devfile stack is relatively straightforward:
Expand All @@ -55,7 +54,7 @@ Updating an existing devfile stack is relatively straightforward:

- When updating a stack with a newer version of the devfile specification (e.g., 2.1.0 -> 2.2.0), the previous version of the stack **must** be kept for a minimum of one (1) year.
4) Test your changes:

- Minimally, testing with odo (`odo create`, `odo push`, etc) is recommended, however if your Devfile is used with other tools, it's recommended to test there as well.
5) Open a pull request against this repository with your changes.

Expand All @@ -71,19 +70,21 @@ The devfile samples used in this devfile registry are stored in the `extraDevfil

2) Open `extraDevfileEntries.yaml` in an editor
3) Add an entry to the file with the following required fields:
```
- name: <sample-name>
displayName: <sample-display-name>
description: <sample-description>
icon: <link-to-sample-icon>
tags: ["comma", "separated", "list", "of", "tags"]
projectType: <sample-project-type>
language: <sample-language>
git:
remotes:
origin: <link-to-sample-git-repository>
```
4) Fill in the fields in the angle brackets based on your sample. Note that there must be only one git remote for the devfile sample.

```yaml
- name: <sample-name>
displayName: <sample-display-name>
description: <sample-description>
icon: <link-to-sample-icon>
tags: ["comma", "separated", "list", "of", "tags"]
projectType: <sample-project-type>
language: <sample-language>
git:
remotes:
origin: <link-to-sample-git-repository>
```

4) Fill in the fields in the angle brackets based on your sample. Note that there must be only one git remote for the devfile sample.
5) Open a pull request against this repository with your changes.

### Updating
Expand All @@ -95,15 +96,17 @@ To update a sample:
3) Make the necessary changes.
4) Open a pull request against this repository with your changes.


## How to Test Changes

### Odo

`odo create` and `odo push` to test devfile changes. See [Odo Doc](https://odo.dev/docs/using-odo/create-component) for more details.

### Che

Opening the URL `https://workspaces.openshift.com/#<repository_url>` in your browser should start a workspace where `exec` commands run successfully. Type `task+<space>` in the IDE command palette to see the list of available commands.

### Console
In developer view, create an application via `Import from Git`. Provide git repository Url and verify if the application can be built and ran successfully.
Note: Currently Console only works with devfile v2.2.0 samples with outer loop support.

In developer view, create an application via `Import from Git`. Provide git repository Url and verify if the application can be built and ran successfully.
Note: Currently Console only works with devfile v2.2.0 samples with outer loop support.
47 changes: 29 additions & 18 deletions extraDevfileEntries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ samples:
displayName: Basic Node.js
description: A simple Hello World Node.js application
icon: https://nodejs.org/static/images/logos/nodejs-new-pantone-black.svg
tags: ['NodeJS', 'Express']
projectType: nodejs
language: nodejs
tags:
- Node.js
- Express
projectType: Node.js
language: JavaScript
provider: Red Hat
git:
remotes:
Expand All @@ -15,9 +17,11 @@ samples:
displayName: Basic Quarkus
description: A simple Hello World Java application using Quarkus
icon: https://design.jboss.org/quarkus/logo/final/SVG/quarkus_icon_rgb_default.svg
tags: ['Java', 'Quarkus']
projectType: quarkus
language: java
tags:
- Java
- Quarkus
projectType: Quarkus
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the type not still lower case quarkus?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Language and projectType should follow the same case as the commercial display name.

language: Java
provider: Red Hat
git:
remotes:
Expand All @@ -26,9 +30,11 @@ samples:
displayName: Basic Spring Boot
description: A simple Hello World Java Spring Boot application using Maven
icon: https://spring.io/images/projects/spring-edf462fec682b9d48cf628eaf9e19521.svg
tags: ['Java', 'Spring']
projectType: springboot
language: java
tags:
- Java
- Spring Boot
projectType: Spring Boot
language: Java
provider: Red Hat
git:
remotes:
Expand All @@ -37,9 +43,12 @@ samples:
displayName: Basic Python
description: A simple Hello World application using Python
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/python.svg
tags: ['Python']
projectType: python
language: python
tags:
- Python
- Pip
- Flask
projectType: Python
language: Python
provider: Red Hat
git:
remotes:
Expand All @@ -48,9 +57,10 @@ samples:
displayName: Basic Go
description: A simple Hello World application using Go
icon: https://go.dev/blog/go-brand/Go-Logo/SVG/Go-Logo_Blue.svg
tags: ['Go']
projectType: go
language: go
tags:
- Go
projectType: Go
language: Go
provider: Red Hat
git:
remotes:
Expand All @@ -59,9 +69,10 @@ samples:
displayName: Basic .NET 6.0
description: A simple application using .NET 6.0
icon: https://github.com/dotnet/brand/raw/main/logo/dotnet-logo.png
tags: ['dotnet']
projectType: dotnet
language: dotnet
tags:
- Dotnet
projectType: Dotnet
language: Dotnet
provider: Red Hat
git:
remotes:
Expand Down
14 changes: 5 additions & 9 deletions stacks/dotnet50/devfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ metadata:
displayName: .NET 5.0
description: Stack with .NET 5.0
icon: https://github.com/dotnet/brand/raw/main/logo/dotnet-logo.png
language: dotnet
projectType: dotnet
language: Dotnet
projectType: Dotnet
tags:
- dotnet
version: 1.0.1

- Dotnet
version: 1.0.3
starterProjects:
- name: dotnet-example
git:
Expand All @@ -19,12 +18,11 @@ starterProjects:
remotes:
origin: https://github.com/redhat-developer/s2i-dotnetcore-ex
subDir: app

components:
- name: dotnet
container:
image: registry.access.redhat.com/ubi8/dotnet-50:5.0
args: ["tail", "-f", "/dev/null"]
args: ['tail', '-f', '/dev/null']
mountSources: true
env:
- name: CONFIGURATION
Expand All @@ -38,7 +36,6 @@ components:
endpoints:
- name: http-dotnet50
targetPort: 8080

commands:
- id: build
exec:
Expand All @@ -48,7 +45,6 @@ commands:
group:
isDefault: true
kind: build

- id: run
exec:
workingDir: ${PROJECT_SOURCE}
Expand Down
14 changes: 5 additions & 9 deletions stacks/dotnet60/devfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ metadata:
displayName: .NET 6.0
description: Stack with .NET 6.0
icon: https://github.com/dotnet/brand/raw/main/logo/dotnet-logo.png
language: dotnet
projectType: dotnet
language: Dotnet
projectType: Dotnet
tags:
- dotnet
version: 1.0.0

- Dotnet
version: 1.0.2
starterProjects:
- name: dotnet-example
git:
Expand All @@ -19,12 +18,11 @@ starterProjects:
remotes:
origin: https://github.com/redhat-developer/s2i-dotnetcore-ex
subDir: app

components:
- name: dotnet
container:
image: registry.access.redhat.com/ubi8/dotnet-60:6.0
args: ["tail", "-f", "/dev/null"]
args: ['tail', '-f', '/dev/null']
mountSources: true
env:
- name: CONFIGURATION
Expand All @@ -38,7 +36,6 @@ components:
endpoints:
- name: http-dotnet60
targetPort: 8080

commands:
- id: build
exec:
Expand All @@ -48,7 +45,6 @@ commands:
group:
isDefault: true
kind: build

- id: run
exec:
workingDir: ${PROJECT_SOURCE}
Expand Down
14 changes: 5 additions & 9 deletions stacks/dotnetcore31/devfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ metadata:
displayName: .NET Core 3.1
description: Stack with .NET Core 3.1
icon: https://github.com/dotnet/brand/raw/main/logo/dotnet-logo.png
language: dotnet
projectType: dotnet
language: Dotnet
projectType: Dotnet
tags:
- dotnet
version: 1.0.1

- Dotnet
version: 1.0.3
starterProjects:
- name: dotnetcore-example
git:
Expand All @@ -19,12 +18,11 @@ starterProjects:
remotes:
origin: https://github.com/redhat-developer/s2i-dotnetcore-ex
subDir: app

components:
- name: dotnet
container:
image: registry.access.redhat.com/ubi8/dotnet-31:3.1
args: ["tail", "-f", "/dev/null"]
args: ['tail', '-f', '/dev/null']
mountSources: true
env:
- name: CONFIGURATION
Expand All @@ -38,7 +36,6 @@ components:
endpoints:
- name: http-dotnetcore
targetPort: 8080

commands:
- id: build
exec:
Expand All @@ -48,7 +45,6 @@ commands:
group:
isDefault: true
kind: build

- id: run
exec:
workingDir: ${PROJECT_SOURCE}
Expand Down
7 changes: 4 additions & 3 deletions stacks/go/devfile.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
schemaVersion: 2.1.0
metadata:
description: 'Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.'
displayName: Go Web App
displayName: Go Runtime
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/golang.svg
name: go
projectType: Go
provider: Red Hat
language: Go
tags:
- Go
version: 1.0.1
version: 1.0.2
starterProjects:
- name: go-starter
description: A Go project with a simple HTTP server
git:
checkoutFrom:
revision: main
Expand All @@ -23,7 +24,7 @@ components:
- name: http-go
targetPort: 8080
image: quay.io/devfile/golang:latest
args: ["tail", "-f", "/dev/null"]
args: ['tail', '-f', '/dev/null']
memoryLimit: 1024Mi
mountSources: true
name: runtime
Expand Down
10 changes: 6 additions & 4 deletions stacks/java-maven/devfile.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
schemaVersion: 2.1.0
metadata:
name: java-maven
version: 1.1.0
version: 1.1.1
displayName: Maven Java
description: Upstream Maven and OpenJDK 11
tags: ['Java', 'Maven']
projectType: 'maven'
language: 'java'
tags:
- Java
- Maven
projectType: Maven
language: Java
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/java-maven.jpg
starterProjects:
- name: springbootproject
Expand Down
24 changes: 15 additions & 9 deletions stacks/java-openliberty-gradle/devfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,25 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

schemaVersion: 2.1.0
metadata:
name: java-openliberty-gradle
version: 0.3.1
displayName: 'Open Liberty Gradle'
version: 0.3.2
displayName: Open Liberty Gradle
description: Java application Gradle-built stack using the Open Liberty runtime
icon: https://raw.githubusercontent.com/OpenLiberty/logos/7fbb132949b9b2589e18c8d5665c1b107028a21d/logomark/svg/OL_logomark.svg
tags: ['Java', 'Gradle']
architectures: ['amd64', 'ppc64le', 's390x']
language: 'java'
projectType: 'openliberty'
alpha.build-dockerfile: 'https://github.com/OpenLiberty/devfile-stack/releases/download/open-liberty-gradle-0.3.1/Dockerfile'
alpha.deployment-manifest: 'https://github.com/OpenLiberty/devfile-stack/releases/download/open-liberty-gradle-0.3.1/app-deploy.yaml'
tags:
- Java
- Gradle
architectures:
- amd64
- ppc64le
- s390x
language: Java
projectType: Open Liberty
alpha.build-dockerfile: https://github.com/OpenLiberty/devfile-stack/releases/download/open-liberty-gradle-0.3.1/Dockerfile
alpha.deployment-manifest: https://github.com/OpenLiberty/devfile-stack/releases/download/open-liberty-gradle-0.3.1/app-deploy.yaml
starterProjects:
- name: rest
git:
Expand All @@ -40,7 +46,7 @@ components:
- name: dev
container:
image: icr.io/appcafe/open-liberty-devfile-stack:{{liberty-version}}-gradle
args: ["tail", "-f", "/dev/null"]
args: ['tail', '-f', '/dev/null']
memoryLimit: 1280Mi
mountSources: true
endpoints:
Expand Down
Loading