diff --git a/.travis.yml b/.travis.yml index c21b89d908..37671c4350 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,38 @@ services: go_import_path: volcano.sh/volcano jobs: include: - - stage: publish release + - stage: Golint & Gofmt + before_script: + - go get -u golang.org/x/lint/golint + script: + - make verify + - stage: UT Tests + before_script: + - go get github.com/mattn/goveralls + script: + - make unit-test && $HOME/gopath/bin/goveralls -coverprofile=coverage.txt -service=travis-ci + - stage: E2E Tests + before_script: + # Download kubectl + - sudo apt-get update && sudo apt-get install -y apt-transport-https + - curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - + - echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list + - sudo apt-get update + - sudo apt-get install -y kubectl + # Download kind binary (0.2.0) + - sudo curl -o /usr/local/bin/kind -L https://github.com/kubernetes-sigs/kind/releases/download/v0.4.0/kind-linux-amd64 + - sudo chmod +x /usr/local/bin/kind + script: + - make vcctl + - make images + - make e2e-test-kind + after_failure: + # Echo logs and upload + - test -f helm-tiller.log && "echo ******<>******" && cat helm-tiller.log + - test -f volcano-admission.log && echo "******<>******" && cat volcano-admission.log + - test -f volcano-controller.log && echo "******<>******" && cat volcano-controller.log + - test -f volcano-scheduler.log && echo "******<>******" && cat volcano-scheduler.log + - stage: Publish release before_deploy: - export TRAVIS_TAG=$(git describe --tags) script: @@ -20,7 +51,6 @@ jobs: script: make TAG=${TRAVIS_TAG} RELEASE_VER=${TRAVIS_TAG} release on: tags: true - branch: master - provider: releases api_key: $GITHUB_TOKEN file_glob: true @@ -28,7 +58,6 @@ jobs: skip_cleanup: true on: tags: true - branch: master notifications: webhooks: https://www.travisbuddy.com/ on_success: never diff --git a/hack/publish.sh b/hack/publish.sh index 68486c4bc8..3a1eb8b04d 100755 --- a/hack/publish.sh +++ b/hack/publish.sh @@ -25,8 +25,9 @@ set -o pipefail # 2. cp README document into release folder # 3. cp default queue into release folder # 4. cp helm charts template into release folder and update default image tag -# 5. upload docker images to volcano.sh -# 6. generate zip file +# 5. cp license file into release folder +# 6. upload docker images to volcano.sh +# 7. generate zip file VK_ROOT=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/.. BINARY_FOLDER=${VK_ROOT}/${BIN_DIR}/${REL_OSARCH} @@ -38,6 +39,7 @@ HELM_FOLDER=${VK_ROOT}/installer/helm VOLCANO_IMAGE_TAG=${TAG:-"latest"} DOCKER_PASSWORD=${DOCKER_PASSWORD:-""} DOCKER_USERNAME=${DOCKER_USERNAME:-""} +LICENSE_FILE=${VK_ROOT}/LICENSE if [[ ! -d ${RELEASE_BINARY} ]];then mkdir ${RELEASE_BINARY} @@ -51,6 +53,10 @@ cp ${QUEUE_FILE} ${RELEASE_FOLDER} cp -r ${HELM_FOLDER} ${RELEASE_FOLDER} +if [[ -f ${LICENSE_FILE} ]];then + cp ${LICENSE_FILE} ${RELEASE_FOLDER} +fi + # overwrite the tag name into values yaml sed -i "s/latest/${VOLCANO_IMAGE_TAG}/g" ${RELEASE_FOLDER}/helm/chart/volcano/values.yaml diff --git a/installer/README.md b/installer/README.md index eaf50789d3..faf9584a6e 100644 --- a/installer/README.md +++ b/installer/README.md @@ -9,13 +9,13 @@ Kubernetes that are commonly required by many classes of batch & elastic workloa ## Prerequisites -- Kubernetes 1.13+ with CRD support +- Kubernetes 1.12+ with CRD support ## Installing volcano via yaml file All-in-one yaml has been generated for quick deployment. Try command: ```$xslt -kubectl apply -f volcano-xxx.yaml +kubectl apply -f volcano-v0.0.x.yaml ``` Check the status in namespace `volcano-system` ```$xslt @@ -51,10 +51,10 @@ kubectl apply -f default-queue.yaml To install the volcano with chart: ```bash -helm install helm/chart --namespace --name +helm install helm/chart/volcano --namespace --name e.g : -helm install helm/chart --namespace volcano-trial --name volcano-trial +helm install helm/chart/volcano --namespace volcano-trial --name volcano-trial ``` This command deploys volcano in kubernetes cluster with default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.