Skip to content

Commit

Permalink
Merge pull request #3 from rb3ckers/master
Browse files Browse the repository at this point in the history
upstream updates
  • Loading branch information
Voronenko authored Jun 4, 2019
2 parents 3cbac56 + abe5a2d commit 48cd7a5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 32 deletions.
7 changes: 2 additions & 5 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
variables:
GL_URL: github.com/rb3ckers
GO_PROJECT_NAMESPACE: trafficmirror
IMAGE_FAMILY: voronenko/trafficmirror
IMAGE_FAMILY: stackstate/trafficmirror
CI_REGISTRY: docker.io

.prep_go: &prep_go
before_script:
# - export GL_URL=$(echo ${CI_PROJECT_URL:-https://github.com/rb3ckers/trafficmirror} | awk -F/ '{print $3}')
- echo export GO_PROJECT_PATH="$GOPATH/src/$GL_URL/$GO_PROJECT_NAMESPACE"
- export GO_PROJECT_PATH="$GOPATH/src/$GL_URL/$GO_PROJECT_NAMESPACE"
- rm -rf $GOPATH/src/$GL_URL
Expand All @@ -18,7 +17,6 @@ variables:
stages:
- build
- docker_build
# - taglatest

go_build:
<<: *prep_go
Expand All @@ -43,8 +41,7 @@ docker_build:
services:
- docker:dind
script:
# - echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" "$CI_REGISTRY" --password-stdin
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- docker build -t $IMAGE_FAMILY:${CI_COMMIT_TAG:-dirty} .
- echo docker push $IMAGE_FAMILY:${CI_COMMIT_TAG:-dirty}
- docker push $IMAGE_FAMILY:${CI_COMMIT_TAG:-dirty}
- docker push $IMAGE_FAMILY:${CI_COMMIT_TAG:-dirty}
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
FROM debian:stretch

ADD build/trafficmirror /trafficmirror
ADD ./init.sh /init
RUN chmod +x /init

CMD ["trafficmirror"]
CMD ["/init"]

EXPOSE 8080
26 changes: 0 additions & 26 deletions Gopkg.toml
Original file line number Diff line number Diff line change
@@ -1,29 +1,3 @@
# Gopkg.toml example
#
# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
#
# [prune]
# non-go = false
# go-tests = true
# unused-packages = true


[[constraint]]
name = "github.com/sony/gobreaker"
Expand Down
8 changes: 8 additions & 0 deletions init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

LISTEN_PORT=${LISTEN_PORT:-7077}
MAIN=${MAIN:-localhost:8888}
EXTRA_PARAMS=$1

echo /trafficmirror /trafficmirror -listen ":${LISTEN_PORT}" -main=${MAIN} $EXTRA_PARAMS
/trafficmirror -listen ":${LISTEN_PORT}" -main=${MAIN} $EXTRA_PARAMS

0 comments on commit 48cd7a5

Please sign in to comment.