Skip to content

Commit a7a5bd8

Browse files
author
wwatson
committed
travis yml now added back
1 parent 2826e5f commit a7a5bd8

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.travis.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
language: minimal
2+
3+
services:
4+
- docker
5+
6+
jobs:
7+
include:
8+
- stage: K8s
9+
before_script:
10+
# Download and install go
11+
- wget https://dl.google.com/go/go1.13.linux-amd64.tar.gz
12+
- tar -xvf go1.13.linux-amd64.tar.gz
13+
- sudo mv go /usr/local
14+
- export GOROOT=/usr/local/go
15+
- export GOPATH=$HOME/go
16+
- export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
17+
# Download and install KinD
18+
- GO111MODULE=on go get sigs.k8s.io/kind
19+
# Download and install Crystal
20+
- sudo apt update && sudo apt install -y libevent-dev
21+
- wget https://github.com/crystal-lang/crystal/releases/download/0.35.1/crystal-0.35.1-1-linux-x86_64.tar.gz
22+
- tar -xvf crystal-*.tar.gz
23+
- export PATH=$(pwd)/crystal-0.35.1-1/bin:$PATH
24+
- crystal version
25+
# Create a new Kubernetes cluster using KinD
26+
- kind create cluster
27+
# Download and install kubectl
28+
- curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
29+
script:
30+
# Run Crystal Spec
31+
- git fetch --tags
32+
- shards install
33+
- crystal src/cnf-conformance.cr helm_local_install
34+
- crystal src/cnf-conformance.cr setup
35+
- LOG_LEVEL=info crystal spec -v || travis_terminate 1;
36+
# Build Static Bin
37+
- docker pull crystallang/crystal:0.35.1-alpine
38+
- docker run --rm -it -v $PWD:/workspace -w /workspace crystallang/crystal:0.35.1-alpine crystal build src/cnf-conformance.cr --release --static --link-flags "-lxml2 -llzma"
39+
- |
40+
if [ -z "${GITHUB_USER+x}" ] || [ -z "${GITHUB_TOKEN+x}" ]; then
41+
exit 0
42+
else
43+
./cnf-conformance upsert_release
44+
fi

0 commit comments

Comments
 (0)