Compare commits

...

4 Commits

Author SHA1 Message Date
Felix Lange
621fd8fe7f internal/build: parse buildbot tag better 2022-05-20 19:59:26 +02:00
Felix Lange
019483bdaf internal/build: clarify term refspec 2022-05-20 19:45:45 +02:00
Felix Lange
7e0e69c622 build: enable archives on buildbot-testing 2022-05-20 19:12:42 +02:00
Felix Lange
0a05134c71 internal/build: add buildbot env 2022-05-20 18:55:01 +02:00
2 changed files with 34 additions and 7 deletions

View File

@@ -132,12 +132,12 @@ var (
// Note: the following Ubuntu releases have been officially deprecated on Launchpad:
// wily, yakkety, zesty, artful, cosmic, disco, eoan, groovy, hirsuite
debDistroGoBoots = map[string]string{
"trusty": "golang-1.11", // EOL: 04/2024
"xenial": "golang-go", // EOL: 04/2026
"bionic": "golang-go", // EOL: 04/2028
"focal": "golang-go", // EOL: 04/2030
"impish": "golang-go", // EOL: 07/2022
"jammy": "golang-go", // EOL: 04/2032
"trusty": "golang-1.11", // EOL: 04/2024
"xenial": "golang-go", // EOL: 04/2026
"bionic": "golang-go", // EOL: 04/2028
"focal": "golang-go", // EOL: 04/2030
"impish": "golang-go", // EOL: 07/2022
"jammy": "golang-go", // EOL: 04/2032
//"kinetic": "golang-go", // EOL: 07/2023
}
@@ -461,7 +461,7 @@ func maybeSkipArchive(env build.Environment) {
log.Printf("skipping archive creation because this is a cron job")
os.Exit(0)
}
if env.Branch != "master" && !strings.HasPrefix(env.Tag, "v1.") {
if env.Branch != "master" && env.Branch != "buildbot-testing" && !strings.HasPrefix(env.Tag, "v1.") {
log.Printf("skipping archive creation because branch %q, tag %q is not on the inclusion list", env.Branch, env.Tag)
os.Exit(0)
}

View File

@@ -73,6 +73,7 @@ func Env() Environment {
IsPullRequest: os.Getenv("TRAVIS_PULL_REQUEST") != "false",
IsCronJob: os.Getenv("TRAVIS_EVENT_TYPE") == "cron",
}
case os.Getenv("CI") == "True" && os.Getenv("APPVEYOR") == "True":
commit := os.Getenv("APPVEYOR_PULL_REQUEST_HEAD_COMMIT")
if commit == "" {
@@ -90,6 +91,32 @@ func Env() Environment {
IsPullRequest: os.Getenv("APPVEYOR_PULL_REQUEST_NUMBER") != "",
IsCronJob: os.Getenv("APPVEYOR_SCHEDULED_BUILD") == "True",
}
case os.Getenv("CI") == "true" && os.Getenv("ETH_BUILDBOT") == "true":
// For buildbot, the branch variable is the branch OR tag, and
// we can distinguish them by the git refspec.
var branch, tag string
branchSpec := os.Getenv("BUILD_BRANCH")
if strings.HasPrefix(branchSpec, "refs/tags/") {
tag = strings.TrimPrefix(branchSpec, "refs/tags/")
} else {
branch = branchSpec
}
commit := os.Getenv("BUILD_COMMIT")
return Environment{
CI: true,
Name: "buildbot",
Repo: os.Getenv("BUILD_REPO"),
Buildnum: os.Getenv("BUILD_NUMBER"),
IsPullRequest: os.Getenv("BUILD_IS_PR") == "true",
IsCronJob: os.Getenv("BUILD_IS_CRON") == "true",
Commit: commit,
Date: getDate(commit),
Branch: branch,
Tag: tag,
}
default:
return LocalEnv()
}