mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 22:30:23 +00:00
Merge pull request #260 from phlogistonjohn/jjm-dockercmd
makefile: use a variable to choose "docker" command
This commit is contained in:
commit
da52e8cc63
10
Makefile
10
Makefile
@ -14,6 +14,8 @@
|
|||||||
|
|
||||||
.PHONY: all rbdplugin cephfsplugin
|
.PHONY: all rbdplugin cephfsplugin
|
||||||
|
|
||||||
|
CONTAINER_CMD?=docker
|
||||||
|
|
||||||
RBD_IMAGE_NAME=$(if $(ENV_RBD_IMAGE_NAME),$(ENV_RBD_IMAGE_NAME),quay.io/cephcsi/rbdplugin)
|
RBD_IMAGE_NAME=$(if $(ENV_RBD_IMAGE_NAME),$(ENV_RBD_IMAGE_NAME),quay.io/cephcsi/rbdplugin)
|
||||||
RBD_IMAGE_VERSION=$(if $(ENV_RBD_IMAGE_VERSION),$(ENV_RBD_IMAGE_VERSION),v1.0.0)
|
RBD_IMAGE_VERSION=$(if $(ENV_RBD_IMAGE_VERSION),$(ENV_RBD_IMAGE_VERSION),v1.0.0)
|
||||||
|
|
||||||
@ -40,7 +42,7 @@ rbdplugin:
|
|||||||
|
|
||||||
image-rbdplugin: rbdplugin
|
image-rbdplugin: rbdplugin
|
||||||
cp _output/rbdplugin deploy/rbd/docker
|
cp _output/rbdplugin deploy/rbd/docker
|
||||||
docker build -t $(RBD_IMAGE_NAME):$(RBD_IMAGE_VERSION) deploy/rbd/docker
|
$(CONTAINER_CMD) build -t $(RBD_IMAGE_NAME):$(RBD_IMAGE_VERSION) deploy/rbd/docker
|
||||||
|
|
||||||
cephfsplugin:
|
cephfsplugin:
|
||||||
if [ ! -d ./vendor ]; then dep ensure -vendor-only; fi
|
if [ ! -d ./vendor ]; then dep ensure -vendor-only; fi
|
||||||
@ -48,13 +50,13 @@ cephfsplugin:
|
|||||||
|
|
||||||
image-cephfsplugin: cephfsplugin
|
image-cephfsplugin: cephfsplugin
|
||||||
cp _output/cephfsplugin deploy/cephfs/docker
|
cp _output/cephfsplugin deploy/cephfs/docker
|
||||||
docker build -t $(CEPHFS_IMAGE_NAME):$(CEPHFS_IMAGE_VERSION) deploy/cephfs/docker
|
$(CONTAINER_CMD) build -t $(CEPHFS_IMAGE_NAME):$(CEPHFS_IMAGE_VERSION) deploy/cephfs/docker
|
||||||
|
|
||||||
push-image-rbdplugin: image-rbdplugin
|
push-image-rbdplugin: image-rbdplugin
|
||||||
docker push $(RBD_IMAGE_NAME):$(RBD_IMAGE_VERSION)
|
$(CONTAINER_CMD) push $(RBD_IMAGE_NAME):$(RBD_IMAGE_VERSION)
|
||||||
|
|
||||||
push-image-cephfsplugin: image-cephfsplugin
|
push-image-cephfsplugin: image-cephfsplugin
|
||||||
docker push $(CEPHFS_IMAGE_NAME):$(CEPHFS_IMAGE_VERSION)
|
$(CONTAINER_CMD) push $(CEPHFS_IMAGE_NAME):$(CEPHFS_IMAGE_VERSION)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
go clean -r -x
|
go clean -r -x
|
||||||
|
@ -36,7 +36,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
|
if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
|
||||||
docker login -u "${QUAY_IO_USERNAME}" -p "${QUAY_IO_PASSWORD}" quay.io
|
"${CONTAINER_CMD:-docker}" login -u "${QUAY_IO_USERNAME}" -p "${QUAY_IO_PASSWORD}" quay.io
|
||||||
make push-image-rbdplugin push-image-cephfsplugin
|
make push-image-rbdplugin push-image-cephfsplugin
|
||||||
|
|
||||||
set -xe
|
set -xe
|
||||||
|
Loading…
Reference in New Issue
Block a user