mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-17 11:50:18 +00:00
code changes for E2E
update travis and makefile for functional test skip docker pull if image is already present on local machine. if the image is not present locally pull the image from repo. export kubeconfig in travis build cephcsi image in travis job for functional testing Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
5e04be9e1f
commit
9bb23e4e32
@ -29,6 +29,7 @@ env:
|
||||
- KUBE_VERSION=v1.14.2
|
||||
- MINIKUBE_VERSION=v1.1.0
|
||||
- CHANGE_MINIKUBE_NONE_USER=true
|
||||
- KUBECONFIG=$HOME/.kube/config
|
||||
|
||||
jobs:
|
||||
include:
|
||||
@ -50,11 +51,15 @@ jobs:
|
||||
script:
|
||||
- scripts/skip-doc-change.sh || travis_terminate 0;
|
||||
- make cephcsi || travis_terminate 1;
|
||||
- make image-cephcsi || travis_terminate 1;
|
||||
- sudo scripts/minikube.sh up || travis_terminate 1;
|
||||
# pull docker images to speed up e2e
|
||||
- scripts/minikube.sh cephcsi
|
||||
- scripts/minikube.sh k8s-sidecar
|
||||
- "sudo chown -R travis: $HOME/.minikube /usr/local/bin/kubectl"
|
||||
# functional tests
|
||||
- make func-test TESTOPTIONS='--rook-version=v1.0.0 \
|
||||
--deploy-rook=true --deploy-timeout=10 -timeout=20m -v'
|
||||
|
||||
deploy:
|
||||
- provider: script
|
||||
|
3
Makefile
3
Makefile
@ -32,6 +32,9 @@ static-check:
|
||||
./scripts/lint-go.sh
|
||||
./scripts/lint-text.sh
|
||||
|
||||
func-test:
|
||||
go test github.com/ceph/ceph-csi/e2e $(TESTOPTIONS)
|
||||
|
||||
.PHONY: cephcsi
|
||||
cephcsi:
|
||||
if [ ! -d ./vendor ]; then dep ensure -vendor-only; fi
|
||||
|
@ -18,8 +18,10 @@ function wait_for_ssh() {
|
||||
function copy_image_to_cluster() {
|
||||
local build_image=$1
|
||||
local final_image=$2
|
||||
if [[ "${VM_DRIVER}" == "none" ]]; then
|
||||
if [ -z "$(docker images -q "${build_image}")" ]; then
|
||||
docker pull "${build_image}"
|
||||
fi
|
||||
if [[ "${VM_DRIVER}" == "none" ]]; then
|
||||
docker tag "${build_image}" "${final_image}"
|
||||
return
|
||||
fi
|
||||
@ -98,9 +100,8 @@ ssh)
|
||||
minikube ssh
|
||||
;;
|
||||
cephcsi)
|
||||
echo "copying the cephcsi images"
|
||||
copy_image_to_cluster "${CEPHCSI_IMAGE_REPO}"/rbdplugin:canary "${CEPHCSI_IMAGE_REPO}"/rbdplugin:v1.0.0
|
||||
copy_image_to_cluster "${CEPHCSI_IMAGE_REPO}"/cephfsplugin:canary "${CEPHCSI_IMAGE_REPO}"/cephfsplugin:v1.0.0
|
||||
echo "copying the cephcsi image"
|
||||
copy_image_to_cluster "${CEPHCSI_IMAGE_REPO}"/cephcsi:canary "${CEPHCSI_IMAGE_REPO}"/cephcsi:canary
|
||||
;;
|
||||
k8s-sidecar)
|
||||
echo "copying the kubernetes sidecar images"
|
||||
|
Loading…
Reference in New Issue
Block a user