Skip to content

Commit

Permalink
[CI] Clearer printing when skipping builds
Browse files Browse the repository at this point in the history
[skip build]
  • Loading branch information
giordano committed Jan 17, 2023
1 parent 3822f8f commit b715cb8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
23 changes: 12 additions & 11 deletions .buildkite/generator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,6 @@ if isempty(PLATFORMS)
@error "Unable to determine the proper platforms" NAME
end

# Create the BUILD_STEPS
BUILD_STEPS = Any[]
for PLATFORM in PLATFORMS
println(" $(PLATFORM): building")

push!(BUILD_STEPS, build_step(NAME, PLATFORM, PROJECT))
end

const IS_PR = get(ENV, "BUILDKITE_PULL_REQUEST", "false") != "false"
const SKIP_BUILD_COOKIE="[skip build]"

Expand All @@ -107,9 +99,9 @@ if IS_PR
PR_NUMBER = ENV["BUILDKITE_PULL_REQUEST"]
exec(`git fetch origin "refs/pull/$(PR_NUMBER)/head:refs/remotes/origin/pr/$(PR_NUMBER)"`)

COMMIT_MSG = readchomp(`git show -s --format=%B origin/pr/$(PR_NUMBER)`)
COMMIT_MSG = readchomp(`git show -s --format=%B origin/pr/$(PR_NUMBER)`)
else
COMMIT_MSG = readchomp(`git show -s --format=%B`)
COMMIT_MSG = readchomp(`git show -s --format=%B`)
end
# This variable will tell us whether we want to skip the build
const SKIP_BUILD = contains(COMMIT_MSG, SKIP_BUILD_COOKIE)
Expand All @@ -119,7 +111,16 @@ if !IS_PR
push!(STEPS, jll_init_step(NAME, PROJECT))
push!(STEPS, wait_step())
end
if !SKIP_BUILD
# Create the BUILD_STEPS
if SKIP_BUILD
println("The commit messages contains $(SKIP_BUILD_COOKIE), skipping build")
else
BUILD_STEPS = Any[]
for PLATFORM in PLATFORMS
println(" $(PLATFORM): building")

push!(BUILD_STEPS, build_step(NAME, PLATFORM, PROJECT))
end
push!(STEPS, group_step(NAME, BUILD_STEPS))
end
if !IS_PR
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/pipeline.yml.signature
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Salted__>�o=� T������\1$��P�o�IY�������Sb:p ;o��2h���̽l����J�4�9+��#����1
Salted__wbIwYKp�$�� ��T�@�K+/ 46�_�$���4ӵ���s��5������#�l#l,����i��v� Ns�\oQ����<�V���� R

0 comments on commit b715cb8

Please sign in to comment.