forked from canonical/microk8s
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
29 lines (24 loc) · 955 Bytes
/
.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
language: bash
sudo: required
cache:
directories:
- "$HOME/google-cloud-sdk/"
services: [docker]
script:
- cp -r parts/microk8s/build/build/kube_bins .
- export KUBE_SNAP_BINS=$PWD/kube_bins/v1.10.3/
- docker run -v $(pwd):$(pwd) -w $(pwd) snapcore/snapcraft:stable sh -c "apt update && snapcraft"
# Install GCloud so we can upload the snap to our repo
- gcloud version || true
- if [ ! -d "$HOME/google-cloud-sdk/bin" ]; then rm -rf $HOME/google-cloud-sdk; export CLOUDSDK_CORE_DISABLE_PROMPTS=1; curl https://sdk.cloud.google.com | bash; fi
# Add gcloud to $PATH
- source /home/travis/google-cloud-sdk/path.bash.inc
- gcloud version
# Authenticate
- echo $GC > file.json
- base64 -d file.json > serviceAcc.json
- gcloud auth activate-service-account --key-file=serviceAcc.json
# Rename the snap to the latest build
- mv *.snap microk8-stemn.snap
# Upload the built snap file
- sudo gsutil cp *.snap $GC_BUCK