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

Update contributing guide for sample multiple versions #199

Merged
merged 5 commits into from
Sep 22, 2023
Merged
Changes from 4 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
63 changes: 56 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,16 @@ Updating an existing devfile stack is relatively straightforward:

The devfile samples used in this devfile registry are stored in the `extraDevfileEntries.yaml` file in the root of the repository. To add a devfile sample:

1) Verify your Sample functions with 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.
1) Verifying your Sample functions with OpenShift Console

- Use the Developer perspective and import the Devfile Sample using Import from Git.

2) Verifying your Sample functions with RHTAP

2) Open `extraDevfileEntries.yaml` in an editor
3) Add an entry to the file with the following required fields:
- Create an application by importing the sample from Git.

3) Open `extraDevfileEntries.yaml` in an editor
4) Add an entry to the file with the following required fields:

```yaml
- name: <sample-name>
Expand All @@ -85,8 +89,53 @@ The devfile samples used in this devfile registry are stored in the `extraDevfil
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.
5) 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.
6) Open a pull request against this repository with your changes.

### Adding a new version

In case you want to add another version to a new devfile sample you can update the existing sample inside the `extraDevfileEntries.yaml` file:

1) Verifying your Sample functions with OpenShift Console

- Use the Developer perspective and import the Devfile Sample using Import from Git.

2) Verifying your Sample functions with RHTAP

- Create an application by importing the sample from Git.

3) Open `extraDevfileEntries.yaml` in an editor
4) A sample with multiple versions should be:

```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>
versions:
- version: <version1>
schemaVersion: <devfile-schemaVersion>
git:
checkoutFrom:
revision: <sample-git-repo-commit-id-or-branch>
remotes:
origin: <link-to-sample-git-repository>
- version: <version1>
schemaVersion: <devfile-schemaVersion>
git:
checkoutFrom:
revision: <sample-git-repo-commit-id-or-branch>
remotes:
# Note that it is also possible to use different repos
# for each version of a sample.
origin: <link-to-sample-git-repository>
```

5) 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.
6) Open a pull request against this repository with your changes.

### Updating

Expand Down