-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
SetupGcloudV1.kt
184 lines (146 loc) · 7.52 KB
/
SetupGcloudV1.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
// This file was generated using action-binding-generator. Don't change it by hand, otherwise your
// changes will be overwritten with the next binding code regeneration.
// See https://github.com/typesafegithub/github-workflows-kt for more info.
@file:Suppress(
"DataClassPrivateConstructor",
"UNUSED_PARAMETER",
"DEPRECATION",
)
package io.github.typesafegithub.workflows.actions.googlegithubactions
import io.github.typesafegithub.workflows.domain.actions.Action
import io.github.typesafegithub.workflows.domain.actions.RegularAction
import java.util.LinkedHashMap
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.collections.toList
import kotlin.collections.toTypedArray
/**
* Action: Set up gcloud Cloud SDK environment
*
* Downloads, installs, and configures a Google Cloud SDK environment.
* Adds the `gcloud` CLI command to the $PATH.
*
* [Action on GitHub](https://github.com/google-github-actions/setup-gcloud)
*
* @param skipInstall Skip installation of the gcloud SDK and use the system-supplied version
* instead. The "version" input will be ignored.
* @param version Version or version constraint of the gcloud SDK to install. If
* unspecified, it will accept any installed version of the gcloud SDK. If
* set to "latest", it will download the latest available SDK. If set to a
* version constraint, it will download the latest available version that
* matches the constraint. Examples: "290.0.1" or ">= 197.0.1".
* @param projectId ID of the Google Cloud project. If provided, this will configure gcloud to
* use this project ID by default for commands. Individual commands can still
* override the project using the --project flag which takes precedence.
* @param installComponents List of Cloud SDK components to install
* @param _customInputs Type-unsafe map where you can put any inputs that are not yet supported by
* the binding
* @param _customVersion Allows overriding action's version, for example to use a specific minor
* version, or a newer version that the binding doesn't yet know about
*/
@Deprecated(
message = "This action has a newer major version: SetupGcloudV2",
replaceWith = ReplaceWith("SetupGcloudV2"),
)
public data class SetupGcloudV1 private constructor(
/**
* Skip installation of the gcloud SDK and use the system-supplied version
* instead. The "version" input will be ignored.
*/
public val skipInstall: Boolean? = null,
/**
* Version or version constraint of the gcloud SDK to install. If
* unspecified, it will accept any installed version of the gcloud SDK. If
* set to "latest", it will download the latest available SDK. If set to a
* version constraint, it will download the latest available version that
* matches the constraint. Examples: "290.0.1" or ">= 197.0.1".
*/
public val version: String? = null,
/**
* ID of the Google Cloud project. If provided, this will configure gcloud to
* use this project ID by default for commands. Individual commands can still
* override the project using the --project flag which takes precedence.
*/
public val projectId: String? = null,
/**
* List of Cloud SDK components to install
*/
public val installComponents: List<SetupGcloudV1.Component>? = null,
/**
* Type-unsafe map where you can put any inputs that are not yet supported by the binding
*/
public val _customInputs: Map<String, String> = mapOf(),
/**
* Allows overriding action's version, for example to use a specific minor version, or a newer
* version that the binding doesn't yet know about
*/
public val _customVersion: String? = null,
) : RegularAction<Action.Outputs>("google-github-actions", "setup-gcloud", _customVersion ?: "v1") {
public constructor(
vararg pleaseUseNamedArguments: Unit,
skipInstall: Boolean? = null,
version: String? = null,
projectId: String? = null,
installComponents: List<SetupGcloudV1.Component>? = null,
_customInputs: Map<String, String> = mapOf(),
_customVersion: String? = null,
) : this(skipInstall=skipInstall, version=version, projectId=projectId,
installComponents=installComponents, _customInputs=_customInputs,
_customVersion=_customVersion)
@Suppress("SpreadOperator")
override fun toYamlArguments(): LinkedHashMap<String, String> = linkedMapOf(
*listOfNotNull(
skipInstall?.let { "skip_install" to it.toString() },
version?.let { "version" to it },
projectId?.let { "project_id" to it },
installComponents?.let { "install_components" to it.joinToString(",") { it.stringValue }
},
*_customInputs.toList().toTypedArray(),
).toTypedArray()
)
override fun buildOutputObject(stepId: String): Action.Outputs = Outputs(stepId)
public sealed class Component(
public val stringValue: String,
) {
public object Alpha : SetupGcloudV1.Component("alpha")
public object AnthosAuth : SetupGcloudV1.Component("anthos-auth")
public object Appctl : SetupGcloudV1.Component("appctl")
public object AppEngineGo : SetupGcloudV1.Component("app-engine-go")
public object AppEngineJava : SetupGcloudV1.Component("app-engine-java")
public object AppEnginePython : SetupGcloudV1.Component("app-engine-python")
public object AppEnginePythonExtras : SetupGcloudV1.Component("app-engine-python-extras")
public object Beta : SetupGcloudV1.Component("beta")
public object Bigtable : SetupGcloudV1.Component("bigtable")
public object Bq : SetupGcloudV1.Component("bq")
public object BundledPython3Unix : SetupGcloudV1.Component("bundled-python3-unix")
public object Cbt : SetupGcloudV1.Component("cbt")
public object CloudBuildLocal : SetupGcloudV1.Component("cloud-build-local")
public object CloudDatastoreEmulator : SetupGcloudV1.Component("cloud-datastore-emulator")
public object CloudFirestoreEmulator : SetupGcloudV1.Component("cloud-firestore-emulator")
public object CloudSpannerEmulator : SetupGcloudV1.Component("cloud-spanner-emulator")
public object CloudSqlProxy : SetupGcloudV1.Component("cloud_sql_proxy")
public object ConfigConnector : SetupGcloudV1.Component("config-connector")
public object Core : SetupGcloudV1.Component("core")
public object Datalab : SetupGcloudV1.Component("datalab")
public object DockerCredentialGcr : SetupGcloudV1.Component("docker-credential-gcr")
public object Gsutil : SetupGcloudV1.Component("gsutil")
public object Kpt : SetupGcloudV1.Component("kpt")
public object Kubectl : SetupGcloudV1.Component("kubectl")
public object KubectlOidc : SetupGcloudV1.Component("kubectl-oidc")
public object Kustomize : SetupGcloudV1.Component("kustomize")
public object LocalExtract : SetupGcloudV1.Component("local-extract")
public object Minikube : SetupGcloudV1.Component("minikube")
public object Nomos : SetupGcloudV1.Component("nomos")
public object Pkg : SetupGcloudV1.Component("pkg")
public object PubsubEmulator : SetupGcloudV1.Component("pubsub-emulator")
public object Skaffold : SetupGcloudV1.Component("skaffold")
public class Custom(
customStringValue: String,
) : SetupGcloudV1.Component(customStringValue)
}
}