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
5fe3df56
Unverified
Commit
5fe3df56
authored
5 years ago
by
paulfantom
Browse files
Options
Downloads
Patches
Plain Diff
Use prebuilt container with jsonnet in it
parent
ff9fb35e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+11
-23
11 additions, 23 deletions
Makefile
scripts/jsonnet/Dockerfile
+0
-18
0 additions, 18 deletions
scripts/jsonnet/Dockerfile
with
11 additions
and
41 deletions
Makefile
+
11
−
23
View file @
5fe3df56
...
...
@@ -2,25 +2,19 @@ JSONNET_FMT := jsonnet fmt -n 2 --max-blank-lines 2 --string-style s --comment-s
JB_BINARY
:=
$(
GOPATH
)
/bin/jb
EMBEDMD_BINARY
:=
$(
GOPATH
)
/bin/embedmd
CONTAINER_CMD
:=
docker run
--rm
\
-u
=
"
$(
shell id -u
)
:
$(
shell id -g
)
"
\
-v
"
$(
shell go env GOCACHE
)
:/.cache/go-build"
\
-v
"
$(
PWD
)
:/go/src/github.com/coreos/kube-prometheus:Z"
\
-w
"/go/src/github.com/coreos/kube-prometheus"
\
quay.io/coreos/jsonnet-ci
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
.PHONY
:
generate-in-docker
generate-in-docker
:
@
echo
">> Compiling assets and generating Kubernetes manifests"
docker run
\
--rm
\
-u
=
$(
shell
id
-u
$(
USER
))
:
$(
shell
id
-g
$(
USER
))
\
-v
$$
PWD:/go/src/github.com/coreos/kube-prometheus/
\
-v
$(
shell go
env
GOCACHE
)
:/.cache/go-build
\
--workdir
/go/src/github.com/coreos/kube-prometheus
\
po-jsonnet make generate
$(
CONTAINER_CMD
)
$(
MAKE
)
$(
MFLAGS
)
generate
generate
:
manifests **.md
...
...
@@ -46,15 +40,9 @@ test: $(JB_BINARY)
test-e2e
:
go
test
-timeout
55m
-v
./tests/e2e
-count
=
1
test-in-docker
:
hack/jsonnet-docker-image
test-in-docker
:
@
echo
">> Compiling assets and generating Kubernetes manifests"
docker run
\
--rm
\
-u
=
$(
shell
id
-u
$(
USER
))
:
$(
shell
id
-g
$(
USER
))
\
-v
$$
PWD:/go/src/github.com/coreos/kube-prometheus/
\
-v
$(
shell go
env
GOCACHE
)
:/.cache/go-build
\
--workdir
/go/src/github.com/coreos/kube-prometheus
\
po-jsonnet make
test
$(
CONTAINER_CMD
)
$(
MAKE
)
$(
MFLAGS
)
test
$(JB_BINARY)
:
go get
-u
github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb
...
...
This diff is collapsed.
Click to expand it.
scripts/jsonnet/Dockerfile
deleted
100644 → 0
+
0
−
18
View file @
ff9fb35e
FROM
golang:1.12-stretch
ENV
JSONNET_VERSION 0.12.1
RUN
apt-get update
-y
&&
apt-get
install
-y
jq
&&
rm
-rf
/var/lib/apt/lists/
*
RUN
curl
-Lso
- https://github.com/google/jsonnet/archive/v
${
JSONNET_VERSION
}
.tar.gz |
\
tar
xfz -
-C
/tmp
&&
\
cd
/tmp/jsonnet-
${
JSONNET_VERSION
}
&&
\
make
&&
mv
jsonnet /usr/local/bin
&&
\
rm
-rf
/tmp/jsonnet-
${
JSONNET_VERSION
}
RUN
go get github.com/brancz/gojsontoyaml
RUN
go get github.com/campoy/embedmd
RUN
go get github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb
RUN
mkdir
-p
/go/src/github.com/coreos/kube-prometheus
WORKDIR
/go/src/github.com/coreos/kube-prometheus
RUN
chmod
-R
777 /go
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