Merge pull request #41 from carmark/travis
Add travis integration test and fix the tag for client-go in glide.yaml.
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
|||||||
|
sudo: required
|
||||||
|
dist: trusty
|
||||||
|
|
||||||
|
language: go
|
||||||
|
go:
|
||||||
|
- 1.7.4
|
||||||
|
|
||||||
|
install:
|
||||||
|
- go get github.com/Masterminds/glide
|
||||||
|
|
||||||
|
script:
|
||||||
|
- cd ${TRAVIS_BUILD_DIR}
|
||||||
|
- glide install
|
||||||
|
- ./fission-bundle/build.sh
|
||||||
|
- hack/verify-gofmt.sh
|
||||||
|
- go test -v -i $(go list ./... | grep -v '/vendor/')
|
||||||
|
- go test -v $(go list ./... | grep -v '/vendor/')
|
||||||
+1
-1
@@ -20,7 +20,7 @@ import:
|
|||||||
subpackages:
|
subpackages:
|
||||||
- context
|
- context
|
||||||
- package: k8s.io/client-go
|
- package: k8s.io/client-go
|
||||||
version: 1.5
|
version: v1.5.0
|
||||||
subpackages:
|
subpackages:
|
||||||
- 1.5/kubernetes
|
- 1.5/kubernetes
|
||||||
- 1.5/pkg/api
|
- 1.5/pkg/api
|
||||||
|
|||||||
Executable
+21
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o nounset
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
find_files() {
|
||||||
|
find . -not \( \
|
||||||
|
\( \
|
||||||
|
-wholename '*/vendor/*' \
|
||||||
|
\) -prune \
|
||||||
|
\) -name '*.go'
|
||||||
|
}
|
||||||
|
|
||||||
|
GOFMT="gofmt -s"
|
||||||
|
bad_files=$(find_files | xargs $GOFMT -l)
|
||||||
|
if [[ -n "${bad_files}" ]]; then
|
||||||
|
echo "!!! '$GOFMT' needs to be run on the following files: "
|
||||||
|
echo "${bad_files}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
+6
-6
@@ -309,7 +309,7 @@ func (gp *GenericPool) createPool() error {
|
|||||||
},
|
},
|
||||||
Spec: v1.PodSpec{
|
Spec: v1.PodSpec{
|
||||||
Volumes: []v1.Volume{
|
Volumes: []v1.Volume{
|
||||||
v1.Volume{
|
{
|
||||||
Name: "userfunc",
|
Name: "userfunc",
|
||||||
VolumeSource: v1.VolumeSource{
|
VolumeSource: v1.VolumeSource{
|
||||||
EmptyDir: &v1.EmptyDirVolumeSource{},
|
EmptyDir: &v1.EmptyDirVolumeSource{},
|
||||||
@@ -317,25 +317,25 @@ func (gp *GenericPool) createPool() error {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
Containers: []v1.Container{
|
Containers: []v1.Container{
|
||||||
v1.Container{
|
{
|
||||||
Name: gp.env.Metadata.Name,
|
Name: gp.env.Metadata.Name,
|
||||||
Image: gp.env.RunContainerImageUrl,
|
Image: gp.env.RunContainerImageUrl,
|
||||||
ImagePullPolicy: v1.PullIfNotPresent,
|
ImagePullPolicy: v1.PullIfNotPresent,
|
||||||
TerminationMessagePath: "/dev/termination-log",
|
TerminationMessagePath: "/dev/termination-log",
|
||||||
VolumeMounts: []v1.VolumeMount{
|
VolumeMounts: []v1.VolumeMount{
|
||||||
v1.VolumeMount{
|
{
|
||||||
Name: "userfunc",
|
Name: "userfunc",
|
||||||
MountPath: sharedMountPath,
|
MountPath: sharedMountPath,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
v1.Container{
|
{
|
||||||
Name: "fetcher",
|
Name: "fetcher",
|
||||||
Image: "fission/fetcher",
|
Image: "fission/fetcher",
|
||||||
ImagePullPolicy: v1.PullIfNotPresent,
|
ImagePullPolicy: v1.PullIfNotPresent,
|
||||||
TerminationMessagePath: "/dev/termination-log",
|
TerminationMessagePath: "/dev/termination-log",
|
||||||
VolumeMounts: []v1.VolumeMount{
|
VolumeMounts: []v1.VolumeMount{
|
||||||
v1.VolumeMount{
|
{
|
||||||
Name: "userfunc",
|
Name: "userfunc",
|
||||||
MountPath: sharedMountPath,
|
MountPath: sharedMountPath,
|
||||||
},
|
},
|
||||||
@@ -384,7 +384,7 @@ func (gp *GenericPool) createSvc(name string, labels map[string]string) (*v1.Ser
|
|||||||
Spec: v1.ServiceSpec{
|
Spec: v1.ServiceSpec{
|
||||||
Type: v1.ServiceTypeClusterIP,
|
Type: v1.ServiceTypeClusterIP,
|
||||||
Ports: []v1.ServicePort{
|
Ports: []v1.ServicePort{
|
||||||
v1.ServicePort{
|
{
|
||||||
Protocol: v1.ProtocolTCP,
|
Protocol: v1.ProtocolTCP,
|
||||||
Port: 80,
|
Port: 80,
|
||||||
TargetPort: intstr.FromInt(8888),
|
TargetPort: intstr.FromInt(8888),
|
||||||
|
|||||||
Reference in New Issue
Block a user