FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
stackrox/make/env.mk at master · stackrox/stackrox · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
stackrox
/
stackrox
Public
Notifications
You must be signed in to change notification settings
Fork
191
Star
1.3k
Code
Issues
54
Pull requests
603
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
stackrox
/
make
/
env.mk
Copy path
More file actions
More file actions
Latest commit
History
History
History
99 lines (83 loc) · 2.66 KB
Breadcrumbs
stackrox
/
make
/
env.mk
Copy path
File metadata and controls
99 lines (83 loc) · 2.66 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#
Common Makefile environment variable definitions
SHELL
:= /bin/bash
colon
:= :
comma
:= ,
#
GOPATH might not be exported in the current shell but is available in the
#
Go environment.
ifeq
(
$(
GOPATH
)
,)
GOPATH
=
$(
shell
go env GOPATH)
export
GOPATH
endif
#
GOPATH might actually be a colon-separated list of paths. For the purposes of
#
this makefile, work with the first element only.
ifeq
(
$(
findstring
:,
$(
GOPATH
)
),
$(
colon
)
)
GOPATH
:=
$(
firstword
$(
subst
:, ,
$(
GOPATH
)
)
)
endif
export
CGO_ENABLED
?= 1
export
DEFAULT_GOOS
GOARCH
GOTAGS
GO111MODULE
GOBIN
#
Update the arch to arm64 but only for Macs running on Apple Silicon (M1)
ifeq
(
$(
GOARCH
)
,)
ifeq
(
$(
shell
uname -ms)
,Darwin arm64)
GOARCH := arm64
else
ifeq ($(shell uname -ms),Linux aarch64)
GOARCH := arm64
else
ifeq ($(shell uname -ms),Linux ppc64le)
GOARCH := ppc64le
else
ifeq ($(shell uname -ms),Linux s390x)
GOARCH := s390x
else
GOARCH := amd64
endif
endif
DEFAULT_GOOS
:= linux
GO111MODULE
:= on
include
$(
dir
$(
lastword
$(
MAKEFILE_LIST
)
)
)
goproxy.mk
ifeq
(
$(
GOBIN
)
,)
GOBIN
:=
$(
GOPATH
)
/bin
endif
TAG
:=
#
make sure tag is never injectable as an env var
RELEASE_GOTAGS := release
#
GOTAGS is set by:
#
- GitHub Actions workflow (via define-job-matrix output) for CI builds
#
- Konflux builds (via ENV in konflux.Dockerfile files)
#
The ifndef guard prevents duplication when GOTAGS is already set externally.
#
Fallback logic for local builds or other CI systems without GOTAGS:
ifndef
GOTAGS
ifdef
CI
ifdef
GITHUB_REF
ifeq
(
$(
findstring
refs/tags/,
$(
GITHUB_REF
)
)
,refs/tags/)
#
Building from a git tag (release or nightly) - use release GOTAGS
GOTAGS
:=
$(
RELEASE_GOTAGS
)
endif
endif
endif
endif
ifneq
(
$(
BUILD_TAG
)
,)
TAG
:=
$(
BUILD_TAG
)
#
Prow CI needs "release" GOTAGS so that test binaries match the Central image built by GHA.
ifdef
OPENSHIFT_CI
GOTAGS
:=
$(
if
$(
GOTAGS
)
,
$(
GOTAGS
)$(
comma
)
)$(
RELEASE_GOTAGS
)
endif
endif
ifeq
(
$(
TAG
)
,)
TAG
=
$(
shell
git describe --tags --abbrev=10 --dirty --long --exclude '
*
-nightly-
*
')
endif
#
Set expiration on Quay.io for non-release tags.
ifeq
(
$(
findstring
x,
$(
TAG
)
)
,x)
QUAY_TAG_EXPIRATION
=13w
else
QUAY_TAG_EXPIRATION
=never
endif
ROX_PRODUCT_BRANDING
?= STACKROX_BRANDING
#
ROX_IMAGE_FLAVOR is an ARG used in Dockerfiles that defines the default registries for main, scanner, and collector images.
#
ROX_IMAGE_FLAVOR valid values are: development_build, rhacs, opensource.
ROX_IMAGE_FLAVOR
?=
$(
shell
\
if [[ "
$(
ROX_PRODUCT_BRANDING
)
" == "STACKROX_BRANDING" ]]; then \
echo "opensource"; \
else \
echo "development_build"; \
fi)
DEFAULT_IMAGE_REGISTRY
:= quay.io/stackrox-io
ifeq
(
$(
ROX_PRODUCT_BRANDING
)
,RHACS_BRANDING)
DEFAULT_IMAGE_REGISTRY := quay.io/rhacs-eng
endif
Back
|
FazBrowse Home
|
New Git URL