Skip to content

Commit 00b8689

Browse files
committed
build: update lint and image targets
Also remove used/broken targets and add test target. Signed-off-by: Chris Harris <cjh@lbl.gov>
1 parent 687d4ee commit 00b8689

1 file changed

Lines changed: 15 additions & 47 deletions

File tree

Makefile

Lines changed: 15 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,24 @@
1+
# Copyright © 2026 OpenCHAMI a Series of LF Projects, LLC
2+
# Copyright © 2021-2022, 2025 Hewlett Packard Enterprise Development LP
13
#
2-
# MIT License
3-
#
4-
# (C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP
5-
#
6-
# Permission is hereby granted, free of charge, to any person obtaining a
7-
# copy of this software and associated documentation files (the "Software"),
8-
# to deal in the Software without restriction, including without limitation
9-
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
10-
# and/or sell copies of the Software, and to permit persons to whom the
11-
# Software is furnished to do so, subject to the following conditions:
12-
#
13-
# The above copyright notice and this permission notice shall be included
14-
# in all copies or substantial portions of the Software.
15-
#
16-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19-
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20-
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21-
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22-
# OTHER DEALINGS IN THE SOFTWARE.
23-
#
24-
# If you wish to perform a local build, you will need to clone or copy the contents of the
25-
# cms-meta-tools repo to ./cms_meta_tools
4+
# SPDX-License-Identifier: MIT
265

27-
NAME ?= cray-console-data
28-
CHART_PATH ?= kubernetes
29-
DOCKER_VERSION ?= $(shell head -1 .docker_version)
30-
CHART_VERSION ?= $(shell head -1 .chart_version)
6+
NAME ?= remote-console
7+
VERSION ?= $(shell git describe --tags --always --abbrev=0)
8+
GOLANGCI_LINT ?= golangci-lint
9+
GO_PACKAGES ?= ./...
10+
TEST_PACKAGES ?= $(GO_PACKAGES)
3111

32-
HELM_UNITTEST_IMAGE ?= quintush/helm-unittest:3.3.0-0.2.5
12+
.PHONY: all lint test image
3313

34-
all : runbuildprep lint image chart
35-
chart: chart_setup chart_package chart_test
14+
all : lint image
3615

37-
runbuildprep:
38-
./cms_meta_tools/scripts/runBuildPrep.sh
3916

4017
lint:
41-
./cms_meta_tools/scripts/runLint.sh
18+
$(GOLANGCI_LINT) run $(GO_PACKAGES)
4219

43-
image:
44-
docker build --pull ${DOCKER_ARGS} --tag '${NAME}:${DOCKER_VERSION}' .
45-
46-
chart_setup:
47-
mkdir -p ${CHART_PATH}/.packaged
48-
printf "\nglobal:\n appVersion: ${DOCKER_VERSION}" >> ${CHART_PATH}/${NAME}/values.yaml
20+
test:
21+
go test $(TEST_PACKAGES)
4922

50-
chart_package:
51-
helm dep up ${CHART_PATH}/${NAME}
52-
helm package ${CHART_PATH}/${NAME} -d ${CHART_PATH}/.packaged --app-version ${DOCKER_VERSION} --version ${CHART_VERSION}
53-
54-
chart_test:
55-
helm lint "${CHART_PATH}/${NAME}"
56-
docker run --rm -v ${PWD}/${CHART_PATH}:/apps ${HELM_UNITTEST_IMAGE} -3 ${NAME}
23+
image:
24+
docker build --pull $(DOCKER_ARGS) --tag '$(NAME):$(VERSION)' .

0 commit comments

Comments
 (0)