Skip to content

Commit

Permalink
Allow adhoc snapshot releases
Browse files Browse the repository at this point in the history
  • Loading branch information
donat committed Dec 9, 2020
1 parent be31ac8 commit 11cfa09
Show file tree
Hide file tree
Showing 8 changed files with 304 additions and 19 deletions.
6 changes: 4 additions & 2 deletions .teamcity/Buildship/Promotion30/Project.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,21 @@ package Buildship.Promotion30
import Buildship.Promotion30.buildTypes.Milestone
import Buildship.Promotion30.buildTypes.Release
import Buildship.Promotion30.buildTypes.Snapshot
import jetbrains.buildServer.configs.kotlin.v2019_2.ParameterDisplay
import Buildship.Promotion30.buildTypes.SnapshotAdHoc
import jetbrains.buildServer.configs.kotlin.v2019_2.Project

object Project : Project({
id("Promotion")
name = "Promotion"
description = "Promotes Buildship releases"

template(PromotionDependencyTemplate)
template(Promotion30Template)

buildType(SnapshotAdHoc)
buildType(Snapshot)
buildType(Release)
buildType(Milestone)

buildTypesOrder = arrayListOf(Release, Milestone, Snapshot)
buildTypesOrder = arrayListOf(Release, Milestone, Snapshot, SnapshotAdHoc)
})
10 changes: 0 additions & 10 deletions .teamcity/Buildship/Promotion30/Promotion30Template.kt
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package Buildship.Promotion30

import Buildship.Check30.Checkpoints.buildTypes.Final
import Buildship.GitHubVcsRoot
import Buildship.addCredentialsLeakFailureCondition
import jetbrains.buildServer.configs.kotlin.v2019_2.CheckoutMode
import jetbrains.buildServer.configs.kotlin.v2019_2.FailureAction
import jetbrains.buildServer.configs.kotlin.v2019_2.Template

object Promotion30Template : Template({
Expand Down Expand Up @@ -33,12 +31,4 @@ object Promotion30Template : Template({
failureConditions {
errorMessage = true
}

dependencies {
snapshot(Final) {
onDependencyFailure = FailureAction.FAIL_TO_START
onDependencyCancel = FailureAction.CANCEL
}
snapshot(Buildship.Check30.CrossVersionCoverage.buildTypes.Eclipse47Java9, Buildship.Check30.Checkpoints.buildTypes.CheckpointUtils.DefaultFailureCondition)
}
})
17 changes: 17 additions & 0 deletions .teamcity/Buildship/Promotion30/PromotionDependencyTemplate.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package Buildship.Promotion30

import Buildship.Check30.Checkpoints.buildTypes.Final
import jetbrains.buildServer.configs.kotlin.v2019_2.FailureAction
import jetbrains.buildServer.configs.kotlin.v2019_2.Template

object PromotionDependencyTemplate : Template({
name = "Promotion Dependency Template"

dependencies {
snapshot(Final) {
onDependencyFailure = FailureAction.FAIL_TO_START
onDependencyCancel = FailureAction.CANCEL
}
snapshot(Buildship.Check30.CrossVersionCoverage.buildTypes.Eclipse47Java9, Buildship.Check30.Checkpoints.buildTypes.CheckpointUtils.DefaultFailureCondition)
}
})
3 changes: 2 additions & 1 deletion .teamcity/Buildship/Promotion30/buildTypes/Milestone.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package Buildship.Promotion30.buildTypes

import Buildship.Promotion30.Promotion30Template
import Buildship.Promotion30.PromotionDependencyTemplate
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
import jetbrains.buildServer.configs.kotlin.v2019_2.ParameterDisplay
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
Expand All @@ -9,7 +10,7 @@ object Milestone : BuildType({
id("Promote30_Milestone")
name = "Promote Milestone"

templates(Promotion30Template)
templates(Promotion30Template, PromotionDependencyTemplate)

params {
text("Confirm", "NO", label = "Do you want to proceed with the milestone?", description = "Confirm to publish a new milestone.", display = ParameterDisplay.PROMPT,
Expand Down
3 changes: 2 additions & 1 deletion .teamcity/Buildship/Promotion30/buildTypes/Release.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package Buildship.Promotion30.buildTypes

import Buildship.Promotion30.Promotion30Template
import Buildship.Promotion30.PromotionDependencyTemplate
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
import jetbrains.buildServer.configs.kotlin.v2019_2.ParameterDisplay
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
Expand All @@ -9,7 +10,7 @@ object Release : BuildType({
id("Promote30_Release")
name = "Promote Release"

templates(Promotion30Template)
templates(Promotion30Template, PromotionDependencyTemplate)

params {
password("github.token", "", label = "GitHub token", description = "Please specify your GitHub auth token to proceed with the release", display = ParameterDisplay.PROMPT)
Expand Down
13 changes: 12 additions & 1 deletion .teamcity/Buildship/Promotion30/buildTypes/Snapshot.kt
Original file line number Diff line number Diff line change
@@ -1,22 +1,33 @@
package Buildship.Promotion30.buildTypes

import Buildship.Check30.Checkpoints.buildTypes.Final
import Buildship.Promotion30.Promotion30Template
import Buildship.Promotion30.PromotionDependencyTemplate
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
import jetbrains.buildServer.configs.kotlin.v2019_2.FailureAction
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.gradle
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.schedule

object Snapshot : BuildType({
id("Promote30_Snapshot")
name = "Promote Snapshot"

templates(Promotion30Template)
templates(Promotion30Template, PromotionDependencyTemplate)

params {
param("env.JAVA_HOME", "%linux.java8.oracle.64bit%")
param("eclipse.release.type", "snapshot")
param("build.invoker", "ci")
}

dependencies {
snapshot(Final) {
onDependencyFailure = FailureAction.FAIL_TO_START
onDependencyCancel = FailureAction.CANCEL
}
snapshot(Buildship.Check30.CrossVersionCoverage.buildTypes.Eclipse47Java9, Buildship.Check30.Checkpoints.buildTypes.CheckpointUtils.DefaultFailureCondition)
}

steps {
gradle {
name = "Build and upload update site for Eclipse 4.3 (Kepler)"
Expand Down
Loading

0 comments on commit 11cfa09

Please sign in to comment.