Skip to content

Commit

Permalink
wip: build schema using NJsonSchema
Browse files Browse the repository at this point in the history
  • Loading branch information
matkoch committed Apr 1, 2024
1 parent 41a9920 commit ef75c41
Show file tree
Hide file tree
Showing 15 changed files with 693 additions and 546 deletions.
348 changes: 162 additions & 186 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
@@ -1,76 +1,174 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/build",
"title": "Build Schema",
"properties": {
"AutoStash": {
"type": "boolean"
},
"CodecovToken": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"Configuration": {
"type": "string",
"enum": [
"Debug",
"Release"
]
},
"DiscordWebhook": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"FeedzNuGetApiKey": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"GitHubReleaseGitHubToken": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"IgnoreFailedSources": {
"type": "boolean",
"description": "Ignore unreachable sources during Restore"
},
"Major": {
"type": "boolean"
},
"MastodonAccessToken": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"PublicNuGetApiKey": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"SignPathApiToken": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"SignPathOrganizationId": {
"type": "string"
},
"SignPathPolicySlug": {
"type": "string"
},
"SignPathProjectSlug": {
"type": "string"
},
"SlackWebhook": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
},
"TestDegreeOfParallelism": {
"type": "integer",
"format": "int32"
},
"TwitterAccessToken": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"TwitterAccessTokenSecret": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"TwitterConsumerKey": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"TwitterConsumerSecret": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"UseHttps": {
"type": "boolean"
}
},
"definitions": {
"build": {
"type": "object",
"Host": {
"type": "string",
"enum": [
"AppVeyor",
"AzurePipelines",
"Bamboo",
"Bitbucket",
"Bitrise",
"GitHubActions",
"GitLab",
"Jenkins",
"Rider",
"SpaceAutomation",
"TeamCity",
"Terminal",
"TravisCI",
"VisualStudio",
"VSCode"
]
},
"ExecutableTarget": {
"type": "string",
"enum": [
"Announce",
"AnnounceDiscord",
"AnnounceMastodon",
"AnnounceSlack",
"AnnounceTwitter",
"Changelog",
"CheckoutExternalRepositories",
"Clean",
"Compile",
"CreateGitHubRelease",
"DeletePackages",
"DownloadLicenses",
"GenerateGlobalSolution",
"GeneratePublicApi",
"GenerateTools",
"Hotfix",
"Install",
"InstallFonts",
"Milestone",
"Pack",
"Publish",
"References",
"Release",
"ReleaseImage",
"ReportCoverage",
"ReportDuplicates",
"ReportIssues",
"Restore",
"RunTargetInDockerImageTest",
"SignPackages",
"Test",
"UpdateContributors",
"UpdateStargazers"
]
},
"Verbosity": {
"type": "string",
"description": "",
"enum": [
"Verbose",
"Normal",
"Minimal",
"Quiet"
]
},
"NukeBuild": {
"properties": {
"AutoStash": {
"type": "boolean"
},
"CodecovToken": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"Configuration": {
"type": "string",
"enum": [
"Debug",
"Release"
]
},
"Continue": {
"type": "boolean",
"description": "Indicates to continue a previously failed build attempt"
},
"DiscordWebhook": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"FeedzNuGetApiKey": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"GitHubReleaseGitHubToken": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"Help": {
"type": "boolean",
"description": "Shows the help text for this build assembly"
},
"Host": {
"type": "string",
"description": "Host for execution. Default is 'automatic'",
"enum": [
"AppVeyor",
"AzurePipelines",
"Bamboo",
"Bitbucket",
"Bitrise",
"GitHubActions",
"GitLab",
"Jenkins",
"Rider",
"SpaceAutomation",
"TeamCity",
"Terminal",
"TravisCI",
"VisualStudio",
"VSCode"
]
},
"IgnoreFailedSources": {
"type": "boolean",
"description": "Ignore unreachable sources during Restore"
},
"Major": {
"type": "boolean"
},
"MastodonAccessToken": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
"$ref": "#/definitions/Host"
},
"NoLogo": {
"type": "boolean",
Expand All @@ -91,152 +189,30 @@
"type": "string"
}
},
"PublicNuGetApiKey": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"Root": {
"type": "string",
"description": "Root directory during build execution"
},
"SignPathApiToken": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"SignPathOrganizationId": {
"type": "string"
},
"SignPathPolicySlug": {
"type": "string"
},
"SignPathProjectSlug": {
"type": "string"
},
"Skip": {
"type": "array",
"description": "List of targets to be skipped. Empty list skips all dependencies",
"items": {
"type": "string",
"enum": [
"Announce",
"AnnounceDiscord",
"AnnounceMastodon",
"AnnounceSlack",
"AnnounceTwitter",
"Changelog",
"CheckoutExternalRepositories",
"Clean",
"Compile",
"CreateGitHubRelease",
"DeletePackages",
"DownloadLicenses",
"GenerateGlobalSolution",
"GeneratePublicApi",
"GenerateTools",
"Hotfix",
"Install",
"InstallFonts",
"Milestone",
"Pack",
"Publish",
"References",
"Release",
"ReleaseImage",
"ReportCoverage",
"ReportDuplicates",
"ReportIssues",
"Restore",
"RunTargetInDockerImageTest",
"SignPackages",
"Test",
"UpdateContributors",
"UpdateStargazers"
]
"$ref": "#/definitions/ExecutableTarget"
}
},
"SlackWebhook": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
},
"Target": {
"type": "array",
"description": "List of targets to be invoked. Default is '{default_target}'",
"items": {
"type": "string",
"enum": [
"Announce",
"AnnounceDiscord",
"AnnounceMastodon",
"AnnounceSlack",
"AnnounceTwitter",
"Changelog",
"CheckoutExternalRepositories",
"Clean",
"Compile",
"CreateGitHubRelease",
"DeletePackages",
"DownloadLicenses",
"GenerateGlobalSolution",
"GeneratePublicApi",
"GenerateTools",
"Hotfix",
"Install",
"InstallFonts",
"Milestone",
"Pack",
"Publish",
"References",
"Release",
"ReleaseImage",
"ReportCoverage",
"ReportDuplicates",
"ReportIssues",
"Restore",
"RunTargetInDockerImageTest",
"SignPackages",
"Test",
"UpdateContributors",
"UpdateStargazers"
]
"$ref": "#/definitions/ExecutableTarget"
}
},
"TestDegreeOfParallelism": {
"type": "integer"
},
"TwitterAccessToken": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"TwitterAccessTokenSecret": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"TwitterConsumerKey": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"TwitterConsumerSecret": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"UseHttps": {
"type": "boolean"
},
"Verbosity": {
"type": "string",
"description": "Logging verbosity during build execution. Default is 'Normal'",
"enum": [
"Minimal",
"Normal",
"Quiet",
"Verbose"
]
"$ref": "#/definitions/Verbosity"
}
}
}
}
},
"$ref": "#/definitions/NukeBuild"
}
Loading

0 comments on commit ef75c41

Please sign in to comment.