Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
kube-prometheus
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
prometheus-operator
kube-prometheus
Commits
d2c6a30a
Commit
d2c6a30a
authored
6 years ago
by
Frederic Branczyk
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #1462 from mxinden/refactor-build-system
*: Refactor build system
parents
3446f3cf
1d36d01b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Makefile
+47
-12
47 additions, 12 deletions
Makefile
with
47 additions
and
12 deletions
Makefile
+
47
−
12
View file @
d2c6a30a
JSONNET_FMT
:=
jsonnet
fmt
-n
2
--max-blank-lines
2
--string-style
s
--comment-style
s
JSONNET_FMT
:=
jsonnet
fmt
-n
2
--max-blank-lines
2
--string-style
s
--comment-style
s
image
:
JB_BINARY
:=
$(
GOPATH
)
/bin/jb
docker build
-f
../../scripts/jsonnet/Dockerfile
-t
po-jsonnet ../../
EMBEDMD_BINARY
:=
$(
GOPATH
)
/bin/embedmd
generate
:
image
# edit 1
all
:
generate fmt test
../../hack/jsonnet-docker-image
:
../../scripts/jsonnet/Dockerfile
# Create empty target file, for the sole purpose of recording when this target
# was last executed via the last-modification timestamp on the file. See
# https://www.gnu.org/software/make/manual/make.html#Empty-Targets
docker
build
-f
-
-t
po-jsonnet
.
<
../../scripts/jsonnet/Dockerfile
touch
$@
generate-in-docker
:
../../hack/jsonnet-docker-image
@
echo
">> Compiling assets and generating Kubernetes manifests"
@
echo
">> Compiling assets and generating Kubernetes manifests"
docker run
--rm
-u
=
$(
shell
id
-u
$(
USER
))
:
$(
shell
id
-g
$(
USER
))
-v
$(
shell
dirname
$(
dir
$(
abspath
$(
dir
$$
PWD
))))
:/go/src/github.com/coreos/prometheus-operator/
--workdir
/go/src/github.com/coreos/prometheus-operator/contrib/kube-prometheus po-jsonnet make generate-raw
docker run
\
--rm
\
-u
=
$(
shell
id
-u
$(
USER
))
:
$(
shell
id
-g
$(
USER
))
\
-v
$(
shell
dirname
$(
dir
$(
abspath
$(
dir
$$
PWD
))))
:/go/src/github.com/coreos/prometheus-operator/
\
--workdir
/go/src/github.com/coreos/prometheus-operator/contrib/kube-prometheus
\
po-jsonnet make generate
generate
:
manifests/** **.md
**.md
:
$(EMBEDMD_BINARY) $(shell find examples) build.sh example.jsonnet
echo
'>>> inside **.md'
$(
EMBEDMD_BINARY
)
-w
`
find
.
-name
"*.md"
|
grep
-v
vendor
`
generate-raw
:
fmt
manifests/**
:
vendor/** example.jsonnet
jb
install
./build.sh
./build.sh
vendor/**
:
$(JB_BINARY) jsonnetfile.json
$(
JB_BINARY
)
install
fmt
:
fmt
:
find
.
-name
'vendor'
-prune
-o
-name
'*.libsonnet'
-o
-name
'*.jsonnet'
-print
|
\
find
.
-name
'vendor'
-prune
-o
-name
'*.libsonnet'
-o
-name
'*.jsonnet'
-print
|
\
xargs
-n
1
--
$(
JSONNET_FMT
)
-i
xargs
-n
1
--
$(
JSONNET_FMT
)
-i
test
:
image
test
:
$(JB_BINARY)
$(
JB_BINARY
)
install
./test.sh
test-in-docker
:
../../hack/jsonnet-docker-image
@
echo
">> Compiling assets and generating Kubernetes manifests"
@
echo
">> Compiling assets and generating Kubernetes manifests"
docker run
--rm
-u
=
$(
shell
id
-u
$(
USER
))
:
$(
shell
id
-g
$(
USER
))
-v
$(
shell
dirname
$(
dir
$(
abspath
$(
dir
$$
PWD
))))
:/go/src/github.com/coreos/prometheus-operator/
--workdir
/go/src/github.com/coreos/prometheus-operator/contrib/kube-prometheus po-jsonnet make test-raw
docker run
\
--rm
\
-u
=
$(
shell
id
-u
$(
USER
))
:
$(
shell
id
-g
$(
USER
))
\
-v
$(
shell
dirname
$(
dir
$(
abspath
$(
dir
$$
PWD
))))
:/go/src/github.com/coreos/prometheus-operator/
\
--workdir
/go/src/github.com/coreos/prometheus-operator/contrib/kube-prometheus
\
po-jsonnet make
test
test-raw
:
crdtojsonnet
$(JB_BINARY)
:
jb
install
go get
-u
github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb
./test.sh
$(EMBEDMD_BINARY)
:
go get github.com/campoy/embedmd
.PHONY
:
image
generate
crdtojsonnet generate-raw
test test-
raw
fmt
.PHONY
:
generate
generate-in-docker
test test-
in-docker
fmt
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment