Skip to content

Commit

Permalink
TeamCity change in 'Open-source projects :: Storybook' project: Versi…
Browse files Browse the repository at this point in the history
…oned settings configuration updated
  • Loading branch information
filipp.riabchun authored and root committed Apr 13, 2018
1 parent 58f505a commit c348c89
Show file tree
Hide file tree
Showing 5 changed files with 345 additions and 0 deletions.
74 changes: 74 additions & 0 deletions .teamcity/OpenSourceProjects_Storybook/Project.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
package OpenSourceProjects_Storybook

import OpenSourceProjects_Storybook.buildTypes.*
import OpenSourceProjects_Storybook.vcsRoots.*
import OpenSourceProjects_Storybook.vcsRoots.OpenSourceProjects_Storybook_HttpsGithubComStorybooksStorybookRefsHeadsMaster
import jetbrains.buildServer.configs.kotlin.v2017_2.*
import jetbrains.buildServer.configs.kotlin.v2017_2.Project
import jetbrains.buildServer.configs.kotlin.v2017_2.projectFeatures.VersionedSettings
import jetbrains.buildServer.configs.kotlin.v2017_2.projectFeatures.versionedSettings

object Project : Project({
uuid = "69382d9b-7791-418a-9ff6-1c83b86ed6b5"
id = "OpenSourceProjects_Storybook"
parentId = "OpenSourceProjects"
name = "Storybook"

vcsRoot(OpenSourceProjects_Storybook_HttpsGithubComStorybooksStorybookRefsHeadsMaster)

buildType(OpenSourceProjects_Storybook_Build)

features {
feature {
id = "PROJECT_EXT_252"
type = "ReportTab"
param("startPage", "cra/index.html")
param("title", "CRA")
param("type", "BuildReportTab")
}
feature {
id = "PROJECT_EXT_253"
type = "ReportTab"
param("startPage", "vue/index.html")
param("title", "Vue")
param("type", "BuildReportTab")
}
feature {
id = "PROJECT_EXT_254"
type = "ReportTab"
param("startPage", "angular/index.html")
param("title", "Angular")
param("type", "BuildReportTab")
}
feature {
id = "PROJECT_EXT_255"
type = "ReportTab"
param("startPage", "polymer/index.html")
param("title", "Polymer")
param("type", "BuildReportTab")
}
feature {
id = "PROJECT_EXT_256"
type = "ReportTab"
param("startPage", "mithril/index.html")
param("title", "Mithril")
param("type", "BuildReportTab")
}
feature {
id = "PROJECT_EXT_257"
type = "ReportTab"
param("startPage", "storybook/index.html")
param("title", "Official")
param("type", "BuildReportTab")
}
versionedSettings {
id = "PROJECT_EXT_258"
mode = VersionedSettings.Mode.ENABLED
buildSettingsMode = VersionedSettings.BuildSettingsMode.PREFER_CURRENT_SETTINGS
rootExtId = OpenSourceProjects_Storybook_HttpsGithubComStorybooksStorybookRefsHeadsMaster.id
showChanges = true
settingsFormat = VersionedSettings.Format.KOTLIN
storeSecureParamsOutsideOfVcs = true
}
}
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
package OpenSourceProjects_Storybook.buildTypes

import jetbrains.buildServer.configs.kotlin.v2017_2.*
import jetbrains.buildServer.configs.kotlin.v2017_2.buildFeatures.commitStatusPublisher
import jetbrains.buildServer.configs.kotlin.v2017_2.buildSteps.script
import jetbrains.buildServer.configs.kotlin.v2017_2.triggers.vcs

object OpenSourceProjects_Storybook_Build : BuildType({
uuid = "8cc5f747-4ca7-4f0d-940d-b0c422f501a6"
id = "OpenSourceProjects_Storybook_Build"
name = "Build"

artifactRules = """
examples/official-storybook/storybook-static => official
examples/angular-cli/storybook-static => angular
examples/polymer-cli/storybook-static => polymer
examples/cra-kitchen-sink/storybook-static => cra
examples/mithril-kitchen-sink/storybook-static => mithril
examples/vue-kitchen-sink/storybook-static => vue
coverage/lcov-report => coverage.zip
""".trimIndent()

vcs {
root(OpenSourceProjects_Storybook.vcsRoots.OpenSourceProjects_Storybook_HttpsGithubComStorybooksStorybookRefsHeadsMaster)

}

steps {
script {
name = "Bootstrap"
scriptContent = """
yarn
yarn bootstrap --core --docs
""".trimIndent()
dockerImage = "node:latest"
}
script {
name = "Test"
scriptContent = "yarn test --core --coverage --runInBand"
dockerImage = "node:latest"
}
script {
name = "Lint"
scriptContent = "yarn lint"
dockerImage = "node:latest"
}
script {
name = "Build angular-cli"
scriptContent = """
cd examples/angular-cli
yarn build-storybook
""".trimIndent()
dockerImage = "node:latest"
}
script {
name = "Build polymer-cli"
scriptContent = """
cd examples/polymer-cli
yarn build-storybook
""".trimIndent()
dockerImage = "node:latest"
}
script {
name = "Build cra-kitchen-sink"
scriptContent = """
cd examples/cra-kitchen-sink
yarn build-storybook
""".trimIndent()
dockerImage = "node:latest"
}
script {
name = "Build mithril-kitchen-sink"
scriptContent = """
cd examples/mithril-kitchen-sink
yarn build-storybook
""".trimIndent()
dockerImage = "node:latest"
}
script {
name = "Build vue-kitchen-sink"
scriptContent = """
cd examples/vue-kitchen-sink
yarn build-storybook
""".trimIndent()
dockerImage = "node:latest"
}
script {
name = "Build official-storybook"
scriptContent = """
cd examples/official-storybook
yarn build-storybook
""".trimIndent()
dockerImage = "node:latest"
}
}

triggers {
vcs {
}
}

features {
commitStatusPublisher {
publisher = github {
githubUrl = "https://api.github.com"
authType = personalToken {
token = "credentialsJSON:5ffe2d7e-531e-4f6f-b1fc-a41bfea26eaa"
}
}
param("github_oauth_user", "Hypnosphi")
}
}

requirements {
doesNotContain("env.OS", "Windows")
}
})
35 changes: 35 additions & 0 deletions .teamcity/OpenSourceProjects_Storybook/settings.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package OpenSourceProjects_Storybook

import jetbrains.buildServer.configs.kotlin.v2017_2.*

/*
The settings script is an entry point for defining a single
TeamCity project. TeamCity looks for the 'settings.kts' file in a
project directory and runs it if it's found, so the script name
shouldn't be changed and its package should be the same as the
project's id.
The script should contain a single call to the project() function
with a Project instance or an init function as an argument.
VcsRoots, BuildTypes, and Templates of this project must be
registered inside project using the vcsRoot(), buildType(), and
template() methods respectively.
Subprojects can be defined either in their own settings.kts or by
calling the subProjects() method in this project.
To debug settings scripts in command-line, run the
mvnDebug org.jetbrains.teamcity:teamcity-configs-maven-plugin:generate
command and attach your debugger to the port 8000.
To debug in IntelliJ Idea, open the 'Maven Projects' tool window (View ->
Tool Windows -> Maven Projects), find the generate task
node (Plugins -> teamcity-configs -> teamcity-configs:generate),
the 'Debug' option is available in the context menu for the task.
*/

version = "2017.2"
project(OpenSourceProjects_Storybook.Project)
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package OpenSourceProjects_Storybook.vcsRoots

import jetbrains.buildServer.configs.kotlin.v2017_2.*
import jetbrains.buildServer.configs.kotlin.v2017_2.vcs.GitVcsRoot

object OpenSourceProjects_Storybook_HttpsGithubComStorybooksStorybookRefsHeadsMaster : GitVcsRoot({
uuid = "cec03c4b-d52c-42a0-8e9e-53bde85d6b33"
id = "OpenSourceProjects_Storybook_HttpsGithubComStorybooksStorybookRefsHeadsMaster"
name = "https://github.com/storybooks/storybook#refs/heads/master"
url = "https://github.com/storybooks/storybook"
authMethod = password {
userName = "Hypnosphi"
password = "credentialsJSON:5ffe2d7e-531e-4f6f-b1fc-a41bfea26eaa"
}
})
104 changes: 104 additions & 0 deletions .teamcity/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<?xml version="1.0"?>
<project>
<modelVersion>4.0.0</modelVersion>
<name>OpenSourceProjects_Storybook Config DSL Script</name>
<groupId>OpenSourceProjects_Storybook</groupId>
<artifactId>OpenSourceProjects_Storybook_dsl</artifactId>
<version>1.0-SNAPSHOT</version>

<parent>
<groupId>org.jetbrains.teamcity</groupId>
<artifactId>configs-dsl-kotlin-parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>

<repositories>
<repository>
<id>jetbrains-all</id>
<url>http://download.jetbrains.com/teamcity-repository</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>teamcity-server</id>
<url>https://teamcity.jetbrains.com/app/dsl-plugins-repository</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<id>JetBrains</id>
<url>http://download.jetbrains.com/teamcity-repository</url>
</pluginRepository>
</pluginRepositories>

<build>
<sourceDirectory>.</sourceDirectory>
<plugins>
<plugin>
<artifactId>kotlin-maven-plugin</artifactId>
<groupId>org.jetbrains.kotlin</groupId>
<version>${kotlin.version}</version>

<configuration/>
<executions>
<execution>
<id>compile</id>
<phase>process-sources</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>test-compile</id>
<phase>process-test-sources</phase>
<goals>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jetbrains.teamcity</groupId>
<artifactId>teamcity-configs-maven-plugin</artifactId>
<version>${teamcity.dsl.version}</version>
<configuration>
<format>kotlin</format>
<dstDir>target/generated-configs</dstDir>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.jetbrains.teamcity</groupId>
<artifactId>configs-dsl-kotlin</artifactId>
<version>${teamcity.dsl.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.teamcity</groupId>
<artifactId>configs-dsl-kotlin-plugins</artifactId>
<version>1.0-SNAPSHOT</version>
<type>pom</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<version>${kotlin.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-script-runtime</artifactId>
<version>${kotlin.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

0 comments on commit c348c89

Please sign in to comment.