Skip to content

Commit 3b7c550

Browse files
committed
[ci] CI should fail on bad builds
Signed-off-by: Chris Cranford <chris@hibernate.org>
1 parent 390c563 commit 3b7c550

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

Rakefile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ task :default => :build
4545
desc 'Install the environment to run Jekyll'
4646
task :install do
4747
system 'bundle install'
48-
exit 0
48+
exit 1 unless $?.success?
4949
end
5050

5151
desc 'Update the environment to run Jekyll'
5252
task :update do
5353
system 'bundle update'
54-
exit 0
54+
exit 1 unless $?.success?
5555
end
5656

5757
desc 'Build and preview the site locally in development mode'
@@ -61,7 +61,11 @@ task :preview do
6161
create_context7_files()
6262

6363
system 'bundle install'
64+
exit 1 unless $?.success?
65+
6466
system "#{$use_bundle_exec ? 'bundle exec ' : ''}jekyll serve --host 0.0.0.0 --livereload" or raise "Jekyll build failed"
67+
exit 1 unless $?.success?
68+
6569
end
6670

6771
desc 'Build the site for the given environment: development (the default), staging, or production'
@@ -70,7 +74,11 @@ task :build, [:environment] do |task, args|
7074

7175
run_antora
7276
system 'bundle install'
77+
exit 1 unless $?.success?
78+
7379
system "JEKYLL_ENV=#{args[:environment]} bundle exec jekyll build"
80+
exit 1 unless $?.success?
81+
7482
clone_versions
7583

7684
create_context7_files()

0 commit comments

Comments
 (0)