1
0
Fork 0
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:
Frederic Branczyk 2016-11-28 14:58:23 +01:00
parent 6f03e93bd0
commit 84b365d321
No known key found for this signature in database
GPG key ID: CA14788B1E48B256
2 changed files with 8 additions and 4 deletions

View file

@ -1,7 +1,7 @@
all: build
REPO=quay.io/coreos/prometheus-operator
TAG = latest
TAG=$(shell git rev-parse --short HEAD)
build:
./scripts/check_license.sh
@ -11,8 +11,8 @@ container:
GOOS=linux $(MAKE) build
docker build -t $(REPO):$(TAG) .
e2e:
go test -v ./test/e2e/ --kubeconfig "$(HOME)/.kube/config" --operator-image=quay.io/coreos/prometheus-operator
e2e: container
go test -v ./test/e2e/ --kubeconfig "$(HOME)/.kube/config" --operator-image=quay.io/coreos/prometheus-operator:$(TAG)
clean-e2e:
kubectl delete namespace prometheus-operator-e2e-tests

View file

@ -109,6 +109,10 @@ func (f *Framework) setupPrometheusOperator(opImage string) error {
if err != nil {
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)
if err != nil {