forked from Checkmk/checkmk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
defines.make
127 lines (104 loc) · 4.71 KB
/
defines.make
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# Copyright (C) 2019 Checkmk GmbH - License: GNU General Public License v2
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
# conditions defined in the file COPYING, which is part of this source code package.
#
REPO_PATH := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
EDITION := raw
EDITION_SHORT := cre
ifneq (,$(wildcard $(REPO_PATH)/omd/packages/enterprise))
ENTERPRISE := yes
EDITION := enterprise
EDITION_SHORT := cee
else
ENTERPRISE := no
endif
ifneq (,$(wildcard $(REPO_PATH)/omd/packages/cloud))
CLOUD := yes
EDITION := cloud
EDITION_SHORT := cce
else
CLOUD := no
endif
ifneq (,$(wildcard $(REPO_PATH)/omd/packages/managed))
MANAGED := yes
EDITION := managed
EDITION_SHORT := cme
else
MANAGED := no
endif
ifneq (,$(wildcard $(REPO_PATH)/omd/packages/saas))
SAAS := yes
EDITION := saas
EDITION_SHORT := cse
else
SAAS := no
endif
VERSION := 2.4.0b1
OMD_VERSION := $(VERSION).$(EDITION_SHORT)
# Do not use the the ".c?e" EDITION_SHORT suffix, the edition is part of the package name
PKG_VERSION := $(VERSION)
# Currently only used for the OMD package build cache. We did not want to use
# the branch name, because we want to re-use a single cache also for derived sandbox
# branches (1.7.0i1 -> 1.7.0).
# This needs to be changed in the master branch every time a stable branch is forked.
BRANCH_VERSION := 2.4.0
# return nothing if the branch name, e.g. "master" is not the version e.g. 2.4.0
# this is evaluated by "buildscripts/scripts/utils/versioning.groovy" and does
# fallback to "master" instead of the branch version value above
# set this to any value after creating a new (beta) branch
BRANCH_NAME_IS_BRANCH_VERSION :=
# This automatism did not work well in all cases. There were daily build jobs that used
# e.g. 2020.02.08 as BRANCH_VERSION, even if they should use 1.7.0
#BRANCH_VERSION := $(shell echo "$(VERSION)" | sed -E 's/^([0-9]+.[0-9]+.[0-9]+).*$$/\1/')
# In case of "master daily builds" we get the DATE as BRANCH_VERSION, which is
# not what we want. TODO: Find a solution for this
#ifeq ($(BRANCH_VERSION),$(shell date +%Y.%m.%d))
# BRANCH_VERSION := 1.7.0
#endif
SHELL := /bin/bash
CLANG_VERSION := 18
PLANTUML_JAR_PATH := $(REPO_PATH)/third_party/plantuml
# In our CI we use this compiler, but we are not restricted to this exact version
GCC_VERSION_MAJOR := 13
GCC_VERSION_MINOR := 2
GCC_VERSION_PATCHLEVEL := 0
GCC_VERSION := ${GCC_VERSION_MAJOR}.${GCC_VERSION_MINOR}.${GCC_VERSION_PATCHLEVEL}
# NOTE: When you update the Python version, please take care of the following things:
# * the python version is now centralized within bazel, see package_versions.bzl
# * update test_03_pip_interpreter_version
# * update omd/Licenses.csv, too.
PYTHON_VERSION := $(shell sed -n 's|^PYTHON_VERSION = \"\(\S*\)\"$$|\1|p' $(REPO_PATH)/package_versions.bzl)
# convenience stuff derived from PYTHON_VERSION
PY_ARRAY := $(subst ., ,$(PYTHON_VERSION))
PYTHON_VERSION_MAJOR := $(word 1,$(PY_ARRAY))
PYTHON_VERSION_MINOR := $(word 2,$(PY_ARRAY))
PYTHON_VERSION_PATCH := $(word 3,$(PY_ARRAY))
PYTHON_MAJOR_MINOR := $(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)
PYTHON_MAJOR_DOT_MINOR := $(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)
# We're separating the python version used in the windows agent modules as they are not directly connected.
# However, we should keep them as close as possible.
PYTHON_VERSION_WINDOWS := 3.12.1
# convenience stuff derived from PYTHON_VERSION_WINDOWS
PY_ARRAY_WINDOWS := $(subst ., ,$(PYTHON_VERSION_WINDOWS))
PYTHON_VERSION_WINDOWS_MAJOR := $(word 1,$(PY_ARRAY_WINDOWS))
PYTHON_VERSION_WINDOWS_MINOR := $(word 2,$(PY_ARRAY_WINDOWS))
PYTHON_VERSION_WINDOWS_PATCH := $(word 3,$(PY_ARRAY_WINDOWS))
PYTHON_VERSION_WINDOWS_MAJOR_DOT_MINOR := $(PYTHON_VERSION_WINDOWS_MAJOR).$(PYTHON_VERSION_WINDOWS_MINOR)
AGENT_PLUGIN_PYTHON_VERSIONS := 2.7 3.4 3.5 3.6 3.7 3.8 3.9 3.10 3.11 3.12
# Needed for bootstrapping CI and development environments
PIPENV_VERSION := 2023.11.15
VIRTUALENV_VERSION := 20.25.0
NODEJS_VERSION := 18
NPM_VERSION := 10
# PyPi Mirror Configuration
# By default our internal Python mirror is used.
# To use the official Python mirror, please export `USE_EXTERNAL_PIPENV_MIRROR=true`.
EXTERNAL_PYPI_MIRROR := https://pypi.org/simple
INTERNAL_PYPI_MIRROR := $(shell sed -n 's|^INTERNAL_PYPI_MIRROR = \"\(\S*\)\"$$|\1|p' $(REPO_PATH)/static_variables.bzl)
ifeq (true,${USE_EXTERNAL_PIPENV_MIRROR})
PIPENV_PYPI_MIRROR := $(EXTERNAL_PYPI_MIRROR)
else
PIPENV_PYPI_MIRROR := $(INTERNAL_PYPI_MIRROR)
endif
print-%:
@echo '$($*)'