diff --git a/docs/modules/user-guide/partials/ref_devfile-reference.adoc b/docs/modules/user-guide/partials/ref_devfile-reference.adoc new file mode 100644 index 00000000..b218be53 --- /dev/null +++ b/docs/modules/user-guide/partials/ref_devfile-reference.adoc @@ -0,0 +1,164 @@ +[id="ref_devfile-reference_{context}"] += Devfile reference + +[role="_abstract"] +Use this page to work with yaml files of devfile properties. See the following table of contents to go to the devfile property you want to work with: + +== schemaVersion + +[source,yaml] +---- +v2.0 +--- +schemaVersion: 2.0.0 +---- + +For more information, go to: xref:migrating-schema-version.adoc[]. + +== metadata + +[source,yaml] +---- +v2.0 +--- +metadata: + name: nodejs + version: 1.0.0 +---- + +== starter projects + +[source,yaml] +---- +v2.0 +--- +starterProjects: + - name: quarkus-quickstart + description: minimal CRUD app with quarkus + subDir: /getting-started/ # optional checkout dir + git: + location: https://github.com/quarkusio/quarkus-quickstarts + branch: master + startPoint: 1.7.0.Final # tag or commit to start at +---- + +For more information, go to: xref:migrating-projects.adoc[]. + +== components + +[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 +---- + +For more information, go to: 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 +---- + +For more information, go to: 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" +----