-
Notifications
You must be signed in to change notification settings - Fork 32
Added devfile properties #55
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
Changes from all commits
319c692
80e98f0
795f22f
04c8cb8
de84067
6eec759
386e098
cb296b7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
<a href="_attachments/jsonschemas/2.0.0/devfile.json">Download current the JSON Schema</a> | ||
<iframe src="../_attachments/api-reference/2.0.0/index.html" style="border:none;width: 100%;min-height:50em;height:-webkit-fill-available;"></iframe> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
<a href="_attachments/jsonschemas/next/devfile.json">Download current the JSON Schema</a> | ||
<iframe src="../_attachments/api-reference/next/index.html" style="border:none;width: 100%;min-height:50em;height:-webkit-fill-available;"></iframe> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
<a href="_attachments/jsonschemas/stable/devfile.json">Download current the JSON Schema</a> | ||
<iframe src="../_attachments/api-reference/stable/index.html" style="border:none;width: 100%;min-height:50em;height:-webkit-fill-available;"></iframe> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
:description: Refering to a parent devfile in a devfile | ||
:navtitle: Refering to a parent | ||
:keywords: authoring, stack, refering, parent | ||
:page-aliases: | ||
|
||
include::partial$proc_referring-to-a-parent-devfile-in-a-devfile.adoc[] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
:description: Devfile Properties | ||
:navtitle: devfile-properties | ||
:keywords: devfile | ||
// :page-aliases: | ||
|
||
include::partial$proc_devfile-properties.adoc[] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,258 @@ | ||
[id="proc_devfile-properties_{context}"] | ||
= Devfile properties | ||
|
||
[role="_abstract"] | ||
This page quickly introduces you to devfile properties. The code snippets help you get started developing your own devfile projects. The tables show you what the different devfile properties require if you use these properties. See the following table of contents to go to the devfile property you want to work with: | ||
|
||
== SchemaVersion | ||
|
||
[source,yaml] | ||
---- | ||
jc-berger marked this conversation as resolved.
Show resolved
Hide resolved
|
||
v2.0 | ||
--- | ||
schemaVersion: 2.0.0 | ||
---- | ||
|
||
[cols="1,1"] | ||
|=== | ||
|Key | ||
|schemaVersion | ||
|
||
|Type | ||
|string | ||
|
||
|Required | ||
|yes | ||
|
||
|Description | ||
|v2.0.0 of the schema | ||
|=== | ||
jc-berger marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
For more information on the schemaVersion in devfiles, see: xref:migrating-schema-version.adoc[]. | ||
|
||
== Metadata | ||
|
||
[source,yaml] | ||
---- | ||
v2.0 | ||
--- | ||
metadata: | ||
name: devfile-sample | ||
version: 2.0.0 | ||
---- | ||
|
||
[cols="1,1"] | ||
|=== | ||
|Key | ||
|metadataObject | ||
|
||
|Type | ||
|metadataObject | ||
|
||
|Required | ||
|no | ||
|
||
|Description | ||
|metadata to be used | ||
|=== | ||
|
||
For more information on the metadata in devfiles, see: xref:adding-projects-to-a-devfile.adoc[]. | ||
|
||
== StarterProjects | ||
|
||
[source,yaml] | ||
---- | ||
v2.0 | ||
--- | ||
starterProjects: | ||
jc-berger marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- name: quarkus-quickstart | ||
description: minimal CRUD app with quarkus | ||
subDir: /getting-started/ | ||
git: | ||
location: https://github.com/quarkusio/quarkus-quickstarts | ||
branch: master | ||
startPoint: 1.7.0.Final | ||
---- | ||
|
||
[cols="1,1"] | ||
|=== | ||
|Key | ||
|starterProjectObject | ||
|
||
|Type | ||
|starterProjectObject | ||
|
||
|Required | ||
|no | ||
|
||
|Description | ||
|list of starter projects to be used | ||
|=== | ||
|
||
This starterProject example uses a Quarkus framework. For more information on the starterProjects in devfiles, see: xref:migrating-projects.adoc[]. | ||
|
||
== Components | ||
jc-berger marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
[source,yaml] | ||
---- | ||
v2.0 | ||
--- | ||
components: | ||
- name: appsodyrun | ||
container: | ||
image: 'ajymau/java-openliberty-dev:latest' | ||
memoryLimit: 1512Mi | ||
mountSources: true | ||
endpoints: | ||
- name: 9080/tcp | ||
exposure: public | ||
public: true | ||
protocol: http | ||
targetPort: 9080 | ||
env: | ||
- name: MODE2 | ||
value: TEST2 | ||
- name: myprop2 | ||
value: myval2 | ||
volumeMounts: | ||
- name: myvol | ||
path: /home/user/myvolpath | ||
- name: myvol | ||
volume: | ||
size: 3Gi | ||
---- | ||
|
||
[cols="1,1"] | ||
|=== | ||
|Key | ||
|componentObject | ||
|
||
|Type | ||
|componentObject | ||
|
||
|Required | ||
|no | ||
|
||
|Description | ||
|list of components to be used | ||
|=== | ||
|
||
This component example uses an Open Liberty container, For more information on the components in devfiles, see: xref:migrating-components.adoc[]. | ||
|
||
== Commands | ||
|
||
[source,yaml] | ||
---- | ||
v2.0 | ||
--- | ||
commands: | ||
- id: install | ||
exec: | ||
component: runtime | ||
commandLine: npm install | ||
workingDir: ${PROJECTS_ROOT} | ||
group: | ||
kind: build | ||
isDefault: false | ||
- id: mkdir | ||
exec: | ||
component: runtime | ||
commandLine: mkdir /projects/testfolder | ||
workingDir: ${PROJECTS_ROOT} | ||
- id: run | ||
exec: | ||
component: runtime | ||
commandLine: npm start | ||
workingDir: ${PROJECTS_ROOT} | ||
group: | ||
kind: run | ||
isDefault: true | ||
- id: buildAndMkdir | ||
composite: | ||
label: Build and Mkdir | ||
commands: | ||
- mkdir | ||
- install | ||
parallel: false | ||
group: | ||
kind: build | ||
isDefault: true | ||
---- | ||
|
||
[cols="1,1"] | ||
|=== | ||
|Key | ||
|commandObject | ||
|
||
|Type | ||
|commandObject | ||
|
||
|Required | ||
|no | ||
|
||
|Description | ||
|command to be executed in an existing component container | ||
|=== | ||
|
||
This commands example uses an Open Liberty container. For more information on the commands in devfiles, see: xref:migrating-commands.adoc[]. | ||
|
||
== Events | ||
|
||
[source,yaml] | ||
---- | ||
v2.0 | ||
--- | ||
commands: | ||
- id: copy | ||
exec: | ||
commandLine: "cp /tools/myfile.txt tools.txt" | ||
component: tools | ||
workingDir: / | ||
- id: initCache | ||
exec: | ||
commandLine: "./init_cache.sh" | ||
component: tools | ||
workingDir: / | ||
- id: connectDB | ||
exec: | ||
commandLine: "./connect_db.sh" | ||
component: runtime | ||
workingDir: / | ||
- id: disconnectDB | ||
exec: | ||
commandLine: "./disconnect_db.sh" | ||
component: runtime | ||
workingDir: / | ||
- id: cleanup | ||
exec: | ||
commandLine: "./cleanup.sh" | ||
component: tools | ||
workingDir: / | ||
events: | ||
preStart: | ||
- "connectDB" | ||
postStart: | ||
- "copy" | ||
- "initCache" | ||
preStop: | ||
- "disconnectDB" | ||
postStop: | ||
- "cleanup" | ||
---- | ||
|
||
[cols="1,1"] | ||
|=== | ||
|Key | ||
|eventObject | ||
|
||
|Type | ||
|eventObject | ||
|
||
|Required | ||
|no | ||
|
||
|Description | ||
|events to be executed during a project lifecycle | ||
|=== | ||
|
||
This events example uses an Open Liberty container. For more information on the events in devfiles, see: xref:adding-event-bindings.adoc[]. |
Uh oh!
There was an error while loading. Please reload this page.