Skip to content

Commit

Permalink
Build: create initial circleci project (envoyproxy#41)
Browse files Browse the repository at this point in the history
This creates the initial build and test workflows for circleci

Signed-off-by: <Nicholas Johns [email protected]>
  • Loading branch information
taion809 authored and ggreenway committed Mar 2, 2018
1 parent ac5c035 commit d76d309
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
references:
envoy-build-image: &envoy-build-image
envoyproxy/envoy-build:latest

version: 2
jobs:
build:
docker:
- image: *envoy-build-image
resource_class: xlarge
steps:
- checkout
- run: git submodule update --init
- run: ./ci/do_ci.sh build
test:
docker:
- image: *envoy-build-image
resource_class: xlarge
steps:
- checkout
- run: git submodule update --init
- run: ./ci/do_ci.sh test

workflows:
version: 2
all:
jobs:
- build
- test

26 changes: 26 additions & 0 deletions ci/do_ci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash -e

if [[ -f "${HOME:-/root}/.gitconfig" ]]; then
mv "${HOME:-/root}/.gitconfig" "${HOME:-/root}/.gitconfig_save"
fi

function do_build () {
bazel build --verbose_failures=true //:envoy
}

function do_test() {
bazel test --test_output=all //:echo2_integration_test
}

case "$1" in
build)
do_build
;;
test)
do_test
;;
*)
echo "must be one of [build,test]"
exit 1
;;
esac

0 comments on commit d76d309

Please sign in to comment.