mirror of
https://github.com/prometheus-operator/prometheus-operator.git
synced 2025-04-21 11:48:53 +00:00
travis: Update travis-push-docker-image.sh to new build system
This commit is contained in:
parent
cab34d7fe1
commit
e8a689d62e
2 changed files with 9 additions and 31 deletions
3
Makefile
3
Makefile
|
@ -1,6 +1,7 @@
|
|||
SHELL=/bin/bash -o pipefail
|
||||
|
||||
REPO?=quay.io/coreos/prometheus-operator
|
||||
REPO_PROMETHEUS_CONFIG_RELOADER?=quay.io/coreos/prometheus-config-reloader
|
||||
TAG?=$(shell git rev-parse --short HEAD)
|
||||
|
||||
PO_CRDGEN_BINARY:=$(GOPATH)/bin/po-crdgen
|
||||
|
@ -68,7 +69,7 @@ hack/prometheus-config-reloader-image: cmd/prometheus-config-reloader/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 -t quay.io/coreos/prometheus-config-reloader:$(TAG) -f cmd/prometheus-config-reloader/Dockerfile .
|
||||
docker build -t $(REPO_PROMETHEUS_CONFIG_RELOADER):$(TAG) -f cmd/prometheus-config-reloader/Dockerfile .
|
||||
touch $@
|
||||
|
||||
|
||||
|
|
|
@ -15,40 +15,17 @@ if [[ "${TRAVIS_PULL_REQUEST}" != "false" ]]; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
# Builds both prometheus-operator and prometheus-config-reloader
|
||||
make crossbuild
|
||||
|
||||
|
||||
#
|
||||
# prometheus-operator
|
||||
#
|
||||
|
||||
export REPO=quay.io/coreos/prometheus-operator
|
||||
# Push to Quay '-dev' repo if not a git tag or master branch build
|
||||
if [[ "${TRAVIS_TAG}" == "" ]] && [[ "${TRAVIS_BRANCH}" != master ]]; then
|
||||
export REPO="${REPO}-dev"
|
||||
export REPO="quay.io/coreos/prometheus-operator-dev"
|
||||
export REPO_PROMETHEUS_CONFIG_RELOADER="quay.io/coreos/prometheus-config-reloader-dev"
|
||||
fi
|
||||
|
||||
# For both git tags and git branches 'TRAVIS_BRANCH' contains the name.
|
||||
export TAG="${TRAVIS_BRANCH}"
|
||||
make container
|
||||
|
||||
make image
|
||||
|
||||
echo "${QUAY_PASSWORD}" | docker login -u "${QUAY_USERNAME}" --password-stdin quay.io
|
||||
docker push "${REPO}:${TRAVIS_BRANCH}"
|
||||
|
||||
|
||||
#
|
||||
# prometheus-config-reloader
|
||||
#
|
||||
|
||||
cd contrib/prometheus-config-reloader
|
||||
export REPO=quay.io/coreos/prometheus-config-reloader
|
||||
# Push to Quay '-dev' repo if not a git tag or master branch build
|
||||
if [[ "${TRAVIS_TAG}" == "" ]] && [[ "${TRAVIS_BRANCH}" != master ]]; then
|
||||
export REPO="${REPO}-dev"
|
||||
fi
|
||||
|
||||
# For both git tags and git branches 'TRAVIS_BRANCH' contains the name.
|
||||
export TAG="${TRAVIS_BRANCH}"
|
||||
make container
|
||||
echo "${QUAY_PASSWORD}" | docker login -u "${QUAY_USERNAME}" --password-stdin quay.io
|
||||
docker push "${REPO}:${TRAVIS_BRANCH}"
|
||||
docker push "${REPO}:${TAG}"
|
||||
docker push "${REPO_PROMETHEUS_CONFIG_RELOADER}:${TAG}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue