Skip to content

Commit

Permalink
Merge pull request #169 from NeowayLabs/updateDeps
Browse files Browse the repository at this point in the history
Update deps
  • Loading branch information
katcipis authored Jan 22, 2018
2 parents 1ed2f52 + c367814 commit fc3bf32
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@ dist: trusty

sudo: required

before_script:
- travis_wait 60 make imagedev

script:
- travis_wait 60 make test-integration logger=stdout
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM neowaylabs/klbdeps:0.3
FROM neowaylabs/klbdeps:0.4

COPY ./aws ${NASHPATH}/lib/klb/aws
COPY ./azure ${NASHPATH}/lib/klb/azure
Expand Down
18 changes: 11 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,17 @@ image:
export TERMINFO=""
docker build . -t neowaylabs/klb:$(version)

imagedev: image
export TERMINFO=""
docker build . -f ./hack/Dockerfile -t neowaylabs/klbdev:$(version)

credentials: image guard-sh guard-subscription guard-service-principal guard-service-secret
docker run -ti --rm -v `pwd`:/credentials -w /credentials neowaylabs/klb:$(version) \
docker run -ti --rm -v `pwd`:/credentials -w /credentials neowaylabs/klbdev:$(version) \
/credentials/tools/azure/getcredentials.sh \
$(sh) "$(subscription)" "$(service-principal)" "$(service-secret)"

createsp: image guard-subscription-id guard-service-principal guard-service-secret
docker run -ti --rm -v `pwd`:/createsp -w /createsp neowaylabs/klb:$(version) \
docker run -ti --rm -v `pwd`:/createsp -w /createsp neowaylabs/klbdev:$(version) \
/createsp/tools/azure/createsp.sh \
"$(subscription-id)" "$(service-principal)" "$(service-secret)"

Expand Down Expand Up @@ -60,20 +64,20 @@ cpu=10
gotest=go test -v ./tests/azure -parallel $(parallel) -cpu $(cpu)
gotestargs=-args -logger $(logger)

test: image
test: imagedev
./hack/run.sh nash ./azure/vm_test.sh

test-integration: image
test-integration: imagedev
./hack/run.sh $(gotest) -timeout $(integration_timeout) -run=$(run) ./... $(gotestargs)

test-examples: image
test-examples: imagedev
./hack/run.sh $(gotest) -timeout $(examples_timeout) -tags=examples -run=TestExamples $(gotestargs)

# It is recommended to use this locally. It takes too much time for the CI
test-all: test
test-all: imagedev
./hack/run.sh $(gotest) -timeout $(all_timeout) -tags=examples $(gotestargs)

cleanup: image
cleanup: imagedev
./hack/run-tty.sh ./tools/azure/cleanup.sh

testhost:
Expand Down
11 changes: 11 additions & 0 deletions hack/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM neowaylabs/klb

ENV GO_VERSION="1.9"
ENV GOROOT="/goroot"
ENV PATH=${PATH}:${GOROOT}/bin

RUN cd /tmp && \
wget https://storage.googleapis.com/golang/go$GO_VERSION.linux-amd64.tar.gz && \
tar -xf go$GO_VERSION.linux-amd64.tar.gz && \
mkdir -p $GOROOT && \
mv ./go/* $GOROOT
2 changes: 1 addition & 1 deletion hack/run-tty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ set -o nounset

source ./hack/loadenv.sh

docker run --rm -ti -v `pwd`:$WORKDIR -w $WORKDIR --env-file $DOCKER_ENV neowaylabs/klb "$@"
docker run --rm -ti -v `pwd`:$WORKDIR -w $WORKDIR --env-file $DOCKER_ENV neowaylabs/klbdev "$@"
2 changes: 1 addition & 1 deletion hack/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ set -o nounset

source ./hack/loadenv.sh

docker run --rm -v `pwd`:$WORKDIR -w $WORKDIR --env-file $DOCKER_ENV neowaylabs/klb "$@"
docker run --rm -v `pwd`:$WORKDIR -w $WORKDIR --env-file $DOCKER_ENV neowaylabs/klbdev "$@"

0 comments on commit fc3bf32

Please sign in to comment.