mirror of
https://github.com/prometheus-operator/prometheus-operator.git
synced 2025-04-16 09:16:38 +00:00
test: build image from current tree when running e2e tests
This commit is contained in:
parent
6f03e93bd0
commit
84b365d321
2 changed files with 8 additions and 4 deletions
8
Makefile
8
Makefile
|
@ -1,7 +1,7 @@
|
||||||
all: build
|
all: build
|
||||||
|
|
||||||
REPO = quay.io/coreos/prometheus-operator
|
REPO=quay.io/coreos/prometheus-operator
|
||||||
TAG = latest
|
TAG=$(shell git rev-parse --short HEAD)
|
||||||
|
|
||||||
build:
|
build:
|
||||||
./scripts/check_license.sh
|
./scripts/check_license.sh
|
||||||
|
@ -11,8 +11,8 @@ container:
|
||||||
GOOS=linux $(MAKE) build
|
GOOS=linux $(MAKE) build
|
||||||
docker build -t $(REPO):$(TAG) .
|
docker build -t $(REPO):$(TAG) .
|
||||||
|
|
||||||
e2e:
|
e2e: container
|
||||||
go test -v ./test/e2e/ --kubeconfig "$(HOME)/.kube/config" --operator-image=quay.io/coreos/prometheus-operator
|
go test -v ./test/e2e/ --kubeconfig "$(HOME)/.kube/config" --operator-image=quay.io/coreos/prometheus-operator:$(TAG)
|
||||||
|
|
||||||
clean-e2e:
|
clean-e2e:
|
||||||
kubectl delete namespace prometheus-operator-e2e-tests
|
kubectl delete namespace prometheus-operator-e2e-tests
|
||||||
|
|
|
@ -109,6 +109,10 @@ func (f *Framework) setupPrometheusOperator(opImage string) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if opImage != "" {
|
||||||
|
// Override operator image used, if specified when running tests.
|
||||||
|
deploy.Spec.Template.Spec.Containers[0].Image = opImage
|
||||||
|
}
|
||||||
|
|
||||||
err = f.createDeployment(&deploy)
|
err = f.createDeployment(&deploy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Add table
Reference in a new issue