Skip to content

Commit

Permalink
chore: add build command to devfile (#2744)
Browse files Browse the repository at this point in the history
* add build command to devfile

Change-Id: I90831fdd3ab07af88eec79a270425f34b300fd3b
Signed-off-by: Nick Boldt <[email protected]>

* add build env requirements (need Node 18; then install yarn and latest npm too

Change-Id: Ib6b46e97bb528d94b960b31bc95d5c47146e9fdb
Signed-off-by: Nick Boldt <[email protected]>

---------

Signed-off-by: Nick Boldt <[email protected]>
  • Loading branch information
nickboldt authored Sep 22, 2023
1 parent 20ff59c commit b10b26b
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions devfile.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019-2021 Red Hat, Inc.
# 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/
Expand All @@ -9,19 +9,35 @@
# Contributors:
# Red Hat, Inc. - initial API and implementation
#

schemaVersion: 2.1.0

metadata:
name: chectl-dev

components:
- name: tooling-container
container:
container:
image: 'quay.io/devfile/universal-developer-image:ubi8-latest'
cpuLimit: 500m
cpuRequest: 500m
memoryLimit: 5G
memoryRequest: 1G


commands:
- id: 0-build-env
exec:
label: "Install node and yarn"
component: tools
group:
kind: build
workingDir: ${PROJECT_SOURCE}
commandLine: >-
NODEJS_VERSION=18.18.0; nvm install $NODEJS_VERSION && nvm use v$NODEJS_VERSION && npm i yarn@1 npm@10 -g
- id: 1-build-chectl
exec:
label: "Build chectl"
component: tools
group:
kind: build
workingDir: ${PROJECT_SOURCE}
commandLine: >-
yarn && 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

0 comments on commit b10b26b

Please sign in to comment.