Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AndrienkoAleksandr/0eacccad926ef9e81418bdba36580e5b to your computer and use it in GitHub Desktop.
Save AndrienkoAleksandr/0eacccad926ef9e81418bdba36580e5b to your computer and use it in GitHub Desktop.
apiVersion: 1.0.0
metadata:
name: che-machine-execnw6om
projects:
- name: che-machine-exec
source:
location: 'https://github.com/eclipse-che/che-machine-exec.git'
type: git
branch: master
components:
- id: golang/go/latest
memoryLimit: 1G
type: chePlugin
alias: ms-vscode.go
- mountSources: true
endpoints:
- attributes:
public: 'true'
protocol: http
secure: 'false'
name: theia-dev-or-cloud-shell
port: 3130
memoryLimit: 512M
type: dockerimage
alias: theia-dev-or-cloud-shell
image: 'quay.io/flacatus/che-machine-exec:latest'
- mountSources: true
endpoints:
- attributes:
protocol: ws
public: 'true'
secure: 'false'
type: terminal-dev
name: exec-server
port: 5555
memoryLimit: 1024M
type: dockerimage
alias: dev
image: 'quay.io/eclipse/che-golang-1.12:7.12.1'
env:
- value: '/go:$(CHE_PROJECTS_ROOT)'
name: GOPATH
- value: /tmp/.cache
name: GOCACHE
commands:
- name: compile
actions:
- workdir: /projects/che-machine-exec
type: exec
command: ./compile.sh
component: dev
- name: test
actions:
- workdir: /projects/che-machine-exec
type: exec
command: export CHE_WORKSPACE_ID=test_id; go test ./...
component: dev
- name: format
actions:
- workdir: /projects/che-machine-exec
type: exec
command: 'go fmt ./... && printf "\033[32mDone.\033[0m"'
component: dev
- name: start exec server
actions:
- workdir: /projects/che-machine-exec
type: exec
command: './che-machine-exec --url 0.0.0.0:5555'
component: dev
- name: stop exec server
actions:
- type: exec
command: 'pid=$(pidof che-machine-exec) && kill ${pid} && printf "\033[32mDone.\033[0m" || printf "\033[32mNothing to stop... Done.\033[0m"'
component: dev
- name: build cloud shell
actions:
- workdir: /projects/che-machine-exec/cloud-shell
type: exec
command: yarn && yarn run build
component: theia-dev-or-cloud-shell
- name: start cloud shell
actions:
- workdir: /projects/che-machine-exec
type: exec
command: './che-machine-exec --url 0.0.0.0:3130 --static /projects/che-machine-exec/cloud-shell'
component: dev
- name: Debug exec server
actions:
- referenceContent: |-
{
"version": "0.2.0",
"configurations": [
{
"useApiV1": false,
"dlvLoadConfig": {
"followPointers": true,
"maxVariableRecurse": 1,
"maxStringLen": 3000,
"maxArrayValues": 100,
"maxStructFields": -1
},
"name": "Remote debug che-machine-exec",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/che-machine-exec/main.go",
"cwd": "${workspaceFolder}",
"args": [ "--url", "0.0.0.0:3130", "--static", "/projects/che-machine-exec/cloud-shell" ]
}
]
}
type: vscode-launch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment