From 22df3392be8af89a93992b093661fdefd44d7b50 Mon Sep 17 00:00:00 2001 From: Michael Kuzmin Date: Sat, 22 Dec 2018 21:48:18 +0300 Subject: [PATCH] fix build --- .gitignore | 1 + .teamcity/patches/buildTypes/Build.kts | 77 -------------------------- .teamcity/patches/projects/_Self.kts | 41 -------------- .teamcity/settings.kts | 21 +++++-- gofmt.sh | 2 +- 5 files changed, 19 insertions(+), 123 deletions(-) delete mode 100644 .teamcity/patches/buildTypes/Build.kts delete mode 100644 .teamcity/patches/projects/_Self.kts diff --git a/.gitignore b/.gitignore index da1a8903c..693c791b3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .idea/ packer-builder-vsphere* +build/ bin/ .env test*.json diff --git a/.teamcity/patches/buildTypes/Build.kts b/.teamcity/patches/buildTypes/Build.kts deleted file mode 100644 index e4ae0d67d..000000000 --- a/.teamcity/patches/buildTypes/Build.kts +++ /dev/null @@ -1,77 +0,0 @@ -package patches.buildTypes - -import jetbrains.buildServer.configs.kotlin.v2018_2.* -import jetbrains.buildServer.configs.kotlin.v2018_2.buildFeatures.CommitStatusPublisher -import jetbrains.buildServer.configs.kotlin.v2018_2.buildFeatures.PullRequests -import jetbrains.buildServer.configs.kotlin.v2018_2.buildFeatures.commitStatusPublisher -import jetbrains.buildServer.configs.kotlin.v2018_2.buildFeatures.pullRequests -import jetbrains.buildServer.configs.kotlin.v2018_2.triggers.VcsTrigger -import jetbrains.buildServer.configs.kotlin.v2018_2.triggers.vcs -import jetbrains.buildServer.configs.kotlin.v2018_2.ui.* - -/* -This patch script was generated by TeamCity on settings change in UI. -To apply the patch, change the buildType with id = 'Build' -accordingly, and delete the patch script. -*/ -changeBuildType(RelativeId("Build")) { - triggers { - val trigger1 = find { - vcs { - triggerRules = "-:*.md" - branchFilter = """ - +:* - -:temp-* - -:pull/* - """.trimIndent() - } - } - trigger1.apply { - triggerRules = """ - -:*.md - -.teamcity/ - """.trimIndent() - } - } - - features { - val feature1 = find { - commitStatusPublisher { - publisher = github { - githubUrl = "https://api.github.com" - authType = personalToken { - token = "credentialsJSON:95bbfc46-3141-4bed-86ec-f8ec751f3e94" - } - } - param("github_oauth_user", "mkuzmin") - } - } - feature1.apply { - publisher = github { - githubUrl = "https://api.github.com" - authType = personalToken { - token = "credentialsJSON:5ead3bb1-c370-4589-beb8-24f8d02c36bc" - } - } - } - val feature2 = find { - pullRequests { - provider = github { - authType = token { - token = "credentialsJSON:39727f26-62ed-4152-ab9a-f6845076a979" - } - filterAuthorRole = PullRequests.GitHubRoleFilter.EVERYBODY - } - } - } - feature2.apply { - provider = github { - authType = token { - token = "credentialsJSON:5ead3bb1-c370-4589-beb8-24f8d02c36bc" - } - filterTargetBranch = "" - filterAuthorRole = PullRequests.GitHubRoleFilter.EVERYBODY - } - } - } -} diff --git a/.teamcity/patches/projects/_Self.kts b/.teamcity/patches/projects/_Self.kts deleted file mode 100644 index ac3e6bf47..000000000 --- a/.teamcity/patches/projects/_Self.kts +++ /dev/null @@ -1,41 +0,0 @@ -package patches.projects - -import jetbrains.buildServer.configs.kotlin.v2018_2.* -import jetbrains.buildServer.configs.kotlin.v2018_2.Project -import jetbrains.buildServer.configs.kotlin.v2018_2.ui.* - -/* -This patch script was generated by TeamCity on settings change in UI. -To apply the patch, change the root project -accordingly, and delete the patch script. -*/ -changeProject(DslContext.projectId) { - features { - add { - feature { - type = "OAuthProvider" - id = "PROJECT_EXT_114" - param("clientId", "1abfd46417d7795298a1") - param("defaultTokenScope", "public_repo,repo,repo:status,write:repo_hook") - param("secure:clientSecret", "credentialsJSON:5fe99dc3-4d1d-4fd6-9f5c-e87fbcbd9a4e") - param("displayName", "GitHub.com") - param("gitHubUrl", "https://github.com/") - param("providerType", "GitHub") - } - } - add { - feature { - type = "IssueTracker" - id = "PROJECT_EXT_190" - param("secure:password", "") - param("name", "packer-builder-vsphere") - param("pattern", """#(\d+)""") - param("authType", "anonymous") - param("repository", "https://github.com/jetbrains-infra/packer-builder-vsphere") - param("type", "GithubIssues") - param("secure:accessToken", "credentialsJSON:70cd214c-6949-4bb6-931c-e32e9a02edf2") - param("username", "") - } - } - } -} diff --git a/.teamcity/settings.kts b/.teamcity/settings.kts index aca65efa4..0770dee44 100644 --- a/.teamcity/settings.kts +++ b/.teamcity/settings.kts @@ -16,10 +16,21 @@ project { buildType(Build) features { + feature { + type = "OAuthProvider" + param("providerType", "GitHub") + param("displayName", "GitHub.com") + param("gitHubUrl", "https://github.com/") + param("clientId", "1abfd46417d7795298a1") + param("secure:clientSecret", "credentialsJSON:5fe99dc3-4d1d-4fd6-9f5c-e87fbcbd9a4e") + param("defaultTokenScope", "public_repo,repo,repo:status,write:repo_hook") + } feature { type = "IssueTracker" + param("name", "packer-builder-vsphere") param("type", "GithubIssues") param("repository", "https://github.com/jetbrains-infra/packer-builder-vsphere") + param("authType", "anonymous") } } } @@ -99,15 +110,14 @@ object Build : BuildType({ publisher = github { githubUrl = "https://api.github.com" authType = personalToken { - token = "credentialsJSON:95bbfc46-3141-4bed-86ec-f8ec751f3e94" + token = "credentialsJSON:5ead3bb1-c370-4589-beb8-24f8d02c36bc" } } - param("github_oauth_user", "mkuzmin") } pullRequests { provider = github { authType = token { - token = "credentialsJSON:39727f26-62ed-4152-ab9a-f6845076a979" + token = "credentialsJSON:5ead3bb1-c370-4589-beb8-24f8d02c36bc" } filterAuthorRole = PullRequests.GitHubRoleFilter.EVERYBODY } @@ -116,7 +126,10 @@ object Build : BuildType({ triggers { vcs { - triggerRules = "-:*.md" + triggerRules = """ + -:*.md + -.teamcity/ + """.trimIndent() branchFilter = """ +:* -:temp-* diff --git a/gofmt.sh b/gofmt.sh index 0f95fe149..69f4b43af 100755 --- a/gofmt.sh +++ b/gofmt.sh @@ -2,7 +2,7 @@ RETVAL=0 -for file in $(find . -name '*.go' -not -path './vendor/*') +for file in $(find . -name '*.go' -not -path './build/*') do if [ -n "$(gofmt -l $file)" ] then