|
| 1 | +# Copyright © 2026 OpenCHAMI a Series of LF Projects, LLC |
| 2 | +# Copyright © 2021-2022, 2025 Hewlett Packard Enterprise Development LP |
1 | 3 | # |
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 |
26 | 5 |
|
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) |
31 | 11 |
|
32 | | -HELM_UNITTEST_IMAGE ?= quintush/helm-unittest:3.3.0-0.2.5 |
| 12 | +.PHONY: all lint test image |
33 | 13 |
|
34 | | -all : runbuildprep lint image chart |
35 | | -chart: chart_setup chart_package chart_test |
| 14 | +all : lint image |
36 | 15 |
|
37 | | -runbuildprep: |
38 | | - ./cms_meta_tools/scripts/runBuildPrep.sh |
39 | 16 |
|
40 | 17 | lint: |
41 | | - ./cms_meta_tools/scripts/runLint.sh |
| 18 | + $(GOLANGCI_LINT) run $(GO_PACKAGES) |
42 | 19 |
|
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) |
49 | 22 |
|
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