Skip to content

Commit

Permalink
update travis
Browse files Browse the repository at this point in the history
  • Loading branch information
yinqiwen committed Nov 9, 2017
1 parent f09f0c2 commit c82c988
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
sudo: required
services:
- docker

language: go

go:
- 1.9

env:
global:
- secure: "e7IjyptwfaNmHUYAwTZbLjup0FVD6wVOQIggLSOcqYyrbSYKepVJdbvOUfWqdZ3tUWtpHb5H/2a8RkizXHH3mBi4K5/9wlByTGmiKKA05dYbDod3KpiLbPnHK9UjRQydD6wpYJcK0/yguXmFDqYoRIFwmxeqNJ78OydIo7BOxGY="
- secure: "LEmUhd0lO5BPox3+IdBw/u45Z3TtY0arkef6v7q27qcEs3a2p+SuVVElHx4UcU8/AhN3D9jlskB0UZIgZRMfB3xaPCBVvjHh8UwQ13WqrR7524HuU8kin/4vLDdoIEvs2hQaj58slzmdyddKG2dkgCwkpK/J1DBfKHttbYE+ias="
- secure: "MO3eA15Jp2CkN0SiSI5Oo32wioCcVbaWwpxBCgQrkIyV85yakPzhoWlQWvh90QXEU9bBDKlQiTOXfo11G0as7byU8typa5UI7uLG1sGD9l2bBZbFuqorMrvHl5PeOzfjAQuUnn2KNP5RccuaCn+n65ZImhj8oTFrYGmb1VTdgg0="

before_install:
install:
- go get github.com/tools/godep
Expand Down Expand Up @@ -62,3 +73,8 @@ deploy:
on:
tags: true
repo: yinqiwen/gsnova

after_deploy:
- curl -O -L https://github.com/grammarly/rocker/releases/download/1.3.1/rocker-1.3.1_linux_amd64.tar.gz
- tar zxf rocker-0.2.2_linux_amd64.tar.gz
- ./rocker build -f Docker/server/Rockerfile --auth $DOCKER_USER:$DOCKER_PASS --push -var VERSION=$TRAVIS_TAG
4 changes: 3 additions & 1 deletion Docker/server/0.30.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ RUN \
# Run the outyet command by default when the container starts.
CMD ["/gsnova/gsnova_server","-cmd" ,"-key", "809240d3a021449f6e67aa73221d42df942a308a", "-tcp", ":9443", "-quic", ":9443", "-http", ":9444", "-kcp", ":9444", "-http2", ":9445", "-tls", ":9446", "-log", "console"]
# Document that the service listens on port 9443.
EXPOSE 9443 9444 9445 9446
EXPOSE 9443 9444 9445 9446

PUSH gsnova/gsnova-server:test
20 changes: 20 additions & 0 deletions Docker/server/Rockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Start from a Debian image with the latest version of Go installed
# and a workspace (GOPATH) configured at /go.
FROM alpine:3.6

RUN \
apk add --no-cache --virtual curl \
&& mkdir -m 777 /gsnova \
&& cd /gsnova \
&& curl -fSL https://github.com/yinqiwen/gsnova/releases/download/{{ .Version }}/gsnova_server_linux_amd64-{{ .Version }}.tar.bz2 | tar xj \
&& rm -rf gsnova_server_linux_amd64-{{ .Version }}.tar.bz2 \
&& chgrp -R 0 /gsnova \
&& chmod -R g+rwX /gsnova

#WORKDIR /go/bin
# Run the outyet command by default when the container starts.
CMD ["/gsnova/gsnova_server","-cmd" ,"-key", "809240d3a021449f6e67aa73221d42df942a308a", "-tcp", ":9443", "-quic", ":9443", "-http", ":9444", "-kcp", ":9444", "-http2", ":9445", "-tls", ":9446", "-log", "console"]
# Document that the service listens on port 9443.
EXPOSE 9443 9444 9445 9446

PUSH gsnova/gsnova-server:{{ .Version }}

0 comments on commit c82c988

Please sign in to comment.