Skip to content

Commit 2fdd03e

Browse files
committed
chore : Add Devfile for web-terminal-exec with Makefile-based workflow commands
This Devfile sets up a development environment using the universal developer image, and includes Makefile-based commands Signed-off-by: Rohan Kumar <rohaan@redhat.com>
1 parent 1731fc0 commit 2fdd03e

2 files changed

Lines changed: 98 additions & 0 deletions

File tree

.devfile.yaml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
#
2+
# Copyright (c) 2019-2025 Red Hat, Inc.
3+
# This program and the accompanying materials are made
4+
# available under the terms of the Eclipse Public License 2.0
5+
# which is available at https://www.eclipse.org/legal/epl-2.0/
6+
#
7+
# SPDX-License-Identifier: EPL-2.0
8+
#
9+
# Contributors:
10+
# Red Hat, Inc. - initial API and implementation
11+
#
12+
13+
schemaVersion: 2.3.0
14+
metadata:
15+
name: web-terminal-exec
16+
components:
17+
- name: tools
18+
container:
19+
image: quay.io/devfile/universal-developer-image:ubi9-latest
20+
memoryRequest: 1Gi
21+
memoryLimit: 16Gi
22+
cpuLimit: '4'
23+
cpuRequest: '0.5'
24+
env:
25+
- name: DOCKER
26+
value: podman
27+
commands:
28+
- id: help
29+
exec:
30+
label: "List available make targets"
31+
component: tools
32+
commandLine: make help
33+
group:
34+
kind: build
35+
- id: fmt
36+
exec:
37+
label: "Format all Go code"
38+
component: tools
39+
commandLine: make fmt
40+
group:
41+
kind: build
42+
- id: fmt-license
43+
exec:
44+
label: "Add license headers to Go files"
45+
component: tools
46+
commandLine: |
47+
go install github.com/google/addlicense@latest &&
48+
make fmt_license
49+
group:
50+
kind: build
51+
- id: check-fmt
52+
exec:
53+
label: "Check formatting and license headers"
54+
component: tools
55+
commandLine: |
56+
go install golang.org/x/tools/cmd/goimports@latest &&
57+
make check_fmt
58+
group:
59+
kind: test
60+
- id: test
61+
exec:
62+
label: "Run Go tests and generate coverage"
63+
component: tools
64+
commandLine: make test
65+
group:
66+
kind: test
67+
- id: vet
68+
exec:
69+
label: "Run go vet on source code"
70+
component: tools
71+
commandLine: make vet
72+
group:
73+
kind: test
74+
- id: docker
75+
exec:
76+
label: "Build and push web-terminal-exec container image"
77+
component: tools
78+
commandLine: |
79+
read -p "ENTER a image name and tag for container builds (default is quay.io/wto/web-terminal-exec:next): " TARGET_IMG &&
80+
export WEB_TERMINAL_EXEC_IMG=${TARGET_IMG} &&
81+
make docker
82+
group:
83+
kind: build
84+
- id: compile
85+
exec:
86+
label: "Compile Go binary locally"
87+
component: tools
88+
commandLine: make compile
89+
group:
90+
kind: build
91+

.vscode/extensions.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"golang.go",
4+
"redhat.vscode-yaml"
5+
]
6+
}
7+

0 commit comments

Comments
 (0)