Skip to content

Commit

Permalink
Support release in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
TommyLike committed Jul 16, 2019
1 parent 3caabee commit aa792fc
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 9 deletions.
35 changes: 32 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ******<<helm tiller service logs>>******" && cat helm-tiller.log
- test -f volcano-admission.log && echo "******<<admission logs>>******" && cat volcano-admission.log
- test -f volcano-controller.log && echo "******<<controller logs>>******" && cat volcano-controller.log
- test -f volcano-scheduler.log && echo "******<<scheduler logs>>******" && cat volcano-scheduler.log
- stage: Publish release
before_deploy:
- export TRAVIS_TAG=$(git describe --tags)
script:
Expand All @@ -20,15 +51,13 @@ 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
file: _output/release/volcano-${TRAVIS_TAG}-${OSTYPE}.tar.gz
skip_cleanup: true
on:
tags: true
branch: master
notifications:
webhooks: https://www.travisbuddy.com/
on_success: never
10 changes: 8 additions & 2 deletions hack/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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}
Expand All @@ -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

Expand Down
8 changes: 4 additions & 4 deletions installer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -51,10 +51,10 @@ kubectl apply -f default-queue.yaml
To install the volcano with chart:

```bash
helm install helm/chart --namespace <namespace> --name <specified-name>
helm install helm/chart/volcano --namespace <namespace> --name <specified-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.
Expand Down

0 comments on commit aa792fc

Please sign in to comment.