Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove skip-ci flag, default to nowait #89

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions keybot/darwinbot.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ func (d *darwinbot) Run(bot *slackbot.Bot, channel string, args []string) (strin
buildDarwinClientCommit := buildDarwin.Flag("client-commit", "Build a specific client commit").String()
buildDarwinKbfsCommit := buildDarwin.Flag("kbfs-commit", "Build a specific kbfs commit").String()
buildDarwinNoPull := buildDarwin.Flag("skip-pull", "Don't pull before building the app").Bool()
buildDarwinSkipCI := buildDarwin.Flag("skip-ci", "Whether to skip CI").Bool()
buildDarwinSmoke := buildDarwin.Flag("smoke", "Whether to make a pair of builds for smoketesting when on a branch").Bool()
buildDarwinNoS3 := buildDarwin.Flag("skip-s3", "Don't push to S3 after building the app").Bool()
buildDarwinNoNotarize := buildDarwin.Flag("skip-notarize", "Don't notarize the app").Bool()
Expand Down Expand Up @@ -66,7 +65,6 @@ func (d *darwinbot) Run(bot *slackbot.Bot, channel string, args []string) (strin

case buildDarwin.FullCommand():
smokeTest := true
skipCI := *buildDarwinSkipCI
testBuild := *buildDarwinTest
// If it's a custom build, make it a test build unless --smoke is passed.
if *buildDarwinClientCommit != "" || *buildDarwinKbfsCommit != "" {
Expand All @@ -83,8 +81,7 @@ func (d *darwinbot) Run(bot *slackbot.Bot, channel string, args []string) (strin
{Key: "TEST", Value: boolToEnvString(testBuild)},
{Key: "CLIENT_COMMIT", Value: *buildDarwinClientCommit},
{Key: "KBFS_COMMIT", Value: *buildDarwinKbfsCommit},
// TODO: Rename to SKIP_CI in packaging scripts
{Key: "NOWAIT", Value: boolToEnvString(skipCI)},
{Key: "NOWAIT", Value: boolToEnvString(true)},
{Key: "NOPULL", Value: boolToEnvString(*buildDarwinNoPull)},
{Key: "NOS3", Value: boolToEnvString(*buildDarwinNoS3)},
{Key: "NONOTARIZE", Value: boolToEnvString(*buildDarwinNoNotarize)},
Expand Down
12 changes: 3 additions & 9 deletions keybot/keybot.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,14 @@ func (k *keybot) Run(bot *slackbot.Bot, channel string, args []string) (string,
cancelLabel := cancel.Arg("label", "Launchd job label").String()

buildMobile := build.Command("mobile", "Start an iOS and Android build")
buildMobileSkipCI := buildMobile.Flag("skip-ci", "Whether to skip CI").Bool()
buildMobileAutomated := buildMobile.Flag("automated", "Whether this is a timed build").Bool()
buildMobileCientCommit := buildMobile.Flag("client-commit", "Build a specific client commit hash").String()

buildAndroid := build.Command("android", "Start an android build")
buildAndroidSkipCI := buildAndroid.Flag("skip-ci", "Whether to skip CI").Bool()
buildAndroidAutomated := buildAndroid.Flag("automated", "Whether this is a timed build").Bool()
buildAndroidCientCommit := buildAndroid.Flag("client-commit", "Build a specific client commit hash").String()
buildIOS := build.Command("ios", "Start an ios build")
buildIOSClean := buildIOS.Flag("clean", "Whether to clean first").Bool()
buildIOSSkipCI := buildIOS.Flag("skip-ci", "Whether to skip CI").Bool()
buildIOSAutomated := buildIOS.Flag("automated", "Whether this is a timed build").Bool()
buildIOSCientCommit := buildIOS.Flag("client-commit", "Build a specific client commit hash").String()

Expand Down Expand Up @@ -92,7 +89,6 @@ func (k *keybot) Run(bot *slackbot.Bot, channel string, args []string) (string,
return launchd.Stop(*cancelLabel)

case buildMobile.FullCommand():
skipCI := *buildMobileSkipCI
automated := *buildMobileAutomated
script := launchd.Script{
Label: "keybase.build.mobile",
Expand All @@ -106,15 +102,14 @@ func (k *keybot) Run(bot *slackbot.Bot, channel string, args []string) (string,
{Key: "NDK_HOME", Value: NDKPath},
{Key: "ANDROID_NDK", Value: NDKPath},
{Key: "CLIENT_COMMIT", Value: *buildMobileCientCommit},
{Key: "CHECK_CI", Value: boolToEnvString(!skipCI)},
{Key: "CHECK_CI", Value: boolToEnvString(false)},
{Key: "AUTOMATED_BUILD", Value: boolToEnvString(automated)},
},
}
env.GoPath = env.PathFromHome("go-ios")
return runScript(bot, channel, env, script)

case buildAndroid.FullCommand():
skipCI := *buildAndroidSkipCI
automated := *buildAndroidAutomated
script := launchd.Script{
Label: "keybase.build.android",
Expand All @@ -125,15 +120,14 @@ func (k *keybot) Run(bot *slackbot.Bot, channel string, args []string) (string,
{Key: "ANDROID_NDK_HOME", Value: NDKPath},
{Key: "ANDROID_NDK", Value: NDKPath},
{Key: "CLIENT_COMMIT", Value: *buildAndroidCientCommit},
{Key: "CHECK_CI", Value: boolToEnvString(!skipCI)},
{Key: "CHECK_CI", Value: boolToEnvString(false)},
{Key: "AUTOMATED_BUILD", Value: boolToEnvString(automated)},
},
}
env.GoPath = env.PathFromHome("go-android") // Custom go path for Android so we don't conflict
return runScript(bot, channel, env, script)

case buildIOS.FullCommand():
skipCI := *buildIOSSkipCI
iosClean := *buildIOSClean
automated := *buildIOSAutomated
script := launchd.Script{
Expand All @@ -143,7 +137,7 @@ func (k *keybot) Run(bot *slackbot.Bot, channel string, args []string) (string,
EnvVars: []launchd.EnvVar{
{Key: "CLIENT_COMMIT", Value: *buildIOSCientCommit},
{Key: "CLEAN", Value: boolToEnvString(iosClean)},
{Key: "CHECK_CI", Value: boolToEnvString(!skipCI)},
{Key: "CHECK_CI", Value: boolToEnvString(false)},
{Key: "AUTOMATED_BUILD", Value: boolToEnvString(automated)},
},
}
Expand Down
5 changes: 0 additions & 5 deletions keybot/winbot.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ func (d *winbot) Run(bot *slackbot.Bot, channel string, args []string) (string,
buildWindowsCientCommit := buildWindows.Flag("client-commit", "Build a specific client commit").String()
buildWindowsKbfsCommit := buildWindows.Flag("kbfs-commit", "Build a specific kbfs commit").String()
buildWindowsUpdaterCommit := buildWindows.Flag("updater-commit", "Build a specific updater commit").String()
buildWindowsSkipCI := buildWindows.Flag("skip-ci", "Whether to skip CI").Bool()
buildWindowsSmoke := buildWindows.Flag("smoke", "Build a smoke pair").Bool()
buildWindowsDevCert := buildWindows.Flag("dev-cert", "Build using devel code signing cert").Bool()
buildWindowsAuto := buildWindows.Flag("automated", "Specify build was triggered automatically").Hidden().Bool()
Expand Down Expand Up @@ -104,7 +103,6 @@ func (d *winbot) Run(bot *slackbot.Bot, channel string, args []string) (string,

case buildWindows.FullCommand():
smokeTest := *buildWindowsSmoke
skipCI := *buildWindowsSkipCI
skipTestChannel := *buildWindowsTest
devCert := 0
if *buildWindowsDevCert {
Expand Down Expand Up @@ -133,9 +131,6 @@ func (d *winbot) Run(bot *slackbot.Bot, channel string, args []string) (string,
updateChannel = "None"
} else if smokeTest {
updateChannel = "Smoke"
if !skipCI {
updateChannel = "SmokeCI"
}
}

msg := fmt.Sprintf(autoBuild+"I'm starting the job `windows build`. To cancel run `!%s cancel`. ", bot.Name())
Expand Down