Skip to content

Commit e0ceb34

Browse files
[ci] Ensure scripts fail if a command fails (flutter#3963)
Cirrus automatically fails as soon as a command fails, but when converting Cirrus steps to LUCI bash scripts we forgot to add `set -e`. Also adds `pipefail` to the simulator creation script so that part of the pipeline failing will fail the command. Fixes flutter#125243
1 parent 5a2337f commit e0ceb34

11 files changed

+13
-0
lines changed

.ci/scripts/build_all_packages_app.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Copyright 2013 The Flutter Authors. All rights reserved.
33
# Use of this source code is governed by a BSD-style license that can be
44
# found in the LICENSE file.
5+
set -e
56

67
platform="$1"
78
build_mode="$2"

.ci/scripts/build_examples_win32.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Copyright 2013 The Flutter Authors. All rights reserved.
33
# Use of this source code is governed by a BSD-style license that can be
44
# found in the LICENSE file.
5+
set -e
56

67
dart ./script/tool/bin/flutter_plugin_tools.dart build-examples --windows \
78
--packages-for-branch --log-timing

.ci/scripts/create_all_packages_app.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Copyright 2013 The Flutter Authors. All rights reserved.
33
# Use of this source code is governed by a BSD-style license that can be
44
# found in the LICENSE file.
5+
set -e
56

67
dart ./script/tool/bin/flutter_plugin_tools.dart create-all-packages-app \
78
--output-dir=. --exclude script/configs/exclude_all_packages_app.yaml

.ci/scripts/create_simulator.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
# Copyright 2013 The Flutter Authors. All rights reserved.
33
# Use of this source code is governed by a BSD-style license that can be
44
# found in the LICENSE file.
5+
set -e
6+
# Ensure that the create/boot pipeline fails if `create` fails
7+
set -o pipefail
58

69
# The name here must match remove_simulator.sh
710
readonly DEVICE_NAME=Flutter-iPhone

.ci/scripts/custom_package_tests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Copyright 2013 The Flutter Authors. All rights reserved.
33
# Use of this source code is governed by a BSD-style license that can be
44
# found in the LICENSE file.
5+
set -e
56

67
# Exclusions
78
#

.ci/scripts/dart_unit_tests_win32.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Copyright 2013 The Flutter Authors. All rights reserved.
33
# Use of this source code is governed by a BSD-style license that can be
44
# found in the LICENSE file.
5+
set -e
56

67
dart ./script/tool/bin/flutter_plugin_tools.dart test \
78
--exclude=script/configs/windows_unit_tests_exceptions.yaml \

.ci/scripts/drive_examples_win32.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Copyright 2013 The Flutter Authors. All rights reserved.
33
# Use of this source code is governed by a BSD-style license that can be
44
# found in the LICENSE file.
5+
set -e
56

67
dart ./script/tool/bin/flutter_plugin_tools.dart drive-examples --windows \
78
--exclude=script/configs/exclude_integration_win32.yaml --packages-for-branch --log-timing

.ci/scripts/native_test_win32.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Copyright 2013 The Flutter Authors. All rights reserved.
33
# Use of this source code is governed by a BSD-style license that can be
44
# found in the LICENSE file.
5+
set -e
56

67
dart ./script/tool/bin/flutter_plugin_tools.dart native-test --windows \
78
--no-integration --packages-for-branch --log-timing

.ci/scripts/plugin_tools_tests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Copyright 2013 The Flutter Authors. All rights reserved.
33
# Use of this source code is governed by a BSD-style license that can be
44
# found in the LICENSE file.
5+
set -e
56

67
cd script/tool
78
dart pub run test

.ci/scripts/prepare_tool.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Copyright 2013 The Flutter Authors. All rights reserved.
33
# Use of this source code is governed by a BSD-style license that can be
44
# found in the LICENSE file.
5+
set -e
56

67
# To set FETCH_HEAD for "git merge-base" to work
78
git fetch origin main

0 commit comments

Comments
 (0)