mirror of
https://github.com/openfaas/faas.git
synced 2025-06-16 12:16:47 +00:00
Add travis and fix Dockerfile for test files
This commit is contained in:
parent
41639cba7e
commit
1079eb9c42
10
.travis.yml
Normal file
10
.travis.yml
Normal file
@ -0,0 +1,10 @@
|
||||
sudo: required
|
||||
|
||||
services:
|
||||
- docker
|
||||
before_install:
|
||||
- docker pull golang:1.7.3
|
||||
|
||||
script:
|
||||
- sh build.sh
|
||||
|
20
build.sh
20
build.sh
@ -1,20 +1,6 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
# First do - git clone https://github.com/alexellis/faas && cd faas
|
||||
(cd gateway && ./build.sh)
|
||||
(cd watchdog && ./build.sh)
|
||||
|
||||
docker network create --driver overlay --attachable functions
|
||||
|
||||
cd watchdog
|
||||
./build.sh
|
||||
|
||||
cp ./fwatchdog ../sample-functions/catservice/
|
||||
|
||||
docker build --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy \
|
||||
-t alexellis2/faas-catservice .
|
||||
#docker service rm catservice ; docker service create --network=functions --name catservice alexellis2/faas-catservice
|
||||
|
||||
cd ..
|
||||
|
||||
cd gateway
|
||||
./build.sh
|
||||
# docker rm -f server; docker run -d -v /var/run/docker.sock:/var/run/docker.sock --name server -p 8080:8080 --network=functions alexellis2/faas-gateway
|
||||
|
@ -1,6 +1,13 @@
|
||||
FROM golang:1.7.3
|
||||
RUN mkdir -p /go/src/app
|
||||
COPY main.go /go/src/app
|
||||
WORKDIR /go/src/app
|
||||
COPY main.go .
|
||||
COPY readconfig.go .
|
||||
COPY config_test.go .
|
||||
|
||||
WORKDIR /go/src/app
|
||||
RUN go get -d -v
|
||||
|
||||
RUN go test
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user