-
Notifications
You must be signed in to change notification settings - Fork 21
/
.travis.yml
53 lines (46 loc) · 1.73 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
sudo: required
branches:
only:
- master
services:
- docker
before_install:
- export KUBE_VERSION=$(cat kube_version.txt)
- sudo apt-get update && sudo apt-get install -y apt-transport-https curl gzip
- 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 /etc/apt/sources.list.d/kubernetes.list
- sudo apt-get update && sudo apt-get install -qy kubeadm=${KUBE_VERSION}-00
#- wget http://gosspublic.alicdn.com/ossutil/1.6.19/ossutil64 -O /tmp/ossutil64
#- chmod 755 /tmp/ossutil64
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
script:
- travis_wait 30 sudo bash scripts/start.sh
after_success:
- echo "[Push file]"
- cd ${TRAVIS_BUILD_DIR}/
- git checkout master
- git pull
- git status
- git config --global user.email "[email protected]"
- git config --global user.name "lework"
- git remote rm origin
- sudo git remote add origin https://${GH_TOKEN}@github.com/lework/kainstall-offline.git > /dev/null 2>&1
- git add -A
- git commit -m "[SKIP CI] Add kube ${KUBE_VERSION} offline package"
- git push origin master
- git pull
deploy:
provider: releases
api_key: "${GH_TOKEN}"
tag_name: "${KUBE_VERSION}"
file: "/tmp/${KUBE_VERSION}/*.tgz"
file_glob: "true"
release_notes: "Kubernetes offline package. \nFiles: https://github.com/lework/kainstall-offline/tree/master/file_list/${KUBE_VERSION} \nTool: https://github.com/lework/kainstall"
skip_cleanup: true
overwrite: true
edge: true # opt in to dpl v2
on:
branch: master
condition: $KUBE_VERSION != ""
notifications:
email: false