-
Notifications
You must be signed in to change notification settings - Fork 68
Expand file tree
/
Copy pathdevfile.yaml
More file actions
91 lines (91 loc) · 2.58 KB
/
devfile.yaml
File metadata and controls
91 lines (91 loc) · 2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#
# Copyright (c) 2019-2023 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Red Hat, Inc. - initial API and implementation
#
schemaVersion: 2.3.0
metadata:
name: chectl-dev
components:
- name: tools
container:
image: 'quay.io/devfile/universal-developer-image:ubi9-latest'
cpuLimit: 500m
cpuRequest: 500m
memoryLimit: 5G
memoryRequest: 1G
env:
- name: "NODEJS_VERSION"
value: "22.11.0"
commands:
- id: 1-build-env
exec:
label: "Install node and setup yarn"
component: tools
group:
kind: build
workingDir: ${PROJECT_SOURCE}
commandLine: >-
nvm install $NODEJS_VERSION && nvm use v$NODEJS_VERSION && npm i npm@10 -g && corepack enable
- id: 2-install-dependencies
exec:
label: "Install dependencies"
component: tools
group:
kind: build
workingDir: ${PROJECT_SOURCE}
commandLine: >-
nvm use v$NODEJS_VERSION && yarn install
- id: 3-build-chectl
exec:
label: "Build chectl"
component: tools
group:
kind: build
workingDir: ${PROJECT_SOURCE}
commandLine: >-
nvm use v$NODEJS_VERSION && yarn install && yarn pack-binaries --targets=linux-x64
# optional other targets to build:
# --targets=linux-arm,linux-x64,linux-s390x,linux-ppc64le,darwin-x64,darwin-arm64,win32-x64,win32-x86
- id: 4-test
exec:
label: "Test"
component: tools
group:
kind: test
isDefault: true
workingDir: ${PROJECT_SOURCE}
commandLine: nvm use v$NODEJS_VERSION && yarn install && yarn test
- id: 5-run
exec:
label: "Run"
component: tools
group:
kind: run
isDefault: true
workingDir: ${PROJECT_SOURCE}
commandLine: ./bin/run --help
- id: 6-pack-binaries
exec:
label: "Pack Binaries"
component: tools
workingDir: ${PROJECT_SOURCE}
commandLine: nvm use v$NODEJS_VERSION && yarn install && yarn pack-binaries
- id: 7-format-sources
exec:
label: "Format sources"
component: tools
workingDir: ${PROJECT_SOURCE}
commandLine: nvm use v$NODEJS_VERSION && yarn install && yarn lint:fix
- id: 8-update-readme
exec:
label: "Update README.md"
component: tools
workingDir: ${PROJECT_SOURCE}
commandLine: nvm use v$NODEJS_VERSION && yarn install && yarn oclif readme