Skip to content

Commit

Permalink
Merge pull request #1447 from GoogleContainerTools/fix-ci-should-fail
Browse files Browse the repository at this point in the history
fail if subcommand fails in CI
  • Loading branch information
loosebazooka authored Oct 30, 2023
2 parents 4694027 + b6718d4 commit 871e8e8
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 57 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,20 @@ jobs:
sudo apt-get autoremove -y
sudo apt-get clean
rm -rf /usr/share/dotnet/
- name: Fetch
- name: Fetch # this can take a long time if there are a lot of errors
run: |
for i in $(seq 5); do
bazel --bazelrc=$GITHUB_WORKSPACE/.github/workflows/ci.bazelrc fetch //... && break || sleep 20;
for i in $(seq 10); do
bazel --bazelrc=$GITHUB_WORKSPACE/.github/workflows/ci.bazelrc fetch //... && break || sleep 180;
done
- name: Build All Images
run: bazel --bazelrc=$GITHUB_WORKSPACE/.github/workflows/ci.bazelrc build $(bazel query 'kind(oci_image, deps(:sign_and_push))')
run: |
set -e
targets=$(bazel query 'kind(oci_image, deps(:sign_and_push))')
bazel --bazelrc=$GITHUB_WORKSPACE/.github/workflows/ci.bazelrc build $targets
- name: Unit Tests
run: bazel --bazelrc=$GITHUB_WORKSPACE/.github/workflows/ci.bazelrc test //... --build_tests_only
- name: Build Examples
run: bazel --bazelrc=$GITHUB_WORKSPACE/.github/workflows/ci.bazelrc build //examples/...

ci-images:
name: CI image tests
Expand Down
Loading

0 comments on commit 871e8e8

Please sign in to comment.