Skip to content

Instantly share code, notes, and snippets.

@ajhalili2006
Last active July 10, 2020 09:05
Show Gist options
  • Save ajhalili2006/28a54691ef59f6c5fe8894c5cf8f66ec to your computer and use it in GitHub Desktop.
Save ajhalili2006/28a54691ef59f6c5fe8894c5cf8f66ec to your computer and use it in GitHub Desktop.
An example devfile.yaml crafted for usage on the Pins team's OSS projects in JS on Eclipse Che.
# Define the API version we're using.
apiVersion: 1.0.0
# Do some meta stuff
metadata:
generateName: thepinsteam-jscodestuff-
# List down our OSS projects written in JS.
# In our case, we're using our fork of the Devs' the Guard as an example.
projects:
- name: watchdog-chat-guard
source:
type: git
location: "https://gitlab.com/MadeByThePinsTeam-DevLabs/watchdog-chat-guard.git"
# We don't have stable releases yet, so we're going to use the 'develop' code.
branch: develop
# List down our components we need.
components:
- type: chePlugin
id: che-incubator/typescript/latest
memoryLimit: 512Mi
- type: dockerimage
alias: nodejs
image: 'node:12.18.2'
memoryLimit: 1Gi
endpoints:
- name: nodejs
port: 3000
mountSources: true
# List down the needed commands.
commands:
- name: Install all of the dependencies needed.
actions:
- type: exec
component: nodejs
command: yarn install
workdir: '${CHE_PROJECTS_ROOT}/watchdog-chat-guard'
- name: Run the Telegram bot.
actions:
- type: exec
component: nodejs
command: yarn run localhost:start
workdir: '${CHE_PROJECTS_ROOT}/watchdog-chat-guard'
- name: Lint with Eslint
actions:
- type: exec
component: nodejs
command: yarn run lint
workdir: '${CHE_PROJECTS_ROOT}/watchdog-chat-guard'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment