Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add build command to devfile #2744

Merged
merged 2 commits into from
Sep 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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