Skip to content

Commit

Permalink
Remove bazel from test process
Browse files Browse the repository at this point in the history
CORS-749, CORS-750
  • Loading branch information
sallyom committed Aug 4, 2018
1 parent 434f1cb commit 815b44b
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ jobs:
name: YAML lint
- script: ./hack/shellcheck.sh
name: shellcheck
- script: ./hack/tf-fmt.sh
name: Terraform format
- script: ./hack/gotest.sh
name: go test
- script: "docker run -v $PWD:/go/src/github.com/openshift/installer -w /go/src/github.com/openshift/installer quay.io/coreos/golang-testing go vet ./installer/..."
name: Go vet
- script: "docker run -v $PWD:$PWD -w $PWD quay.io/coreos/golang-testing golint -set_exit_status installer/..."
Expand Down
14 changes: 14 additions & 0 deletions hack/gotest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

# :) is there a better way to set up the path here in prow?
if [ "$IS_CONTAINER" != "" ]; then
NEEDPATH='/usr/local/go/src/github.com/openshift/installer'
mkdir -p $NEEDPATH
cp -R . $NEEDPATH/.
cd $NEEDPATH || exit 1
CGO_ENABLED=0 go test ./installer/...
else
#in prow, have to figure out how to set workingdir so can just use this instead
#docker run -e IS_CONTAINER='TRUE' -v "$(pwd)":/usr/local/go/src/github.com/openshift/installer -w /usr/local/go/src/github.com/openshift/installer quay.io/coreos/golang-testing ./hack/gotest.sh
docker run -e IS_CONTAINER='TRUE' -v "$(pwd)":"$(pwd)" -w "$(pwd)" quay.io/coreos/golang-testing ./hack/gotest.sh
fi
17 changes: 17 additions & 0 deletions hack/tf-fmt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

# in prow, already in container, so no 'docker run'
if [ "$IS_CONTAINER" != "" ]; then
export PATH=/tmp:$PATH
INSTALLER_REPO=$(pwd)
cd /tmp || exit 1
wget https://releases.hashicorp.com/terraform/0.11.7/terraform_0.11.7_linux_amd64.zip
unzip terraform_0.11.7_linux_amd64.zip
set -x
cd "$INSTALLER_REPO" || exit 1
/tmp/terraform fmt -list -check -write=false
else
docker run -e IS_CONTAINER='TRUE' \
--rm -v "$PWD":"$PWD":ro -w "$PWD" -v /tmp:/tmp:rw \
-w "$PWD" quay.io/coreos/golang-testing ./hack/tf-fmt.sh
fi

0 comments on commit 815b44b

Please sign in to comment.