Skip to content

Commit

Permalink
Use cache for a build scripts (#221)
Browse files Browse the repository at this point in the history
* Use cache for a build scripts

* fix

* fix
  • Loading branch information
DanG100 authored Aug 4, 2023
1 parent 379733b commit f5136de
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
5 changes: 5 additions & 0 deletions cloudbuild/lemming-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@

set -xe

cat << EOF > ~/.bazelrc
build --remote_cache https://storage.googleapis.com/lemming-bazel-cache
build --google_default_credentials
EOF

export PATH=${PATH}:/usr/local/go/bin
gopath=$(go env GOPATH)
export PATH=${PATH}:$gopath/bin
Expand Down
8 changes: 7 additions & 1 deletion cloudbuild/operator-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@

set -xe

cat << EOF > ~/.bazelrc
build --remote_cache https://storage.googleapis.com/lemming-bazel-cache
build --google_default_credentials
EOF

export PATH=${PATH}:/usr/local/go/bin
gopath=$(go env GOPATH)
export PATH=${PATH}:$gopath/bin
Expand All @@ -26,5 +31,6 @@ sudo install bazel /usr/local/bin/
cd /tmp/workspace
kne deploy ~/kne-internal/deploy/kne/kind-bridge.yaml

skaffold run -m lemming-operator
make load-operator
kubectl set image -n lemming-operator deployment/lemming-controller-manager manager=us-west1-docker.pkg.dev/openconfig-lemming/release/operator:ga
kne create integration_tests/twodut_tests/topology.pb.txt
8 changes: 4 additions & 4 deletions cloudbuild/presubmit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ sudo install bazel /usr/local/bin/
cd /tmp/workspace
kne deploy ~/kne-internal/deploy/kne/kind-bridge.yaml

set +e
make load-operator
kubectl set image -n lemming-operator deployment/lemming-controller-manager manager=us-west1-docker.pkg.dev/openconfig-lemming/release/operator:ga
make load

set +e
rc=0
trap dumpinfo EXIT
trap 'rc=$?' ERR

make load-operator
kubectl set image -n lemming-operator deployment/lemming-controller-manager manager=us-west1-docker.pkg.dev/openconfig-lemming/release/operator:ga
make load
make itest
# Reenable these tests once not flaky.
# cd cloudbuild && ./fp-test.sh
Expand Down

0 comments on commit f5136de

Please sign in to comment.